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

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
 
DNS Attacks
DNS AttacksDNS Attacks
DNS Attacks
 
Skip lists (Advance Data structure)
Skip lists (Advance Data structure)Skip lists (Advance Data structure)
Skip lists (Advance Data structure)
 
Cisco packet tracer dhcp
Cisco packet tracer   dhcpCisco packet tracer   dhcp
Cisco packet tracer dhcp
 
Kademlia introduction
Kademlia introductionKademlia introduction
Kademlia introduction
 
One time pad Encryption:
One time pad Encryption:One time pad Encryption:
One time pad Encryption:
 
Onion routing and tor: Fundamentals and Anonymity
Onion routing and tor: Fundamentals and AnonymityOnion routing and tor: Fundamentals and Anonymity
Onion routing and tor: Fundamentals and Anonymity
 
OSI Veri Bağı Katmanı
OSI Veri Bağı KatmanıOSI Veri Bağı Katmanı
OSI Veri Bağı Katmanı
 
Dsdv
DsdvDsdv
Dsdv
 
Lec1
Lec1Lec1
Lec1
 
Lec7
Lec7Lec7
Lec7
 
Linked list
Linked listLinked list
Linked list
 
Data structure tries
Data structure triesData structure tries
Data structure tries
 
Arp Cache Poisoning
Arp Cache PoisoningArp Cache Poisoning
Arp Cache Poisoning
 
Lec3
Lec3Lec3
Lec3
 
Introduction - Lattice-based Cryptography
Introduction - Lattice-based CryptographyIntroduction - Lattice-based Cryptography
Introduction - Lattice-based Cryptography
 
Lec5
Lec5Lec5
Lec5
 
Lec10
Lec10Lec10
Lec10
 
A Short Review of the NTRU Cryptosystem
A Short Review of the NTRU CryptosystemA Short Review of the NTRU Cryptosystem
A Short Review of the NTRU Cryptosystem
 
8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patil8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patil
 

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

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 

Dernier (20)

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using 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