SlideShare a Scribd company logo
1 of 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…

More Related Content

What's hot (20)

Floating point units
Floating point unitsFloating point units
Floating point units
 
SDN Training - Open daylight installation + example with mininet
SDN Training - Open daylight installation + example with mininetSDN Training - Open daylight installation + example with mininet
SDN Training - Open daylight installation + example with mininet
 
Recurrence theorem
Recurrence theoremRecurrence theorem
Recurrence theorem
 
Parallel sorting Algorithms
Parallel  sorting AlgorithmsParallel  sorting Algorithms
Parallel sorting Algorithms
 
SNMP
SNMPSNMP
SNMP
 
Ch 20 UNICAST ROUTING SECTION 2
Ch 20   UNICAST ROUTING  SECTION  2Ch 20   UNICAST ROUTING  SECTION  2
Ch 20 UNICAST ROUTING SECTION 2
 
Avl trees
Avl treesAvl trees
Avl trees
 
Routing Information Protocol (RIP)
Routing Information Protocol (RIP)Routing Information Protocol (RIP)
Routing Information Protocol (RIP)
 
Pipelining slides
Pipelining slides Pipelining slides
Pipelining slides
 
Distance Vector Routing
Distance Vector RoutingDistance Vector Routing
Distance Vector Routing
 
Rip presentation
Rip presentationRip presentation
Rip presentation
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
04 brute force
04 brute force04 brute force
04 brute force
 
Ryu sdn framework
Ryu sdn framework Ryu sdn framework
Ryu sdn framework
 
strassen matrix multiplication algorithm
strassen matrix multiplication algorithmstrassen matrix multiplication algorithm
strassen matrix multiplication algorithm
 
Synchronization Pradeep K Sinha
Synchronization Pradeep K SinhaSynchronization Pradeep K Sinha
Synchronization Pradeep K Sinha
 
Routing Protocols for Wireless Sensor Networks
Routing Protocols for Wireless Sensor NetworksRouting Protocols for Wireless Sensor Networks
Routing Protocols for Wireless Sensor Networks
 
IntServ & DiffServ
IntServ & DiffServIntServ & DiffServ
IntServ & DiffServ
 
13 Amortized Analysis
13 Amortized Analysis13 Amortized Analysis
13 Amortized Analysis
 
Routing
RoutingRouting
Routing
 

More from Chandan Thakur

Quality improvement paradigm (QIP)
Quality improvement paradigm (QIP)Quality improvement paradigm (QIP)
Quality improvement paradigm (QIP)Chandan 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
 

More from Chandan Thakur (6)

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)
 
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)
 

Recently uploaded

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Recently uploaded (20)

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

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