P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients...
-
Upload
rudolf-gilmore -
Category
Documents
-
view
226 -
download
1
Transcript of P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients...
![Page 1: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/1.jpg)
P2P Networking
2011
![Page 2: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/2.jpg)
Client/Server Architecture
GET /index.html HTTP/1.0
HTTP/1.1 200 OK ...
Clients
Server
2/66
![Page 3: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/3.jpg)
Peer-to-Peer Architecture
Peers3/66
Gateway Server
![Page 4: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/4.jpg)
Server-based architecture Client-Server / Server-Cluster Problems:
Limited resources All loads are centered on the server
Server-based architecture has low scalability. The setup and maintenance cost is high.
Peer-to-Peer (P2P) architecture Advantages:
Distributing loads to all users Users consume and provide resources
P2P architecture has high scalability. The setup and maintenance cost is low.
The architectures
![Page 5: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/5.jpg)
The Client Side
Today’s clients can perform more roles than just forwarding users requests
Today’s clients have:more computing powermore storage space
Thin client Fat client
5/66
![Page 6: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/6.jpg)
Evolution at the Client Side
IBM 8-bit PC @ 4.77MHz
360k diskettes
64-bit PC @ 4-core 4GHz750GB HD
DEC’S VT100No storage
‘70 ‘80 2011
6/66
![Page 7: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/7.jpg)
What Else Has Changed?
The number of home PCs is increasing rapidly Most of the PCs are “fat clients” As the Internet usage grow, more and more PCs
are connecting to the global net Most of the time PCs are idle
How can we use all this?
7/66
Peer-to-Peer (P2P)
![Page 8: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/8.jpg)
What is peer-to-peer (P2P)? “Peer-to-peer is a way of structuring
distributed applications such that the individual nodes have symmetric roles. Rather than being divided into clients and servers each with quite distinct roles, in P2P applications a node may act as both a client and a server.”-- Charter of Peer-to-peer Research Group, IETF/IRTF, June 24, 2004(http://www.irtf.org/charters/p2prg.html)
8/66
![Page 9: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/9.jpg)
Resources Sharing
What can we share? Computer-related resources
Shareable related-computer resources: CPU cycles - seti@home, GIMPS Bandwidth - PPLive, PPStream Storage Space - OceanStore, Murex Data - Napster, Gnutella People - Buddy Finder Camera, Microphone, Sensor, Service???
9/66
![Page 10: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/10.jpg)
SETI@Home
SETI – Search for Extra-Terrestrial Intelligence
@Home – On your own computer A radio telescope in Puerto Rico scans the
sky for radio signals Fills a DAT tape of 35GB in 15 hours That data have to be analyzed
10/66
![Page 11: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/11.jpg)
SETI@Home - Example
![Page 12: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/12.jpg)
12/51
![Page 13: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/13.jpg)
13/51
![Page 14: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/14.jpg)
14/51
![Page 15: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/15.jpg)
15/51
![Page 16: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/16.jpg)
16/51
![Page 17: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/17.jpg)
17/51
![Page 18: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/18.jpg)
18/51
![Page 19: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/19.jpg)
19/51
![Page 20: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/20.jpg)
MUREX: A Mutable Replica Control Scheme for Peer-to-Peer Storage Systems
Jehn-Ruey Jiang
ACN Lab NCU
![Page 21: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/21.jpg)
Murex: Basic Concept
HotOSAttendee
![Page 22: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/22.jpg)
Peer-to-Peer Video Streaming
22/66
… …Video stream
![Page 23: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/23.jpg)
23/51
![Page 24: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/24.jpg)
24/51
![Page 25: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/25.jpg)
25/51
Napster -- Shawn Fanning
![Page 26: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/26.jpg)
26/51
![Page 27: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/27.jpg)
27/51
![Page 28: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/28.jpg)
28/51
![Page 29: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/29.jpg)
Napster Sharing Style: hybrid center+edge
“slashdot”•song5.mp3•song6.mp3•song7.mp3
“kingrook”•song4.mp3•song5.mp3•song6.mp3
•song5.mp3
1. Users launch Napster and connect to Napster server
3. beastieboy enters search criteria
4. Napster displays matches to beastieboy
2. Napster creates dynamic directory from users’ personal .mp3 libraries
Title User Speed song1.mp3 beasiteboy DSLsong2.mp3 beasiteboy DSLsong3.mp3 beasiteboy DSLsong4.mp3 kingrook T1song5.mp3 kingrook T1song5.mp3 slashdot 28.8song6.mp3 kingrook T1song6.mp3 slashdot 28.8song7.mp3 slashdot 28.8
5. beastieboy makes direct connection to kingrook for file transfer
s o n g 5
“beastieboy”•song1.mp3•song2.mp3•song3.mp3
![Page 30: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/30.jpg)
History of Napster
5/99: Shawn Fanning (freshman, Northeastern University) founds Napster Online (supported by Groove)
12/99: First lawsuit 7/01: simultaneous online users 160K 6/02: file bankrupt … 10/03: Napster 2 (Supported by Roxio) (users
should pay $9.99/month)
30/66
![Page 31: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/31.jpg)
Gnutella -- Justin Frankel and Tom Pepper
31/66
![Page 32: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/32.jpg)
The ‘Animal’ GNU
Gnutella =
GNU: Recursive AcronymGNU’s Not Unix ….
+
Nutella: a hazelnut chocolate spread produced by the Italian
confectioner Ferrero ….
GNU
Nutella
![Page 33: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/33.jpg)
33/51
GNUGNU's Not Unix 1983 Richard Stallman (MIT) established Free Software Foundation and Proposed GNU ProjectFree software is not freewareGPL: GNU General Public License
![Page 34: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/34.jpg)
Gnutella History Gnutella was written by Justin Frankel, the
21-year-old founder of Nullsoft. (Nullsoft acquired by AOL, June 1999) Nullsoft (maker of WinAmp) posted Gnutella
on the Web, March 14, 2000. A day later AOL yanked Gnutella, at the
behest of Time Warner. Too late: 23k users on Gnutella People had already downloaded and shared
the program. Gnutella continues today, run by independent
programmers.34/66
![Page 35: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/35.jpg)
Gnutella ProtocolScenario: Joining Gnutella Network
A
Gnutella Network The new node connects to a
well known ‘Anchor’ node or ‘Bootstrap’ node.
Then sends a PING message to discover other nodes.
PONG messages are sent in reply from hosts offering new connections with the new node.
Direct connections are then made to the newly discovered nodes.
NewPING
PINGPING
PINGPING
PINGPING
PINGPING
PING
PONG
PONG
35/66
![Page 36: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/36.jpg)
36/51
Peer-to-Peer Overlay Network
Focus at the application layer
![Page 37: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/37.jpg)
37/51
Peer-to-Peer Overlay Network
Internet
End systems
one hop(end-to-end comm.)
a TCP thru the Internet
![Page 38: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/38.jpg)
38/51
Topology of a Gnutella Network
![Page 39: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/39.jpg)
xyz.mp3 ?
Gnutella: Issue a Request
![Page 40: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/40.jpg)
Gnutella: Flood the Request
![Page 41: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/41.jpg)
xyz.mp3
Gnutella: Reply with the FileFully distributed storage and directory!
![Page 42: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/42.jpg)
42/51
So Far
Centralized :
- Directory size – O(n)
- Number of hops – O(1) Flooded queries:
- Directory size – O(1)
- Number of hops – O(n)
n: number of participating nodes
![Page 43: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/43.jpg)
43/51
We Want
Efficiency : O(log(n)) messages per lookup
Scalability : O(log(n)) state per node Robustness : surviving massive
failures
![Page 44: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/44.jpg)
44/51
How Can It Be Done?
How do you search in O(log(n)) time?Binary search
You need an ordered array How can you order nodes in a network and data
objects? Hash function!
![Page 45: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/45.jpg)
45/51
Example of Hasing
Shark SHA-1
Object ID (key):DE11AC
SHA-1
Object ID (key):AABBCC
194.90.1.5:8080
![Page 46: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/46.jpg)
46/51
Basic Idea
Hash key
Object “y”
Objects have hash keys
Peer “x”Peer nodes also have hash keys in the same hash space
P2P Network
y xH(y) H(x)
Join (H(x))
Publish (H(y))
Place object to the peer with closest hash keys
![Page 47: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/47.jpg)
47/51
Mapping an object to the closest node with a larger key
0 M
- an data object
- a node
![Page 48: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/48.jpg)
48/51
Viewed as a Distributed Hash Table
Hashtable
0 2128-1
Peernode
Internet
![Page 49: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/49.jpg)
49/51
DHT Distributed Hash Table Input: key (file name)
Output: value (file location) Each node is responsible for a range of the hash
table, according to the node’s hash key. Objects’ directories are placed in (managed by) the node with the closest key
It must be adaptive to dynamic node joining and leaving
![Page 50: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/50.jpg)
50/51
How to Find an Object?
Hashtable
0 2128-1
Peernode
![Page 51: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/51.jpg)
51/51
Simple Idea Track peers which allow us to move quickly
across the hash space a peer p tracks those peers responsible for hash keys
(p+2i-1), i=1,..,m
Hashtable
0 2128-1
Peernode
i+22 i+24 i+28i
![Page 52: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/52.jpg)
52/46
Chord Lookup – with finger tableStart Int. node
2+1 [3,4) 3
2+2 [4,6) 7
2+4 [6,10) 7
2+8 [10,2) 10
12
14 2
10
15 1
3
7
I’m node 2.Please find key 14!
Start Int. node
10+1 [11,12) 12
10+2 [12,14) 12
10+4 [14,2) 14
10+8 [2,10) 2
O(log n) hops (messages)for each lookup!!
14 [10,2)∈
14 [14,2)∈
Circular 4-bitID space
O(log n) states per node
![Page 53: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/53.jpg)
53/51
Hybrid P2P – Preserves some of the traditional C/S architecture. A central server links between clients, stores indices tables, etc Napster
Unstructured P2P – no control over topology and file placement Gnutella, Morpheus, Kazaa, etc
Structured P2P – topology is tightly controlled and placement of files are not random Chord, CAN, Pastry, Tornado, etc
Classification of P2P systems
![Page 54: P2P Networking 2011. Client/Server Architecture GET /index.html HTTP/1.0 HTTP/1.1 200 OK... Clients Server 2/66.](https://reader034.fdocuments.net/reader034/viewer/2022051214/56649e2e5503460f94b1f031/html5/thumbnails/54.jpg)
54/51
Q&A