SlideShare une entreprise Scribd logo
1  sur  15
HOW NODE JOINS OR LEAVE IN PEER
TO PEER NETWORK




Presented by:
Chaitanya Pratap Singh
MCA(4th Semester)
South Asian University, new Delhi.
NODE JOIN (PEER JOIN)
 Joining peer sends a "join" request to the boot
  peer, and gets a GUID back.
 Joining peer sends a "copy routing table" to the
  boot peer.
 Joining peer finds the correct peers it should have
  in its own routing table.
THE JOIN REQUEST
   The first peer to join the network apart from the boot
    peer, will connect to the boot peer and send a "join"
    message. The boot peer responds with a new GUID
    to the joining peer.
THE COPY ROUTING TABLE REQUEST

   After getting a GUID, the joining peer requests to get
    a copy of the boot peers routing table.
FINDING THE CORRECT PEERS FOR THE
ROUTING TABLE
   the joining peer uses this routing table to find the
    peers it should really have in its routing table.
LEAVING NODE
   When a peer no longer wants to be part of a P2P
    network, it will send a "leave" request to all peers in
    its routing table
CONT…
 if A has B in its routing table, B does not necessarily
  have A in its routing table.
 Thus, if A leaves a Chord network, it would have to
  find the peers in the network that has A in its routing
  table.
 In    other words, find those peers which
  have distance(X, A) closest to 20, 21, 22 etc. Once
  those peers are found, the leaving peer (A) will
  send a leave message to each of them.
CHORD STATE AND LOOKUP (1)
   Basic Chord: each                   m=6
    node knows only 2                          2m-1
                                                    N1
    other nodes on the ring                       0
       Successor                  N56                            N8
       Predecessor (for ring     K54
                                                    lookup(K54)
        management)              N51
   Lookup is achieved by
                                                                       N14
    forwarding requests         N48
    around the ring through
    successor pointers
       Requires O(N) hops        N42
                                                                  N21
                                       N38
                                                                   8
                                              N32
CHORD STATE AND LOOKUP (2)                                              Finger table
                                                                         N8+1N14
   Each node knows m                        m=6
                                                                         N8+2N14
                                                                         N8+4N14
    other nodes on the ring                              2m-1            N8+8N21
       Successors: finger i of n                             N1         N8+16
                                                                             N32
                                                            0
        points to node at n+2i (or                                       N8+32
                                                                             N42
        successor)                      N56              lookup(K54)      N8
       Predecessor (for ring          K54                                +1
        management)                   N51                                +2
       O(log N) state per node                                         +4
   Lookup is achieved by            N48                    +16    +8           N14
    following closest                              +32
    preceding fingers, then
    successor
                                       N42
       O(log N) hops                                                     N21
                                            N38
                                                                            9
                                                     N32
JOINING THE RING
   Three step process:
     Initialize all fingers of new node
     Update fingers of existing nodes
     Transfer keys from successor to new node
JOINING THE RING — STEP 1
   Initialize the new node finger table
     Locate any node n in the ring
     Ask n to lookup the peers at j+20, j+21, j+22…
     Use results to populate finger table of j
JOINING THE RING — STEP 2
                                                                 N8+1N14
                                                                 N8+2N14
 Updating fingers of                  m=6                       N8+4N14
 existing nodes                               2m-1               N8+8N21
                                                   N1            N8+16
                                                                     N28
                                                                     N32
                                                 0
   New node j calls                                           6 N8+32
                                                                     N42
                                     N56                         N8
    update function on
    existing nodes that
                                N51                                 12
    must point to j
      Nodes in the ranges     N48                                      N14
                                                   +16     -16
       [j-2i , pred(j)-2i+1]
   O(log N) nodes need
    to be updated                N42
                                                                  N21
                                      N38
                                                         N28       12
                                             N32
JOINING THE RING — STEP 3
     Transfer key responsibility
        Connect to successor
        Copy keys from successor to new node
        Update successor pointer and remove keys

     Only keys in the range are transferred



              N21               N21                 N21                N21


N32                 N32 N28           N32 N28             N32 N28
      K24              K24               K24 K24             K30 K24
      K30              K30               K30
NODE JOIN ALGORITHM
CONT…

Contenu connexe

Tendances

OSPF LSA Types Explained
OSPF LSA Types ExplainedOSPF LSA Types Explained
OSPF LSA Types ExplainedDuane Bodle
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Peter R. Egli
 
Presentation of the IEEE 802.11a MAC Layer
Presentation of the IEEE 802.11a MAC LayerPresentation of the IEEE 802.11a MAC Layer
Presentation of the IEEE 802.11a MAC LayerMahdi Ahmed Jama
 
CCNA CDP LLDP NTP
CCNA CDP LLDP NTP CCNA CDP LLDP NTP
CCNA CDP LLDP NTP Networkel
 
Mpls by vidhu
Mpls by vidhuMpls by vidhu
Mpls by vidhuCU
 
Layer3protocols
Layer3protocolsLayer3protocols
Layer3protocolsassinha
 
Stream Control Transmission Protocol (SCTP) - Introduction
Stream Control Transmission Protocol (SCTP) - IntroductionStream Control Transmission Protocol (SCTP) - Introduction
Stream Control Transmission Protocol (SCTP) - IntroductionLaili Aidi
 
IPv6 Addressing Plan Fundamentals
IPv6 Addressing Plan FundamentalsIPv6 Addressing Plan Fundamentals
IPv6 Addressing Plan FundamentalsRIPE NCC
 
Point to-point protocol (ppp), PAP & CHAP
Point to-point protocol (ppp), PAP & CHAPPoint to-point protocol (ppp), PAP & CHAP
Point to-point protocol (ppp), PAP & CHAPNetProtocol Xpert
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing ProtocolsKABILESH RAMAR
 

Tendances (20)

OSPF LSA Types Explained
OSPF LSA Types ExplainedOSPF LSA Types Explained
OSPF LSA Types Explained
 
Cours3 ospf-eigrp
Cours3 ospf-eigrpCours3 ospf-eigrp
Cours3 ospf-eigrp
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
 
MPLS Layer 3 VPN
MPLS Layer 3 VPN MPLS Layer 3 VPN
MPLS Layer 3 VPN
 
Congestion Control
Congestion ControlCongestion Control
Congestion Control
 
Go Back N ARQ
Go  Back N ARQGo  Back N ARQ
Go Back N ARQ
 
Presentation of the IEEE 802.11a MAC Layer
Presentation of the IEEE 802.11a MAC LayerPresentation of the IEEE 802.11a MAC Layer
Presentation of the IEEE 802.11a MAC Layer
 
Basic socket programming
Basic socket programmingBasic socket programming
Basic socket programming
 
CCNA CDP LLDP NTP
CCNA CDP LLDP NTP CCNA CDP LLDP NTP
CCNA CDP LLDP NTP
 
IP Datagram Structure
IP Datagram StructureIP Datagram Structure
IP Datagram Structure
 
AODV protocol
AODV protocolAODV protocol
AODV protocol
 
Mpls by vidhu
Mpls by vidhuMpls by vidhu
Mpls by vidhu
 
MPLS-TE
MPLS-TEMPLS-TE
MPLS-TE
 
Static Routing
Static RoutingStatic Routing
Static Routing
 
Layer3protocols
Layer3protocolsLayer3protocols
Layer3protocols
 
Stream Control Transmission Protocol (SCTP) - Introduction
Stream Control Transmission Protocol (SCTP) - IntroductionStream Control Transmission Protocol (SCTP) - Introduction
Stream Control Transmission Protocol (SCTP) - Introduction
 
IPv6 Addressing Plan Fundamentals
IPv6 Addressing Plan FundamentalsIPv6 Addressing Plan Fundamentals
IPv6 Addressing Plan Fundamentals
 
Point to-point protocol (ppp), PAP & CHAP
Point to-point protocol (ppp), PAP & CHAPPoint to-point protocol (ppp), PAP & CHAP
Point to-point protocol (ppp), PAP & CHAP
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing Protocols
 
Congestion control
Congestion controlCongestion control
Congestion control
 

Plus de Chandan Thakur

Quality improvement paradigm (QIP)
Quality improvement paradigm (QIP)Quality improvement paradigm (QIP)
Quality improvement paradigm (QIP)Chandan Thakur
 
Chord- A Scalable Peer-to-Peer Lookup Service for Internet Applications
Chord- A Scalable Peer-to-Peer Lookup Service for Internet ApplicationsChord- A Scalable Peer-to-Peer Lookup Service for Internet Applications
Chord- A Scalable Peer-to-Peer Lookup Service for Internet ApplicationsChandan Thakur
 
A maximum residual multicast protocol for large scale mobile ad hoc networks
A maximum residual multicast protocol for large scale mobile ad hoc networksA maximum residual multicast protocol for large scale mobile ad hoc networks
A maximum residual multicast protocol for large scale mobile ad hoc networksChandan Thakur
 
Presentation on component based software engineering(cbse)
Presentation on component based software engineering(cbse)Presentation on component based software engineering(cbse)
Presentation on component based software engineering(cbse)Chandan Thakur
 

Plus de Chandan Thakur (7)

Libsys 7 to koha
Libsys 7 to kohaLibsys 7 to koha
Libsys 7 to koha
 
Quality improvement paradigm (QIP)
Quality improvement paradigm (QIP)Quality improvement paradigm (QIP)
Quality improvement paradigm (QIP)
 
Chord- A Scalable Peer-to-Peer Lookup Service for Internet Applications
Chord- A Scalable Peer-to-Peer Lookup Service for Internet ApplicationsChord- A Scalable Peer-to-Peer Lookup Service for Internet Applications
Chord- A Scalable Peer-to-Peer Lookup Service for Internet Applications
 
A maximum residual multicast protocol for large scale mobile ad hoc networks
A maximum residual multicast protocol for large scale mobile ad hoc networksA maximum residual multicast protocol for large scale mobile ad hoc networks
A maximum residual multicast protocol for large scale mobile ad hoc networks
 
Shayri
ShayriShayri
Shayri
 
Nirmal baba
Nirmal babaNirmal baba
Nirmal baba
 
Presentation on component based software engineering(cbse)
Presentation on component based software engineering(cbse)Presentation on component based software engineering(cbse)
Presentation on component based software engineering(cbse)
 

Dernier

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Dernier (20)

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

Chord Node Join

  • 1. HOW NODE JOINS OR LEAVE IN PEER TO PEER NETWORK Presented by: Chaitanya Pratap Singh MCA(4th Semester) South Asian University, new Delhi.
  • 2. NODE JOIN (PEER JOIN)  Joining peer sends a "join" request to the boot peer, and gets a GUID back.  Joining peer sends a "copy routing table" to the boot peer.  Joining peer finds the correct peers it should have in its own routing table.
  • 3. THE JOIN REQUEST  The first peer to join the network apart from the boot peer, will connect to the boot peer and send a "join" message. The boot peer responds with a new GUID to the joining peer.
  • 4. THE COPY ROUTING TABLE REQUEST  After getting a GUID, the joining peer requests to get a copy of the boot peers routing table.
  • 5. FINDING THE CORRECT PEERS FOR THE ROUTING TABLE  the joining peer uses this routing table to find the peers it should really have in its routing table.
  • 6. LEAVING NODE  When a peer no longer wants to be part of a P2P network, it will send a "leave" request to all peers in its routing table
  • 7. CONT…  if A has B in its routing table, B does not necessarily have A in its routing table.  Thus, if A leaves a Chord network, it would have to find the peers in the network that has A in its routing table.  In other words, find those peers which have distance(X, A) closest to 20, 21, 22 etc. Once those peers are found, the leaving peer (A) will send a leave message to each of them.
  • 8. CHORD STATE AND LOOKUP (1)  Basic Chord: each m=6 node knows only 2 2m-1 N1 other nodes on the ring 0  Successor N56 N8  Predecessor (for ring K54 lookup(K54) management) N51  Lookup is achieved by N14 forwarding requests N48 around the ring through successor pointers  Requires O(N) hops N42 N21 N38 8 N32
  • 9. CHORD STATE AND LOOKUP (2) Finger table N8+1N14  Each node knows m m=6 N8+2N14 N8+4N14 other nodes on the ring 2m-1 N8+8N21  Successors: finger i of n N1 N8+16 N32 0 points to node at n+2i (or N8+32 N42 successor) N56 lookup(K54) N8  Predecessor (for ring K54 +1 management) N51 +2  O(log N) state per node +4  Lookup is achieved by N48 +16 +8 N14 following closest +32 preceding fingers, then successor N42  O(log N) hops N21 N38 9 N32
  • 10. JOINING THE RING  Three step process:  Initialize all fingers of new node  Update fingers of existing nodes  Transfer keys from successor to new node
  • 11. JOINING THE RING — STEP 1  Initialize the new node finger table  Locate any node n in the ring  Ask n to lookup the peers at j+20, j+21, j+22…  Use results to populate finger table of j
  • 12. JOINING THE RING — STEP 2 N8+1N14 N8+2N14  Updating fingers of m=6 N8+4N14 existing nodes 2m-1 N8+8N21 N1 N8+16 N28 N32 0  New node j calls 6 N8+32 N42 N56 N8 update function on existing nodes that N51 12 must point to j  Nodes in the ranges N48 N14 +16 -16 [j-2i , pred(j)-2i+1]  O(log N) nodes need to be updated N42 N21 N38 N28 12 N32
  • 13. JOINING THE RING — STEP 3  Transfer key responsibility  Connect to successor  Copy keys from successor to new node  Update successor pointer and remove keys  Only keys in the range are transferred N21 N21 N21 N21 N32 N32 N28 N32 N28 N32 N28 K24 K24 K24 K24 K30 K24 K30 K30 K30