180 likes | 202 Views
Learn about SkipNet, a distributed hash table that uses structured networks and dual ID space to efficiently store and route data. Explore its routing and load balancing mechanisms.
E N D
P2P NetworkStructured Networks (III) Distributed Hash Tables Pedro García López Universitat Rovira I Virgili Pedro.garcia@urv.net
SkipNet Christian Schmidt-Madsen, csm@itu.dk Peter Tiedemann, petert@itu.dk
Data locality • Hashing distributes data uniformly across the overlay -> related data is not located in contiguous nodes • Idea: group related data in contiguous nodes -> breaks load balanced distribution of keys to nodes • Routing tables depend on the uniform distribution of ids to stablish connections • Solution: 2 ids, numID is uniform in the identifier space but nameID can be chosen related to the data.
SkipNet structure overview Dual ID-space: Name ID Numeric ID (similar to Chord,Pastry etc) • Node names are the reverse DNS name of the host • (example: dk.itu.mycomputer) • Name ID Objects are stored at the lexicographic predecessor node. • ( example: dk.itu.mycomputer/index.html will be stored at • dk.itu.mycomputer )* • Numeric ID objects are stored at the numerically closest node *: assuming ”/” is less than other symbols
The SkipList datastructure Deterministic: Pointer at level h skips over 2h elements Probabilistic: Node at level h with probability 1/2h
SkipList -> SkipNet Problems with SkipList: • Efficient search only possible from head • Some nodes more likely to be in routing path Basic principle of SkipNet: • A probalistic skiplist where every node is a head. • The keys are just the names of the nodes • The ordering is lexicographic
SkipNet structure illustrated Ring 100 Ring 101 Ring 110 Ring 111 Ring 000 Ring 001 Ring 010 Ring 011 O M D A T Z V X M O D Ring 01 Ring 00 Ring 10 Ring 11 A T V Z X M O D Ring 1 Ring 0 T A Z V X M D O T A Z V X L = 3 L = 2 Numeric ID of A L = 1 Root Ring Level: L = 0 :skiplist with head = A
SkipNet Global View – Routing table M O D T A V X Z M D A T O V Z X M O D Node A’s Routing Table T A Z V X M D O T A Z V X Ring 100 Ring 101 Ring 110 Ring 111 Ring 000 Ring 001 Ring 010 Ring 011 L = 3 Ring 01 Ring 00 Ring 10 Ring 11 L = 2 Ring 1 Ring 0 L = 1 Root Ring Level: L = 0
Routing by Name ID to node M O D T A V X Z M D A T O V Z X M O D T A Z V X M D O T A Z V X • Example: route from A to V • Simple Rule: Forward the message to node that is closest to dest, without going too far. Ring 100 Ring 101 Ring 110 Ring 111 Ring 000 Ring 001 Ring 010 Ring 011 L = 3 Ring 01 Ring 00 Ring 10 Ring 11 L = 2 Ring 1 Ring 0 L = 1 Root Ring Level: L = 0
Routing by Name ID to node M O D T A V X Z M D A T O V Z X M O D Node T’s Routing Table T A Z V X M D O T A Z V X • Example: route from A to V • Simple Rule: Forward the message to node that is closest to dest, without going too far. Ring 100 Ring 101 Ring 110 Ring 111 Ring 000 Ring 001 Ring 010 Ring 011 L = 3 Ring 01 Ring 00 Ring 10 Ring 11 L = 2 Ring 1 Ring 0 L = 1 Root Ring Level: L = 0
Routing by Name ID to node M O D T A V X Z M D A T O V Z X M O D T A Z V X M D O T A Z V X • Example: route from A to V • Simple Rule: Forward the message to node that is closest to dest, without going too far. Ring 100 Ring 101 Ring 110 Ring 111 Ring 001 Ring 010 Ring 011 Ring 000 L = 3 Ring 01 Ring 00 Ring 10 Ring 11 L = 2 Ring 1 Ring 0 L = 1 Root Ring Level: L = 0
Routing by Name ID to object E O D T A V X Z E D A T O V Z X E O D T A Z V X E D T O A Z V X • Example: route from A to F -> Terminates at E • Simple Rule: Forward the message to node that is closest to dest, without going too far. Ring 100 Ring 101 Ring 110 Ring 111 Ring 001 Ring 010 Ring 011 Ring 000 L = 3 Ring 01 Ring 00 Ring 10 Ring 11 L = 2 Ring 1 Ring 0 L = 1 Root Ring Level: L = 0
Routing by numeric ID Routing by Num ID to node RouteTo( numID ): • Current ring = root ring • Move around the current ring until you meet a node which is in the same next higher ring as numID • Continue recursively until a top ring is reached
Routing by numeric ID B O D T A V X B D A X O V X B O D T T A V B D O T A V X Example: route from A to 110 -> ends at node O • Log(N) rings to visit • In expectation only 2 nodes visited before encountering one belonging to correct ring Ring 100 Ring 101 Ring 110 Ring 111 Ring 001 Ring 010 Ring 011 Ring 000 L = 3 Ring 01 Ring 00 Ring 10 Ring 11 L = 2 Ring 1 Ring 0 L = 1 Root Ring Level: L = 0
Content and path locality com.microsoft.research microsoft.com/pwlist.txt com.microsoft • Organizations correspond to contiguous SkipNet segments • Internal routing by nameID remains internal • Objects are stored according to nameID com.sun gov.irs edu.ucb
Numeric Routing Name Routing Constrained load balancing • DHT over a limited domain • We combine the two id spaces • Calling a file <CLB Domain>!<CLB Suffix> will store the file on the node beginning with <CLB Domain> and having the closest numeric ID to hash(<CLB Suffix>) CLB DomainCLB Suffix microsoft.com!skipnet.html
CLB example skipnet. html com.microsoft • To get object “microsoft.com!skipnet.html” • Route by nameID to “microsoft.com” • Route by numericID to Hash(“skipnet.html”)within the “microsoft.com” constraint com.sun gov.irs edu.ucb
SkipNet conclusions • Data locality is a very interesting feature for achieving range queries over the overlay • Distributed indexes and data location can really benefit from skipnet overlay structure • Retrieval of related data does not imply contacting far away nodes • But: contiguous data could be in contiguous nodes in different countries (USA node – China Node – Australia node) • Skipnet proposes a P-Table to fix this (proximity-aware routing) -> questionable !