140 likes | 338 Views
Pastry. Partially borrowed for Gabi Kliot. Pastry. Scalable, decentralized object location and routing for large-scale peer-to-peer systems Antony Rowstron (Microsoft Research) Peter Druschel (Rice University). Distributed Hash Table. Map(Object-Id, Node-Id)
E N D
Pastry Partially borrowed for Gabi Kliot
Pastry • Scalable, decentralized object location and routing for large-scale peer-to-peer systems • Antony Rowstron (Microsoft Research) • Peter Druschel (Rice University)
Distributed Hash Table • Map(Object-Id, Node-Id) • Pastry: ids are mapped to the node with closest node-id • Goal: Reduce space complexity while marinating a reasonable time complexity • Pastry: O(Log(N)) space, O(Log(N)) lookup • Chord – was taught in the lecture… • Pastry Vs. Chord • Different technique – tables, algorithms, etc. • A proximity heuristic
Address Space • 128 bit circular id space • Assumes a random uniform distribution on node-ids • Assumes a random uniform distribution on object-ids • In short, Assumes diversity among correlated ids
Pastry Node State Base: 2b = 4 L closest ids Chosen by proximity Still sharing prefix 2b columns R[r,c] = node with largest matching prefix sized r followed by the digit c Log2b 2128 rows The address space is not full L proximity closest ids (not used for routing)
Lookup Procedure • If (destination is within range of our leaf set) • forward to numerically closest member • else • letl = length of shared prefix • letd = value of l-th digit in D’s address • if (R[l,d] exists) • forward to R[l,d] • else // rare case • forward to a (leaf-set node) such that • (a) shares at least as long a prefix • (b) is numerically closer than this node
Lookup Example d471f1 d467c4 d462ba d46a1c d4213f Look for (d46a1c) d13da3 65a1fc
d467c4 d471f1 d467c4 Proximity space d462ba d46a1c d4213f Route(d46a1c) d13da3 d4213f 65a1fc 65a1fc d462ba d13da3 Proximity Perspective NodeId space • The proximity distance traveled by message in each routing step is exponentially increasing (entry in row l is chosen from a set of nodes of size N/2bl) • The distance traveled by message from its source increases monotonically at each step (message takes larger and larger strides)
Self Organization – Join • Seek (flood) for a nearby node with id A • Obtain neighboring-set from A • Ask A to lookup our id X • Lookup arrives at Z with id closest to X • Obtain leaf-set from Z, why? • Obtain the ith row from the ith node in the lookup traversal to Z, why? • Maintains reasonable proximity still, improve by exchanging information with the neighboring-set
Self Organization – Depart / fail • Leaf-Set • Permanently monitored • Ask • Routing Table • Lazy – When a node doesn’t respond • Complete the table slot from a node in the same row, if not found from higher rows • Neighboring-Set • Permanently monitored and maintained
Performance • Space Complexity O(log(N)) • Time Complexity • Lookup – O(log(N)) Expected • Join – O(log(N)) Expected • Short routes in terms of proximity (not necessarily shortest) • Eventual safe delivery
More Details http://research.microsoft.com/~antr/PAST/pastry.pdf