Presentation is loading. Please wait.

Presentation is loading. Please wait.

 A P2P IRC Network Built on Top of the Kademlia Distributed Hash Table.

Similar presentations


Presentation on theme: " A P2P IRC Network Built on Top of the Kademlia Distributed Hash Table."— Presentation transcript:

1  A P2P IRC Network Built on Top of the Kademlia Distributed Hash Table

2 Overview  History Distributed Hash Tables  IRC  Design  Demo

3 Distributed Hash Tables (DHTs)  Operations  get(key)  put(key, value)  How do you find information in a p2p network?  How do peers locate eachother?  Who’s responsible for what?  Generally decentralized  Fault tolerance is important  Must scale well

4 DHTs– What are they good for?  Web caching and CDNs  Distributed file systems  DNS  Instant messaging  P2P file sharing

5 History of DHTs - Centralized  Napster  Peers sent local files upon join  Central point of failure  Can only grow as much as central server can

6 History of DHTs - Gnutella  Flooding  Avoided central point of failure  O(n) look up  Inefficient  Extensive modification by devs made it much more efficient

7 History of DHTs - Chord  Peers and keys share 160-bit key-space (SHA-1)  Logical ring of keys and peers  successor(k) indicates node responsible for a key k  Each node keeps track of nodes ahead of you in the ring  O(n) look up  Finger table improves look up speed  Peers keep table of m other peers  ith entry contains successor((n+2^(i-1)) mod2^m)  O(logn) look up

8 Kademlia  Peers and keys share 160-bit key-space (SHA-1)  Use XOR to determine distance between peers/keys  Symmetric distance measure  Satisfies triangle inequality  Hashes with long shared prefixes considered close  If local lookup fails, ask peers with IDs closer to key by XOR  O(logn) look up

9 Kademlia  Peers keep up to 160 buckets of peers called k- buckets  Initially one bucket  Buckets split into two once they contain k peers  Peers ping peers in k-buckets and remove stale peers to make room for new peers  How do new peers find out about others?  Bootstrap nodes

10 Kademlia  KRPC protocol  ping(node_id)  find_node(node_id)  If node_id isn’t in your local list, find nodes closer to it than you are (if any) and send find_node(node_id) to them.  get(key)  Keep track of peers already queried. Stop the query once the value is found or no nodes closer to the value is found  put(key,value)  Similar to get(key)

11 IRC  Internet Relay Chat  Servers host channels  Clients connect to servers, join channels and send eachother messages  RFC 2810,2811,2812,2813  RFC 1459

12

13

14

15

16

17

18

19

20


Download ppt " A P2P IRC Network Built on Top of the Kademlia Distributed Hash Table."

Similar presentations


Ads by Google