![Page 1: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/1.jpg)
1
P2P Computing
![Page 2: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/2.jpg)
2
What is P2P?
Server-Client model
![Page 3: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/3.jpg)
3
What is P2P?Traditional network architecture
![Page 4: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/4.jpg)
4
What is P2P?
Problem with Server-Client Model Scalability
As the number of users increases, there is a higher demand for computing power, storage space, and bandwidth associated with the server-side
Reliability The whole network will depend on the highly loaded server
to function properly
![Page 5: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/5.jpg)
Why P2P?
The Internet has three valuable fundamental assets Information Computing resources Bandwidth
![Page 6: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/6.jpg)
Why P2P?
Hot Spots become hotter,
Yet Cold spots keep cold
Internet
Personal Computers80% idle CPU time
Computers in our Lab99% idle CPU time
!
Yildiray’s Laptop90% idle CPU time
![Page 7: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/7.jpg)
7
What is P2P? A peer in P2P network acts as both a client and
a server in traditional client/server architecture Typical P2P file sharing application
Users publish the file they want to share Users search the needed file by providing a query
Query is sent to other online peers in the network A peer that has local media files matching the query
will return information on how to retrieve the files Users may receive multiple successful responses and
can select the files they want to retrieve The files are down loaded from the remote peer.
![Page 8: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/8.jpg)
8
querymusiccategory
bannerad
3 million users online
sharing 4 PetaBytes of data
KazaaNativeWindowsApplication
![Page 9: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/9.jpg)
9
What is P2P?A pure P2P network architecture
![Page 10: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/10.jpg)
10
What is P2P? A hybrid P2P architecture
![Page 11: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/11.jpg)
11
Peer-to-Peer (P2P) Peer-to-Peer computing is inspired by the controversial music-
sharing service Napster Instead of Internet information being held in a few central locations,
Peer-to-Peer computing makes it theoretically possible to access the files and data residing on every personal computer connected to the Internet
P2P Not P2P
![Page 12: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/12.jpg)
12
Napster, first widely used p2p-applicationThe application: A p2p application for the distribution of mp3 files
Each user can contribute its own content
How it works: Central index server
Maintains list of all active peers and their available content
Distributed storage and download Client nodes also act as file servers All downloaded content is shared
![Page 13: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/13.jpg)
13
File Sharing: Napster
Here is how Napster used to work: It is first necessary to download and install Napster software
and to sign up for a free account at Napster By clicking the Napster icon, a connection is established with
Napster Web site, where the name of the music searched can be entered in a search window
The Napster software tracks all users who are online at that particular time and provides access to tracks stored on users' hard drives
When the song requested is found, Napster establishes a connection between the two computers so that it could be downloaded
However, after the Recording Industry Association of America sued Napster for copyright infringements, the court ruled that Napster was indeed violating copyrights and it is shut down
![Page 14: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/14.jpg)
14
History, motivation and evolution - Napster (cont’d)
Central index server…
peers
Initial join Peers connect to Napster server Transmit current listing of shared
files to server
join
![Page 15: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/15.jpg)
15
History, motivation and evolution - Napster (cont’d)
1) query
2) answer
Content search Peers sends song request to
Napster server Napster server checks song
database and returns list of matched peers
…
peers
Central index server
![Page 16: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/16.jpg)
16
History, motivation and evolution - Napster (cont’d)
1) request2) download…
peers
File retrieval The requesting peer contacts the
peer having the file directly and downloads it
Central index server
1) 2)
![Page 17: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/17.jpg)
17
Napster was the first simple but successful P2P-appliciation. Many others followed…
P2P File Download Protocols: 1999: Napster 2000: Gnutella, eDonkey 2001: Kazaa 2002: eMule, BitTorrent
History, motivation and evolution - File Download
![Page 18: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/18.jpg)
18
P2P is not restricted to file download!
P2P Protocols: 1999: Napster, End System Multicast (ESM) 2000: Gnutella, eDonkey 2001: Kazaa 2002: eMule, BitTorrent 2003: Skype 2004: PPLive Today:TVAnts, PPStream, SopCast… Next: Video-on-Demand, Gaming
File Download
Streaming
Telephony
Video-on-Demand
Gaming
Application type:
History, motivation and evolution - Applications
![Page 19: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/19.jpg)
19
Why is P2P so successful? Scalable – It’s all about sharing resources
No need to provision servers or bandwidth Each user brings its own resource
Eliminating the single-source bottleneck
![Page 20: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/20.jpg)
20
Why is P2P so successful? (cont’d) Cheap - No infrastructure needed Everybody can bring its own content
Homemade content Illegal content But also legal content …
High availability – Content accessible most of time
![Page 21: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/21.jpg)
21
Problems
Some of the providers of leading P2P applications earn revenue from third parties by embedding spyware into the applications
A large amount of polluted or corrupted content has been published in file sharing systems
Copyright problem Free-rider problem
![Page 22: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/22.jpg)
22
P2P-Overlay
Build graph at application layer, and forward packet at the application layer
It is a virtual graph Underlying physical graph is transparent to the
user Edges are TCP connection or simply a entry of an
neighboring node’s IP address The graph has to be continuously maintained
(e.g. check if nodes are still alive)
![Page 23: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/23.jpg)
23
P2P-Overlay (cont’d)
Underlay
Overlay
Source
Source
![Page 24: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/24.jpg)
Basic P2P elements
Peers Each peer has a unique Peer ID Client Server Router
Operations Join/leave File publish File search
24
![Page 25: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/25.jpg)
Principles of the P2P Paradigm Symmetric roles
Peers are function equally Scalable
The network and computing resources used at each peer exhibit a growth rate as a function of overlay size that is less than linear
25
![Page 26: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/26.jpg)
Principles of the P2P Paradigm Autonomous
each peer determines when it joins/makes requests/leaves the overlay
Resource sharing Resource contribution should be mutually
beneficial Resilient
P2P overlays are resilient in the fact of dynamic peer membership
26
![Page 27: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/27.jpg)
27
The P2P enabling technologies Unstructured p2p-overlays
Generally random overlay Structured p2p-overlays
Distributed Hash Tables (DHTs) Super nodes architecture
![Page 28: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/28.jpg)
28
Unstructured p2p-overlays Unstructured p2p-overlays do not really care
how the overlay is constructed Peers are organized in a random graph topology
E.g., new node randomly chooses three existing nodes as neighbors
Build your p2p-service based on this graph Several proposals
Gnutella KaZaA/FastTrack BitTorrent
![Page 29: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/29.jpg)
29
One Example of usage of unstructured overlays
Typical problem in unstructured overlays: How to do content search and query? Flooding
Limited Scope, send only to a subset of your neighbors
Time-To-Live, limit the number of hops per messages
Search “Britney Spears”Example of flooding:(similar to Gnutella)
Found entry!
NotifyUpload
![Page 30: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/30.jpg)
30
Unstructured p2p-overlays (cont’d) Unstructured p2p-overlays are just a framework, you
can build many applications on top of it
Unstructured p2p-overlays pros & cons Pros
Very flexible: copes with node churn Supports complex queries (conversely to structured overlays)
Cons There is a tradeoff between generated traffic (overhead) and
the horizon of the partial view
![Page 31: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/31.jpg)
31
Structured p2p-overlays
Motivation Locate content efficiently
Solution – DHT (Distributed Hash Table) Particular nodes hold particular keys Locate a key: route search request to a particular
node that holds the key Representative solutions
Chord, CAN, Pastry/Tapestry, etc.
![Page 32: 1 P2P Computing. 2 What is P2P? Server-Client model](https://reader036.vdocuments.site/reader036/viewer/2022062321/56649e455503460f94b393c9/html5/thumbnails/32.jpg)
32
Challenges to Structured p2p-overlays Load balance
spreading keys evenly over the nodes. Decentralization
no node is more important than any other. Scalability
Lookup must be efficient even with large systems Peer dynamics
Nodes may come and go, may fail Ensure the node responsible for a key can always
be found.