26
Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park [email protected] r 2006. 11. 29.

Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park [email protected] 2006. 11. 29

Embed Size (px)

Citation preview

Page 1: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

Peer to Peer

A Survey and comparison of peer-to-peer overlay network schemesAnd so on…

Chulhyun [email protected]

2006. 11. 29.

Page 2: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

2 / 26

Contents

Introduction to P2P Structured scheme Unstructured scheme Conclusion

Page 3: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

3 / 26

Introduction to P2P Peer to Peer

Server-client?

Page 4: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

4 / 26

Introduction to P2P

Overlay?

Page 5: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

5 / 26

Introduction to P2P

Peer-to-peer overlay network Distributed systems No hierarchical organization No centralized control Overlayed on the IP Robust wide-area routing Efficient searching Storing, Selecting, Scalability, …

Page 6: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

6 / 26

Introduction to P2P (cont’d)

Page 7: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

7 / 26

Introduction to P2P (cont’d)

Distributed hash table Decentralized Scalability Fault tolerance

Page 8: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

8 / 26

Introduction to P2P (cont’d)

Structured P2P overlay networks Network topology is tightly controlled Use distributed hash table as a substrate

Unstructured P2P overlay networks Each peers doesn’t know about whole

network topology

Page 9: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

9 / 26

Contents

Introduction to P2P Structured scheme

Pastry Chord P-Grid

Unstructured scheme Conclusion

Page 10: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

10 / 26

Structured schemePastry

General substrate of p2p application Self-organizing, decentralized,

scalable

128-bit node ID for each node ┌Log2^bN┐ step routing

Page 11: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

11 / 26

Structured schemePastry – Node state Routing table

Entry (n,i) shares first n digits and (n+1)th digit is i

Leaf set Numerically closest of nodeID

Neighborhood set Closest in IP network

Page 12: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

12 / 26

Structured schemePastry – Routing, Join, Failure Routing

Leaf set matching Longest prefix matching in routing table

Join Assumption : new peer A knows a nearby peer X Join message routed to numerically closest peer Z

Each row of routing table constructed along the path Leaf of Z is almost same as that of A Neighbor of X is almost same as that of A

Failure or Departure Recursive recovery

Page 13: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

13 / 26

Structured schemeChord

Scalable, distributed, self-organizing Node and keys are distributed on the

identifier circle

Node/Key identifier : hashing Consistent hashing

Page 14: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

14 / 26

Structured schemeChord – Identifier circle / finger table

Key identifiers are stored in its successor node Lookup on successors

Finger table provides faster lookup Keep entry of 2nth

successors Add scalability

A Chord identifier circle with 3 nodes (0, 1, 3) and 3 keys (1, 2, 6)

A Chord finger table for previous identifier circle

Page 15: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

15 / 26

Structured schemeChord – join / stablization

Join Initialize finger and predecessor Update other nodes’ fingers

Stabilization A problem with inconsistent finger table

may arise when concurrent join occurs Predecessor and Successor of each node

will be corrected by stabilization

Page 16: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

16 / 26

Structured schemeP-Grid

Scalable access structure for P2P apps

Perfectly decentralized Tree structure

Every nodes is responsible for an interval in the key space There may be replica

Page 17: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

17 / 26

Structured schemeP-Grid – access structure

Search can be started at any peer Prefix-based

routing

Page 18: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

18 / 26

Structured schemeP-Grid – construction

Construction is locally executed Nodes meet each other in many ways

Access structure, other operations, and so on

Exact join operation is based on the shared prefix Same prefix : divide coverage Prefix relationship : extends shorter prefix Share prefix : reference exchange

Page 19: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

19 / 26

Contents

Introduction to P2P Structured scheme Unstructured scheme

Napster Gnutella FastTrack

Conclusion

Page 20: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

20 / 26

Unstructured schemeNapster

1st generation of P2P network Purpose to share ‘Music’ files

Centralized search Single index server (no data in the

server) File transfer is distributed (p2p)

Copyright?

Page 21: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

21 / 26

Unstructured schemeNapster

S

S

S

P

P

PPP

P

Client machines (“Peers”)

napster.com Servers

Store their ownfiles

Store a directory, i.e., filenames with peer pointers

Figure from the slides of I. Gupta

Page 22: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

22 / 26

Unstructured schemeGnutella Flat topology, Decentralized Join

No specification in the protocol Pre-existing address,

cached or known server, IRC, ….

Search Query flooding Flooding range : TTL

File transfer HTTP GET request

Page 23: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

23 / 26

Unstructured schemeGnutella

Message Randomly generated identifier Cached to drop duplicated messages

Message type Group membership (Ping and Pong) Search (Query and QueryHit) File transfer for Filewalled servant (Push)

Page 24: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

24 / 26

Unstructured schemeFastTrack

Super-peer High bandwidth and

computing power Collects meta-data Process queries

HTTP file transfer Directly from other

peer Hash may be used to

receive files from multiple sources

Page 25: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

25 / 26

Conclusion

Various P2P network schemes Many improved aspects from traditional

server-client model Structured – Pastry, Chord, P-grid, … Unstructured – Gnutella, Napster, …

Legal issue?

Page 26: Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park chpark@mmlab.snu.ac.kr 2006. 11. 29

26 / 26

References Eng Keong Lua, et el., A survey and comparison of peer-to-peer

overlay network schemes, IEEE COMM. Survey and tutorial on 2004

K. Aberer, P-Grid : A self-organizing access structure for P2P information systems, Proc. of 6th CoopIS

A. Rowstron, P. Druschel, Pastry : Scalable, decentralized object location and routing for large-scale peer-to-peer systems, Proc. of 18th ICDSP

I. stoica, et el., Chord : A scalable peer-to-peer lookup service for internet applications, SIGCOMM ’01

http://www.wikipedia.org The Gnutella Protocol Specification v0.4 And so on…