P2P Course, Structured systems 1 Skip Net (9/11/05)

Slides:



Advertisements
Similar presentations
SkipNet: A Scalable Overlay Network with Practical Locality Properties Nick Harvey, Mike Jones, Stefan Saroiu, Marvin Theimer, Alec Wolman Microsoft Research.
Advertisements

Chapter 5: Tree Constructions
The Dictionary ADT: Skip List Implementation
Pastry Peter Druschel, Rice University Antony Rowstron, Microsoft Research UK Some slides are borrowed from the original presentation by the authors.
Scalable Content-Addressable Network Lintao Liu
Binary Trees CSC 220. Your Observations (so far data structures) Array –Unordered Add, delete, search –Ordered Linked List –??
SKIP GRAPHS Slides adapted from the original slides by James Aspnes Gauri Shah.
The Chord P2P Network Some slides have been borowed from the original presentation by the authors.
B+-Trees (PART 1) What is a B+ tree? Why B+ trees? Searching a B+ tree
1 PASTRY Partially borrowed from Gabi Kliot ’ s presentation.
1 Accessing nearby copies of replicated objects Greg Plaxton, Rajmohan Rajaraman, Andrea Richa SPAA 1997.
Common approach 1. Define space: assign random ID (160-bit) to each node and key 2. Define a metric topology in this space,  that is, the space of keys.
Scribe: A Large-Scale and Decentralized Application-Level Multicast Infrastructure Miguel Castro, Peter Druschel, Anne-Marie Kermarrec, and Antony L. T.
© 2004 Goodrich, Tamassia Skip Lists1  S0S0 S1S1 S2S2 S3S3    2315.
P2P Network Structured Networks (III) Distributed Hash Tables Pedro García López Universitat Rovira I Virgili
Peer to Peer File Sharing Huseyin Ozgur TAN. What is Peer-to-Peer?  Every node is designed to(but may not by user choice) provide some service that helps.
Alex Shraer, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Tutorial 4: SkipNet Spring.
SkipNet: A Scalable Overlay Network with Practical Locality Properties Nick Harvey, Mike Jones, Stefan Saroiu, Marvin Theimer, Alec Wolman Presented by.
SkipNet Christian Schmidt-Madsen, Peter Tiedemann,
SkipNet: A Scalable Overlay Network with Practical Locality Properties Nick Harvey, Mike Jones, Stefan Saroiu, Marvin Theimer, Alec Wolman Microsoft Research.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 13: SkipNet Spring.
Freenet A Distributed Anonymous Information Storage and Retrieval System I Clarke O Sandberg I Clarke O Sandberg B WileyT W Hong.
SkipNet: A Scaleable Overlay Network With Practical Locality Properties Presented by Rachel Rubin CS294-4: Peer-to-Peer Systems By Nicholas Harvey, Michael.
B + -Trees (Part 1) COMP171. Slide 2 Main and secondary memories  Secondary storage device is much, much slower than the main RAM  Pages and blocks.
Weaving a Tapestry Distributed Algorithms for Secure Node Integration, Routing and Fault Handling Ben Y. Zhao (John Kubiatowicz, Anthony Joseph) Fault-tolerant.
Mercury: Supporting Scalable Multi-Attribute Range Queries A. Bharambe, M. Agrawal, S. Seshan In Proceedings of the SIGCOMM’04, USA Παρουσίαση: Τζιοβάρα.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications 吳俊興 國立高雄大學 資訊工程學系 Spring 2006 EEF582 – Internet Applications and Services 網路應用與服務.
Skip Lists1 Skip Lists William Pugh: ” Skip Lists: A Probabilistic Alternative to Balanced Trees ”, 1990  S0S0 S1S1 S2S2 S3S3 
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Tutorial 3: SkipNet Spring.
1 Peer-to-Peer Networks Outline Survey Self-organizing overlay network File system on top of P2P network Contributions from Peter Druschel.
P2P Course, Structured systems 1 Introduction (26/10/05)
“Umbrella”: A novel fixed-size DHT protocol A.D. Sotiriou.
 Structured peer to peer overlay networks are resilient – but not secure.  Even a small fraction of malicious nodes may result in failure of correct.
Binary Trees Chapter 6.
Mobile Ad-hoc Pastry (MADPastry) Niloy Ganguly. Problem of normal DHT in MANET No co-relation between overlay logical hop and physical hop – Low bandwidth,
Roger ZimmermannCOMPSAC 2004, September 30 Spatial Data Query Support in Peer-to-Peer Systems Roger Zimmermann, Wei-Shinn Ku, and Haojun Wang Computer.
Other Structured P2P Systems CAN, BATON Lecture 4 1.
Tapestry GTK Devaroy (07CS1012) Kintali Bala Kishan (07CS1024) G Rahul (07CS3009)
1 Plaxton Routing. 2 Introduction Plaxton routing is a scalable mechanism for accessing nearby copies of objects. Plaxton mesh is a data structure that.
1 PASTRY. 2 Pastry paper “ Pastry: Scalable, decentralized object location and routing for large- scale peer-to-peer systems ” by Antony Rowstron (Microsoft.
Using the Small-World Model to Improve Freenet Performance Hui Zhang Ashish Goel Ramesh Govindan USC.
1 Reading Report 5 Yin Chen 2 Mar 2004 Reference: Chord: A Scalable Peer-To-Peer Lookup Service for Internet Applications, Ion Stoica, Robert Morris, david.
Chapter 11 Indexing & Hashing. 2 n Sophisticated database access methods n Basic concerns: access/insertion/deletion time, space overhead n Indexing 
CCAN: Cache-based CAN Using the Small World Model Shanghai Jiaotong University Internet Computing R&D Center.
Chapter 6 Binary Trees. 6.1 Trees, Binary Trees, and Binary Search Trees Linked lists usually are more flexible than arrays, but it is difficult to use.
© 2006 Pearson Addison-Wesley. All rights reserved13 B-1 Chapter 13 (continued) Advanced Implementation of Tables.
Content Addressable Network CAN. The CAN is essentially a distributed Internet-scale hash table that maps file names to their location in the network.
2-3 Trees, Trees Red-Black Trees
An IP Address Based Caching Scheme for Peer-to-Peer Networks Ronaldo Alves Ferreira Joint work with Ananth Grama and Suresh Jagannathan Department of Computer.
1 More on Plaxton routing There are n nodes, and log B n digits in the id, where B = 2 b The neighbor table of each node consists of - primary neighbors.
1 Searching Searching in a sorted linked list takes linear time in the worst and average case. Searching in a sorted array takes logarithmic time in the.
Pastry: Scalable, decentralized object location and routing for large-scale peer-to-peer systems Antony Rowstron and Peter Druschel, Middleware 2001.
DHT-based unicast for mobile ad hoc networks Thomas Zahn, Jochen Schiller Institute of Computer Science Freie Universitat Berlin 報告 : 羅世豪.
Skip Lists 二○一七年四月二十五日
1 Distributed Hash Table CS780-3 Lecture Notes In courtesy of Heng Yin.
CS 61B Data Structures and Programming Methodology Aug 7, 2008 David Sun.
Peer to Peer Network Design Discovery and Routing algorithms
Author: Haoyu Song, Murali Kodialam, Fang Hao and T.V. Lakshman Publisher/Conf. : IEEE International Conference on Network Protocols (ICNP), 2009 Speaker:
BATON A Balanced Tree Structure for Peer-to-Peer Networks H. V. Jagadish, Beng Chin Ooi, Quang Hieu Vu.
LOOKING UP DATA IN P2P SYSTEMS Hari Balakrishnan M. Frans Kaashoek David Karger Robert Morris Ion Stoica MIT LCS.
2/19/2016 3:18 PMSkip Lists1  S0S0 S1S1 S2S2 S3S3    2315.
1 the BSTree class  BSTreeNode has same structure as binary tree nodes  elements stored in a BSTree are a key- value pair  must be a class (or a struct)
1 Plaxton Routing. 2 History Greg Plaxton, Rajmohan Rajaraman, Andrea Richa. Accessing nearby copies of replicated objects, SPAA 1997 Used in several.
8/3/2007CMSC 341 BTrees1 CMSC 341 B- Trees D. Frey with apologies to Tom Anastasio.
Incrementally Improving Lookup Latency in Distributed Hash Table Systems Hui Zhang 1, Ashish Goel 2, Ramesh Govindan 1 1 University of Southern California.
Peer-to-Peer Networks 05 Pastry Christian Schindelhauer Technical Faculty Computer-Networks and Telematics University of Freiburg.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,
The Chord P2P Network Some slides taken from the original presentation by the authors.
Pastry Scalable, decentralized object locations and routing for large p2p systems.
Accessing nearby copies of replicated objects
Presentation transcript:

P2P Course, Structured systems 1 Skip Net (9/11/05)

P2P Course, Structured systems 2 Introduction Based on Skip Lists What are they? An alternative to binary trees, Binary trees work well with random input but do not work well say when inserting items in order Thus in general, binary trees need to be load balanced Can we avoid load balancing of binary trees by introducing some form of randomness in the load balancing procedure – what if the position (level) of a node in the tree is determined by a random number generator? Skip List: a sorted linked list with extra links

P2P Course, Structured systems 3 Introduction Skip List: a sorted linked list where some nodes have pointers that skip over many list elements, why? How to use the extra pointers: For example, in case (b), as long as you have not reached a node with key > search-key, use level 2 pointers, then use level 1,  n/2  + 1 In general, level = top-level, log n with only doubling while not found, the number of pointers while key > search-key use level level = level – 1 /*use lower level */ n/2 n/4 n/8 n/16

P2P Course, Structured systems 4 Skip List a sorted linked list in which some nodes are supplemented with pointers that skip over many list elements “perfect” Skip List: the height of the ith node is the exponent of the largest power-of-two that divides i. Pointers at level h have length 2 h (i.e., they traverse 2 h nodes). A perfect Skip List supports searches in O(logN) time. Level 0 Level 1 (length 2 1 ) Level 2 (length 2 2 ) Level 3 (length 2 3 )

P2P Course, Structured systems 5 Probabilistic Skip List Insertions and deletions are very expensive A probabilistic scheme for determining node heights while maintaining O(logN) searches with high probability Each node chooses a height such that the probability of choosing height h is 1/2 h. (why? Hint: number of nodes at each level) Thus, with probability ½ a node has height 1, with probability ¼, it has height 2, etc.

P2P Course, Structured systems 6 How to use them in P2P  in-memory data structure link together distributed computer nodes  traversed from its head node traversal may start from any node in the system (ring)  a highly variable number of pointers per data record and a substantially different amount of traversal traffic at each data record the state and processing overhead of all nodes roughly the same

P2P Course, Structured systems 7 Replace data records with computer nodes, using the string name IDs of the nodes as the data record keys Form a ring instead of a list (the ring is doubly-linked to enable path locality) The Skip Net Structure

P2P Course, Structured systems 8 Each SkipNet node stores 2 logN pointers, where N is the number of nodes in the overlay system Routing Table or R-Table of a node (its set of pointers) The pointers at level h of a given node’s routing table point to nodes that are roughly 2 h nodes to the left and right of the given node. The Skip Net Structure (continued) “perfect” SkipNet: each level h pointer traverses exactly 2 h nodes.

P2P Course, Structured systems 9 All nodes are connected by the root ring formed by each node’s pointers at level 0. – Note that these nodes are sorted by Name ID. Pointers at level 1 point to nodes that are 2 nodes away -> the overlay nodes are divided into 2 disjoint rings. Pointers at level 2 form 4 disjoint rings of nodes, and so forth. Note: rings at level h + 1 are obtained by splitting a ring at level h into two disjoint sets, each ring containing every second member of the level h ring. The Skip Net Structure (continued) Root Ring

P2P Course, Structured systems 10 Each ring at level h is split into two rings by having each node randomly and uniformly decide to which of the two rings it belongs  Insertion and deletion affects only two other nodes in each ring to which the node has randomly chosen to belong  A pointer at level h still skips 2 h nodes in expectation and routing is possible in O(log N) forwarding hops with high probability The Probabilistic Skip Net Structure

P2P Course, Structured systems 11 Each node’s random choice of ring memberships can be encoded as a unique binary number: the node’s numeric ID Skip Net’s Numeric ID Space The first h bits of the number determine ring membership at level h. For example, node X’s numeric ID is 011 and its membership at level 2 is determined by taking the first 2 bits of 011, which designate Ring 01.

P2P Course, Structured systems 12 The Probabilistic Skip Net Structure (continued) does not require hashing to generate nodes’ numeric IDs; it only requires that numeric IDs are random and unique Node IDs and Numeric IDs Numeric IDs of nodes are unique; they can be thought of as a second address space maintained by the same SkipNet  SkipNet’s string (name) address space is populated by node name IDs that are not uniformly distributed throughout the space  SkipNet’s numeric address space is populated by node numeric IDs that are uniformly distributed

P2P Course, Structured systems 13 The root ring, at the bottom, is sorted by name ID and, collectively, the top- level rings are sorted by numeric ID. For any given node, the SkipNet rings to which it belongs precisely form a Skip List. If you construct a trie on all nodes’ numeric IDs, the nodes of the resulting trie would be in one-to-one correspondence with the SkipNet rings. The Skip Net Structure (continued)

P2P Course, Structured systems 14 Skip Net’s Address Spaces Skip Net maintains two address spaces for the nodes:  Node ID space (which is not uniformly distributed through the address space)  Numeric ID space (it does not require hashing, it suffices that they are random and unique)

P2P Course, Structured systems 15 CHORD and Probabilistic Skip Net SkipNet’s routing pointers are exponentially distributed in a manner similar to Chord’s: The pointer at level h hops over 2 h nodes in expectation.  Chord’s routing pointers skip over 2 h in the numeric space  SkipNet’s pointers: when considered from level 0 upward, skip over 2 h nodes in the name ID space when considered from the top level downward, skip over 2 h nodes in the numeric ID space.

P2P Course, Structured systems 16 CHORD and Probabilistic Skip Net Chord guarantees O(logN) routing and node insertion performance by uniformly distributing node identifiers in its numeric address space. Hash(nodeID)  [0, 2 m ] SkipNet guarantees O(logN) performance of node insertion and routing in both the name ID and numeric ID spaces by uniformly distributing numeric IDs and leveraging the sorted order of name IDs.

P2P Course, Structured systems 17 Skip Net By using names instead of hashed identifiers to order nodes, natural locality based on the names of objects is preserved Arrange content in name order rather than randomly  Path locality, and  Content locality Q: Can we achieve the same using an order-preserving hash function?

P2P Course, Structured systems 18 Routing by Name ID Similar with Skip Lists Follow pointers that route closest to the intended destination At each node, a message will be routed along the highest level pointer that does not point past the destination value. Routing terminates when the message arrives at a node whose name ID is closest to the destination. Since nodes are ordered by name ID along each ring and a message is never forwarded past its destination, all nodes encountered during routing have name IDs between the source and the destination Given a source node and a destination node, if destination > source, move clockwise else move counter clockwise

P2P Course, Structured systems 19 Routing by Name ID Content locality Use the name id of an item to store it (map it) to the p2p nodes Use the “name” of the data item to store it at the node with the same name (or the same prefix) Incorporating the node’s name ID into a data name ID guarantees that the data item will be stored at that node Example: doc-name -> kostas.microsoft.com/doc-name Path locality Use com.microsoft.kostas so that all nodes within the com.microsoft prefix share a single DNS suffix

P2P Course, Structured systems 20 Routing by Name ID (continued) When a message originates at a node whose name ID shares a common prefix with the destination: All nodes traversed by the message have name IDs that share that same prefix If the source name ID and the destination name ID share no common prefix: A message can be routed in either direction. For the sake of fairness, randomly pick a direction so that nodes whose name IDs are near the middle of the sorted ordering do not get a disproportionately large share of the forwarding traffic.

P2P Course, Structured systems 21 Routing by Name ID (continued) The number of message hops when routing by name ID is O(logN) with high probability. The key observation of this scheme is that routing by name ID traverses only nodes whose name IDs share a non-decreasing prefix with the destination ID.

P2P Course, Structured systems 22 Routing by Numeric ID Begin by examining nodes in the level 0 ring until a node is found whose numeric ID matches the destination numeric ID in the 1st digit. Jump up to this node’s level 1 ring, which also contains the destination node. Examine nodes in this level 1 ring until a node is found whose numeric ID matches the destination numeric ID in the 2nd digit. Again, this node’s level 2 ring must also contain the destination node, and thus the routing operation proceeds in this level 2 ring. This procedure repeats until we cannot make any more progress — we have reached a ring at some level h such that none of the nodes in that ring share h + 1 digits with the destination numeric ID. We must now deterministically choose one of the nodes in this ring to be the destination node. Define the destination node to be the node whose numeric ID is numerically closest to destination numeric ID amongst all nodes in this highest ring.

P2P Course, Structured systems 23 Routing by Numeric ID (continued) Example: Route a message from node A to destination 1011 A will first forward the message to node D because D is in ring 1. D will then forward the message to node O because O is in ring 10. O will forward the message to Z because it is not in ring 101. Z will forward the message onward around the ring (and hence back) to O for the same reason. Since none of the members of ring 10 belong to ring 101, node O will be picked as the final message destination because its numeric ID is closest to 1011 of all ring 10 members.

P2P Course, Structured systems 24 Routing The number of message hops when routing by numeric ID is O(logN) with high probability.  Route by name ID: from top (higher level h) downwards  Route by numeric ID: from bottom (lowest level, level 0) upwards Efficient searches by name ID, because for any given node, the SkipNet rings to which it belongs precisely form a Skip List. Efficient searches by numeric ID, because, if you construct a trie on all nodes’ numeric IDs, the nodes of the resulting trie would be in one- to-one correspondence with the SkipNet rings. To map items Use name ID (for content locality) Use Numeric ID (for load balancing)

P2P Course, Structured systems 25 Node Join A node wanting to join the network must know at least one node inside the network and sends a JOIN request to that node.  Select a numeric ID either randomly or use hashing Where to join (position in the rings ):  Phase 1: First, find your position at each level, the correct ring at the level (use Numeric ID)  Phase 2: Then, find the correct position in the ring (must be sorted by name ID)

P2P Course, Structured systems 26 Node Join Phase 1 First find the toplevel ring that corresponds to the newcomer’s numeric ID. This amounts to routing a message to the newcomer’s numeric ID. Phase 2 (the toplevel ring is found, search by name ID) The newcomer then finds its neighbors in this toplevel ring, using a search by name ID within this ring only. Starting from one of these neighbors, the newcomer searches for its name ID at the next lower level and thus finds its neighbors at this lower level. This process is repeated for each level until the newcomer reaches the root ring. For correctness, the existing nodes only point to the newcomer after it has joined the root ring; the newcomer then notifies its neighbors in each ring that it should be inserted next to them.

P2P Course, Structured systems 27 Node Join (continued) STEP 2: Since Z is the only node in ring 10, Z concludes that it is both the clockwise and counter-clockwise neighbor of node O in this ring. To find node O’s neighbors in the next lower ring (ring 1), Z forwards the insertion message to D. Node D then concludes that D and V are the neighbors of node O in ring 1. Similarly, node D forwards the insertion message to node M in the root ring, who concludes that node O’s level 0 neighbors must be M and T. STEP 3: The insertion message is returned to node O, who then instructs all of its neighbors to insert it into the rings. Example: Insert node O STEP 1 Node O initiates a search by numeric ID for its own ID (101) and ends up at node Z in ring 10 since that is the highest nonempty ring that shares a prefix with node O’s numeric ID.

P2P Course, Structured systems 28 Node Join (continued) A newcomer searches for its neighbors at a certain level only after finding its neighbors at all higher levels. As a result, the search by name ID will traverse only a few nodes within each ring to be joined: The range of nodes traversed at each level is limited to the range between the newcomer’s neighbors at the next higher level. Therefore, with high probability, a node join in SkipNet will traverse O(logN) hops

P2P Course, Structured systems 29 Node Departure SkipNet can route correctly as long as the bottom level ring is maintained. All pointers but the level 0 ones can be regarded as routing optimization hints, and thus are not necessary to maintain routing protocol correctness. Therefore (like Chord and Pastry) SkipNet maintains and repairs the upper-level ring memberships by means of a background repair process. In addition, when a node voluntarily departs from the SkipNet, it can proactively notify all of its neighbors to repair their pointers immediately. To maintain the root ring correctly, each SkipNet node maintains a leaf set that points to additional nodes along the root ring, for redundancy. In the current implementation a leaf set size of 16.

P2P Course, Structured systems 30 More next time