peer to peer network schemes and finding algorithms
TRANSCRIPT
![Page 1: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/1.jpg)
Searching in P2P networksMohamed Elsharnouby - Istanbul Sehir University
![Page 2: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/2.jpg)
P2P networks
Structured:
- CAN- Chord- Tapestry- Pastry- Viceroy
Unstructured:
- Freenet- Gnutella- BitTorrent
![Page 3: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/3.jpg)
Structured
Pros:
- Can search any resource even if rare- Search is more efficient as it exploits the
structure
Cons:
- Not very robust and resilient as unstructured
- Overhead of maintaining the structure with joining and leaving peers
Pros:
- More resilient to failures- Better handling of joining/leaving peers- Allow better optimization of routing by
changing the overlay structure
Cons:
- Rare resources are harder to find if found at all
- Searching can flood and overload the whole network
Unstructured
![Page 4: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/4.jpg)
Search in Structured Networks
![Page 5: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/5.jpg)
Content Addressable Network (CAN)
![Page 6: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/6.jpg)
CAN
Multidimensional Cartesian coordinate space on a multi-torus
Each peer has a neighbour list
Routing performance is O( × N1/ )
![Page 7: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/7.jpg)
CAN
Joining: by splitting an existing peer’s zone into half
Neighbour list: transferred from the old peer - updated for all neighbouring peers
Leaving: a neighboring peer takes over its space and the neighbour lists are updated
![Page 8: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/8.jpg)
CAN improvement
Multiple coordinate spaces (realities) with different place for each peer, same place for data
Increasing dimensions: gives better routing. But both are needed
Overloading zones: more data availability - fault tolerance - shorter routing
Topological awareness of IP network
Using multiple hash functions: increases data availability
![Page 9: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/9.jpg)
Chord
![Page 10: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/10.jpg)
Chord
Peers are organized around a circle according to their ID which is an m-bit ID assigned by a uniform hashing function
Each data item is assigned an ID on the same circle and assigned to its successor peer
Routing takes O(log N) if peer information is up to date
![Page 11: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/11.jpg)
Chord
Each peer carries a finger table for info of peers which are successors of IDs that increase by a power [ hence the O(log N) routing ]
Resilience is increased by maintaining another list of length r of the peer’s direct successors
Joining and leaving: needs successor keys to be updated which is done by a stabilization protocol that runs periodically in the background
![Page 12: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/12.jpg)
Chord
It needs O(log N) for routing, much better than CAN
Needs O(log2 N) which is worse than CAN which requires O(2 x d)
Could make some use of CAN improvements ideas as multiple realities
Cannot take into account IP topology
![Page 13: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/13.jpg)
Tapestry
![Page 14: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/14.jpg)
Tapestry
The nth peer that the message reaches shares a suffix of at least length n with destination ID
Routing takes O(logb N) where b is the base of IDs
Uses multiple roots for each data object to avoid single points of failure
Robustness is increased by making the neighbour map maintain two backup peers in addition to the primary ones
![Page 15: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/15.jpg)
Pastry
![Page 16: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/16.jpg)
Pastry
Same as Tapestry
Doesn’t have optimization for locality of peers
Less efficient replication algorithm
![Page 17: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/17.jpg)
Viceroy
![Page 18: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/18.jpg)
Viceroy
- General Ring: every node is connected to its successor and predecessor
- Level Ring: every node is connected to others on ring
- Butterfly: every level L:- Down right edge that is
added to a long range- Down left edge to close
range- Up edge to close range
Routing performance is O(log N)
![Page 19: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/19.jpg)
Search in Unstructured Networks
![Page 20: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/20.jpg)
Freenet
![Page 21: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/21.jpg)
Freenet
It uses Steepest Ascent Hill Climbing with backtracking algorithm
It caches the found file in the path peers => improvement of routing
Anonymity is one of the main properties of the network
Least Recently Used (LRU) is the basic cache replacement algorithm
An enhanced algorithm for cache replacement could be used for cache replacement
![Page 22: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/22.jpg)
Freenet
Enhanced-clustering with Random Shortcut
It uses the concept of small world by choosing the farthest node in the cache
If the new added node is closer it replaces in the cache
If it’s farther with a certain probability it replaces
The choice of optimum is still an open question
![Page 23: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/23.jpg)
Gnutella
![Page 24: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/24.jpg)
Gnutella
Routing through the network is mainly done by flooding (BFS) with certain TTL and limit of hops
This causes high overload of the network when too many nodes join
To join a client connects to one of the peers and broadcasts its content by flooding as well
A concept of ultra peers with higher bandwidth is introduced to carry the network routing and search operations for its leaves
![Page 25: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/25.jpg)
BitTorrent
![Page 26: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/26.jpg)
BitTorrent
A centralized P2P system
It cuts files into pieces of fixed size (256 Kbytes each) and hashes them with SHA1 to confirm integrity of data
A client needs to connect to Tracker that gives the client a set of random peers having the file needed
A downloaded piece could be seeded
DHT introduced trackerless BitTorrent
![Page 27: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/27.jpg)
Questions?
![Page 28: Peer to peer network schemes and finding algorithms](https://reader033.vdocument.in/reader033/viewer/2022052705/58ec11031a28ab28338b46cb/html5/thumbnails/28.jpg)
Thank you