1 / 15

Node Lookup in P2P Networks

Node Lookup in P2P Networks. Node lookup in p2p networks. In a p2p network, each node may provide some kind of service for other nodes and also will ask other node for service. The problem is to locate a node who provides the service I need.

dasan
Download Presentation

Node Lookup in P2P Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Node Lookup in P2P Networks

  2. Node lookup in p2p networks • In a p2p network, each node may provide some kind of service for other nodes and also will ask other node for service. • The problem is to locate a node who provides the service I need. • In our project there is a central server who assigns nodes to others.

  3. Node lookup in p2p networks • P2P networks may have a very large number of nodes, such that a single central server may not be able to handle. • Besides, there are legal issues. • So, how to design lookup mechanism, such that I can find the node providing the service I need? • For simplicity, let’s use the same model as in our project – Each node may have some files, and the job is to find a node with the file I need.

  4. Node lookup in p2p networks • Any suggestions? • Ask the nodes in the network one-by-one? • Flood the network? • Flooding means everyone will be asking everyone

  5. Node lookup in p2p networks • Two costs we have to consider. • The lookup time • The number of messages sent • Assume that there is only one node with the file I need, what is the cost for • Linear search? • Flood? • Are they any good?

  6. The key idea • There is really not so much we can do if the network does not have a structure. • Introduce structure to the network. • Distributed Hash Table (DHT).

  7. Chord • Each node has a unique ID • By hashing its IP address by SHA-1 to get a 160-bit ID. • Each file also has a unique ID, called key. • By hashing the file name by SHA-1 to get a 160-bit ID.

  8. Chord • Successor of a key x or ID x. • Arrange the node as a circle. Start at x and travel clockwise. The first (real) node we visit is the successor of F. • The predecessor can be similarly defined.

  9. Chord • successor(F) is the node in charge of telling other people where to get F. • If a node has file F, it tells successor(F) that it has F. • So, if we can find successor(F), meaning that the IP address of it, we are done.

  10. Chord • How to find successor(F)? • Any suggestions?

  11. Chord • You know your location on the circle. You know the location of F on the circle. • If every node keeps the IP address of its neighbor on the circle, need to do a linear search.

  12. Chord • But we control what nodes should remember. • What do we want the nodes to remember, such that the searching time is small and the number of message is small?

  13. Chord • What Chord does is this. • remembering the successors of m locations if the node ID and key are m bits. • Consider a node with ID k. The ith entry of its Finger Table is the IP address of the successor of k+2i mod 2m. • Given this, how do you design the routing algorithm?

  14. Chord • Start with k as the routing point (RP). • If RP < F < successor(RP), successor(RP) = successor(F) and we are done. • Else, let the next RP be the one in the RP’s finger table that is the closest predecessor of F. Repeat.

  15. Chord • Chord needs O(m) routing steps. • The reason is every time, roughly speaking, the distance from the RP to the key is at least halved. • WLOG, suppose the current RP is 0, and F is between 2i and 2i+1. So if there is at least one valid node between 2i and F, we will go to such a node, distance is halved.

More Related