1 / 113

Peer-to-Peer Networks

Peer-to-Peer Networks. 0. 1. Christian Scheideler Institut f ür Informatik Technische Universität München. Motivation. Every distributed system must be based on a network interconnecting its sites Network: of physical or logical nature. Physical Network.

kring
Télécharger la présentation

Peer-to-Peer 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. Peer-to-Peer Networks 0 1 Christian Scheideler Institut für Informatik Technische Universität München

  2. Motivation • Every distributed system must be based on a network interconnecting its sites • Network: of physical or logical nature

  3. Physical Network Supercomputers, multicore systems,…

  4. Logical Network Internet

  5. Overlay Network Internet

  6. Overlay Network

  7. Overlay Network Basic question: how to organize sites in a scalable and robust overlay network???

  8. Overview • Graph Theory • Supervised and Peer-to-Peer Overlay Networks • Continuous-Discrete Approach • Maintaining a robust Cycle • Skip Graphs • Locality-aware Overlay Networks • Networks for non-uniform Peers

  9. Graph theory Graph G=(V,E): • V: set of nodes / vertices • E ½ { (v,w) | v,w 2 V}: set of edges / arcs v knows w v can send info to w valid path D B C A

  10. D B C A Graph theory • (v,w): distance (length of shortest path) of w to v in G • D=maxv,w(v,w): diameter of G D=4

  11. Graph theory • (U): set of neighbors of node set U • (U)=|(U)| / |U| • (G) = minU,|U|<|V|/2(U): expansion of G D B C A |U|=2 U |(U)|=1

  12. Graph theory NetworkG=(V,E,c): • V: set of nodes, E: set of edges • c:E ! IR+: edge capacities 2 D B C A

  13. Graph Theory Unless mentioned otherwise: • All edges have capacity 1 • {v,w} represents {(v,w), (w,v)} D B C A

  14. Network topologies Ideally, complete network: Problem: does not scale well! (~n2 edges)

  15. Line Network • degree 2 (optimal), BUT • diameter bad (n-1 for n nodes) • expansion bad ( (line) = 2/n ) How to get a low diameter?

  16. Binary Tree • n=2k+1-1 nodes, degree 3 • diameter is k = 2 log2 n, BUT • expansion is still bad ( (tree)=2/n ) 0 depth k k

  17. 2-dimensional Grid • n = k2 nodes, maximum degree 4 • diameter is 2(k-1) < 2 n • expansion is ~2/ n • Not too bad, but can we get better values? 1 side length k k

  18. Hypercube • Nodes: (x1,…,xd) 2 {0,1}d • Edges: 8 i: (x1,…,xd) ! (x1,..,1-xi,..,xd) d=1 d=2 d=3 Degree d, diameter d, expansion 1/ d Routing: (x1,x2,…,xd) ! (y1,x2,…,xd) ! (y1,y2,x3,…,xd) ! … ! (y1,y2,…,yd)

  19. Butterfly • Nodes: (k,(xd,…,x1)) 2 {0,..,d} £ {0,1}d • Edges: (k-1,(xd,…,x1)) ! (k,(xd,..,xk,..,x1)) (k,(xd,..,1-xk,..,x1)) Degree 4, diameter 2d, expansion ~1/d 00 01 10 11 0 1 0 0 1 1 2 Routing: (0,(x1,x2,…,xd)) ! (1,(y1,x2,…,xd)) ! (2,(y1,y2,x3,…,xd)) ! … ! (d,(y1,y2,…,yd))

  20. Cube-Connected-Cycles • Nodes: (k,(x1,…,xd)) 2 {0,..,d-1} £ {0,1}d • Edges: (k,(x1,…,xd)) ! (k-1,(x1,...,xd)) (k+1,(x1,..,xd)) (k,(x1,..,1-xk+1,..,xd)

  21. De Bruijn Graph • Nodes: (x1,…,xd) 2 {0,1}d • Edges: (x1,…,xd) ! (0,x1,…,xd-1) (1,x1,…,xd-1) 01 001 011 010 101 00 11 000 111 10 100 110 (x1,…xd) ! (yd,x1,…xd-1) ! (yd-1,yd,x1,…,xd-2) ! …

  22. The Diameter Theorem: Every graph of maximum degree d>2 and size n must have a diameter of at least (log n)/(log(d-1))-1. Theorem: For every even d>2 there is a family of graphs of maximum degree d and size n with diameter (log n)/(log d -1). tree of all reachable nodes at dist. k

  23. The Expansion Theorem: For every graph G the expansion (G) is at most 1. Theorem: There are families of constant degree graphs with constant expansion. Example: Gabber-Galil Graph • Node set: (x,y) 2{0,…,n-1}2 • (x,y) ! (x,x+y),(x,x+y+1), (x+y,y), (x+y+1,y) (mod n)

  24. Overview • Graph Theory • Supervised and Peer-to-Peer Overlay Networks • Continuous-Discrete Approach • Maintaining a robust Cycle • Skip Graphs • Locality-aware Overlay Networks • Networks for non-uniform Peers

  25. Overlay Network Basic question: how to organize sites in a scalable and robust overlay network??? Robustness: can handle faults and malicious behavior Scalability: works efficiently for large number of sites

  26. Server-based approach Internet server Does not scale well! sites

  27. Alternatives Supervised overlay network Peer-to-peer overlay network Supervisor assists in maintaining network Peers maintain network themselves

  28. Overlay Network Problem: How to maintain an overlay network as peers join and leave?

  29. Supervised Overlay Network • Supervisor assigns peers to points in [0,1) so that peers evenly distributed • Neighboring peers connect to form cycle 1 0 0 7/8 1/8 1/4 3/4 3/8 5/8 1/2

  30. Supervised Overlay Network • Node v wants to join (n nodes in system):give it (n+1)th position • Node w wants to leave:move last node v to w‘s position 1 0 v w

  31. Supervised Overlay Network • v: node at nth position • supervisor: stores pred(v), v, succ(v), succ(succ(v)) • join and graceful leave operation: 1 0 v

  32. Pure Peer-to-Peer Network We also focus on [0,1). Every peer mapped to random point in [0,1). Peers form cycle based on points. • Chord: cryptographic hash function • CAN: random number 0 1 v

  33. Continuous-Discrete Approach Problem: cycle not a good routing topology! 1 0 long paths!

  34. Overview • Graph Theory • Supervised and Peer-to-Peer Overlay Networks • Continuous-Discrete Approach • Maintaining a robust Cycle • Skip Graphs • Locality-aware Overlay Networks • Networks for non-uniform Peers

  35. Continuous-discrete Approach • V: set of peers, U: virtual space • Each v 2 V mapped to regionR(v) ½ U • Family F of functionsf:U ! U • {v,w} edge ,[F(R(v)) Å R(w)] [ [F(R(w)) Å R(v)] = ;

  36. Continuous-discrete Approach Basic questions: • How to map peers to regions? • What family F to choose?

  37. Continuous-discrete Approach • Take a classical family of networks(Hypercube, de Bruijn graph,…) • Convert it into continuous form by interpreting node labels as points in U,edges as a family of functions F • Mapping peers to regions will then convert continuous form back into discrete graph.

  38. Hypercube Classical hypercube: • V: nodes with labels (x1,…,xd) 2 {0,1}d • For all i: (x1,…,xd) ! (x1,..,1-xi,..,xd) Continuous version of hypercube: • Interpret (x1,…,xd) as z=i xi/2i • d !1: U=[0,1) • F: fi+(x) = x+1/2i, fi-(x) = x-1/2i8 i>0

  39. De Bruijn Graph Classical de Bruijn graph: • V: nodes with labels (x1,…,xd) 2 {0,1}d • E: (x1,…,xd) ! (0,x1,…,xd-1), (1,x1,…,xd-1) Continuous de Bruijn graph: • Interpret (x1,…,xd) as z=i xi/2i • d !1: U=[0,1) • F: f0(x) = x/2, f1(x) = (1+x)/2

  40. Gabber-Galil Graph Classical Gabber-Galil graph: • Node set: (x,y) 2{0,…,n-1}2 • (x,y) ! (x,x+y),(x,x+y+1), (x+y,y), (x+y+1,y) (mod n) Continuous Gabber-Galil graph: • n !1: U=[0,1)2 • F: f1(x,y)=(x,x+y), f2(x,y)=(x+y,y)

  41. Continuous-discrete Approach • Take a classical family of networks(Hypercube, de Bruijn graph,…) • Convert it into continuous form by interpreting node labels as points in U,edges as a family of functions F • Mapping peers to regions will then convert continuous form back into discrete graph.

  42. Supervised Overlay Network • How to map peers to regions? • Consider any space U=[0,1)d • Hierarchical decomposi-tion tree:

  43. Supervised Overlay Network 0 1 000 001 01 10 11

  44. Supervised Overlay Network Fact: • Volumes of subcubes assigned to nodes differ by factor of at most 2. • Subcubes pairwise disjoint. • Union of subcubes gives U. Combine this with family F of functions.

  45. Join Operation w v 0 1 000 001 010 01 011 10 11

  46. Join Operation 000 001 10 f R(v) R(v) R(w) 11 f’ {u,v} edge ,[F(R(u)) Å R(v)] [ [F(R(u)) Å R(v)] = ;

  47. Join Operation w inherits connections from v w v 0 1 000 001 010 01 011 10 11

  48. Leave Operation v inherits connections from w v w 0 1 000 00 001 01 10 11

  49. Supervised Overlay Network For any supervised network based on continuous-discrete approach with[0,1)d: • Sufficient if supervisor introduces new peer to cycle neighbors. From these, new peer can get allF-connections • Join/leave can be performed with constant time and work for supervisor. High robustness: • Sufficient to secure base cycle!

  50. Peer-to-Peer Overlay Network We focus on U=[0,1). Every peer mapped to random point in [0,1). 1 0 v v owns region [v,succ(v))

More Related