Salerno, 20/21/22 giugno Meeting WEBMINDS 2005 Degree-Optimal Deterministic Routing for P2P Systems...
-
Upload
jesus-mccabe -
Category
Documents
-
view
214 -
download
0
Transcript of Salerno, 20/21/22 giugno Meeting WEBMINDS 2005 Degree-Optimal Deterministic Routing for P2P Systems...
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Degree-Optimal Deterministic Routing for P2P Systems
Meeting WEBMINDS 2005Salerno, 20/21/22 giugnoUniversità di Salerno - GL7
Dipartimento di Informatica e Applicazioni “R.M. Capocelli”Università di Salerno, 84081, Baronissi (SA) - Italy
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
OutlineOutline
• P2P e DHTP2P e DHT
• DHT performance metricsDHT performance metrics
• Greedy Routing vs Non-Greedy Routing Greedy Routing vs Non-Greedy Routing
• Neighbor of Neighbor Routing algorithmNeighbor of Neighbor Routing algorithm
• The Small World PhenomenaThe Small World Phenomena
• Our Proposal: H-NetworksOur Proposal: H-Networks
• Conclusions
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Distributed Hash Table (DHT)Distributed Hash Table (DHT)
• Distributed version of a hash table data structureDistributed version of a hash table data structure• Stores (key, value) pairsStores (key, value) pairs
• The key is like a filenameThe key is like a filename• The value can be file contentsThe value can be file contents
• Goal: Efficiently insert/lookup/delete (key, value) pairsGoal: Efficiently insert/lookup/delete (key, value) pairs• Each peer stores a subset of (key, value) pairs in the Each peer stores a subset of (key, value) pairs in the
systemsystem• Core operation: Find node responsible for a keyCore operation: Find node responsible for a key
• Map key to nodeMap key to node• Efficiently route insert/lookup/delete requests to this nodeEfficiently route insert/lookup/delete requests to this node
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
DHT performance metricsDHT performance metrics
• Three performance metrics: Three performance metrics: • Routing table size (degree)Routing table size (degree)
• Storage costStorage cost• Measure the cost of self-stabilization for adapting Measure the cost of self-stabilization for adapting
to node joins/leaves to node joins/leaves
• Diameter and Average path lengthDiameter and Average path length• Time costTime cost• Fault toleranceFault tolerance
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
• Chord uses a one-dimensional circular key space (ring) of N=2m identifiers
• The node responsible for the key is the node whose identifier most closely follows the key
• Chord maintains two sets of neighbors:• A successor list of k nodes that immediately follows it in the key space• A finger list of m = log N nodes spaced exponentially around the key
space• Routing consists in forwarding to the node closest, but not past, the
key • Performance:
• Diameter: log N (O(log n) whp) where n denote the number of nodes present in the network
• Routing table size: log N (O(log n) whp)• Average path length: ½ log N
Routing correctness
Routing efficiency
ChordChord
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Meeting Firb - Genova, 5-6 luglio 2004
ID Resp.
8+1=9 14
8+2=11 14
8+8=16 21
8+16=24 24
8+32=40 42
8+4=12 14
m=6
indice Nodo
1 14
2 21
4 32
5 38
6 42
3 24
Successors
Predecessor
Nodo 1
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
t
Greedy routing: move to the neighbor that minimizes the distance to the target.
s
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Greedy Routing in the Considered Networks
Simple – to understand and to implement.LocalLocal – routing occurs – routing occurs inside the portion of ring that inside the portion of ring that is delimited by source and is delimited by source and destinationdestination
In some cases – (Hypercube, Chord) – the best we can do.
Not optimal with respect to the degree.
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Greedy Routing in the Considered Networks
•Degree is (log n)
•Greedy routing needs (log n) hops.
•Lower bound is
Ω(log n / log log n)
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Non Greedy Routing
• Viceroy Network• Degree: O(1)• Average Path Length: O(log N)
• De Bruijn graphs • Degree: O(log N)• Average Path Length:
loglogN
logNO
Routing is not local
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Neighbor of Neighbor (NoN) Neighbor of Neighbor (NoN) Greedy Routing Greedy Routing
Let d(x,y) be a metric for the nodes in the network.
1. Assume the message is currently at node u ≠ target.2. Let N = {v1, v2, …, vk} be the neighbors of u.3. For each 1 ≤ i ≤ k, let wi1, wi2, …, wik be the neighbors of vi and let
N'= { wij 1 ≤ i, j ≤ k}.4. Among these k2+k nodes, assume that z is the one closest to the
target (with respect to metric d).5. If z N route the message from u to z else z = wij, for some i and j,
and we route the message from u via vi to z.
• Manku, Naor, Wieder [2004] NoN-routing within O(log n / loglog n) hops in Small World Networks.
• Manku, Bawa, Ragahavan [2003]: a heuristic routing algorithm in Symphony – a Small World P2P network.
• Coppersmith, Gamarnik and Sviredenko [2002]: proved an upper bound on the diameter of a Small World graph.
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005s
t
Neighbor of Neighbor (NoN) Neighbor of Neighbor (NoN) Greedy RoutingGreedy Routing
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
The Small World PhenomenaThe Small World Phenomena
• The “six degree of separation” experiment S. Milgram [M67].• The sociological experiment relied on social networks to transmit
a letter from a person to unfamiliar targets by passing the letter only via acquaintances.
• Only a small number (around 6) of steps was needed.
• Problem: Locate a resource in a ‘natural’ network based on partial information
• Question: How do people find short paths?• Recent work [DRW03], shows that, in the first steps the
message was forwarded to a person P by using a guess on who P knew or, in other words, on his/her neighbors.
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Small WorldSmall World
• Nodes points in a two dimensional grid
• Grid edge short range
• Each edge (x, y) appears independently with probability 1/d(x,y)2
•Degree of each node (log N)
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
R-SchemesR-Schemes• R-Chord N=2m [MNW04]
• For each 0 ≤ i < m, let r(i) denote an integer chosen uniformly at random from the interval [0,2i), node x is connected by edges to the nodes x+2i+r(i);
• R-Hypercube [MNW04]• For each 0 ≤ i ≤ m, node x is connected with y where y is defined
as follows: the top i-1 bits of y are identical to those of x. The ith is flipped. The remaining m - i bits are chosen uniformly at random.
x 2i 2i+1
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
[MNW04] Degree Greedy NoN Greedy
R-Chord,
R-Hypercube,
Skip Graphs
Symphony k < log N
NoN-Greedy RoutingNoN-Greedy Routing
Nlog
k
N2log
Nlog
N
N
loglog
log
kk
N
log
log2
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Neighbor of Neighbor (NoN): Neighbor of Neighbor (NoN): Degree Degree
• Cost of Neighbor of Neighbor lists:• Memory: O(log2n)• Maintenance: O(log n) must be updated• Neighbor lists should be maintained (open connection, pinging, etc.)
“In practice, a Chord ring will never be in a stable state; instead, joins and departures will occur continuously, interleaved with the stabilization algorithm. The ring will not have time to stabilize before new changes happen.” [SMLKKDB03SMLKKDB03]
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
• H-Chord • Let N=2m and H() denote a good hash function. For
each 0 ≤ i ≤ m, node x is connected by edges to the nodes x+2i+ H(x) mod 2i;
• H-Hypercube• Let H() denote a good hash function, for each 0 ≤ i ≤ m,
node x is connected with y where y is defined as fallows: the top i-1 bits of y are identical to those of x. The ith is flipped. The remaining m - i bits are identical to those of H(x).
x 2i 2i+1
H-NetworksH-Networks
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
H-Networks Degree Greedy NoN Greedy
H-Chord,
H-Hypercube,
H-Skip-graphs
H-Symphony k < log N
Nlog
k
N2log
Nlog
N
N
loglog
log
kk
N
log
log2
Nlog Nlog Nlog
H-NetworksH-Networks
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Lemma
The average path length is O(log n / loglog n) hops for the NoN Greedy algorithm on H-Chord with n=2m nodes.
Proof
Phase I: d < n1/loglog n
O(log n / loglog n) step to reach the destination
n<2m
Chernoff Bound
s t
d(s,t)=d
H-ChordH-Chord
the distance decrease at last with a factor of ¾ for each step
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Phase II: d > n1/loglog n
• |I|=d’=d / log d
• Goal: The probability that s can reach the interval I in two hops is equal to a constant c
s t
d(s,t)=d
I
H-ChordH-Chord
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
• s has at least p - 1 neighbors s1,… ,sp-1
Claim: The probability that si can reach the interval I is at least d’/2p
The probability that s can reach the interval I in two hops is equal to a constant 1-e-1
APL=O(log n / loglogn)
s t
d(s,t)=d
Ip - 1 neighborsH-ChordH-Chord
p=log d |I|=d’=d / log dd > n1/loglog n
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Skip – GraphsSkip – Graphs• Each node (resource) has a name.• Nodes are arranged on a line sorted by name.
• Each node x chooses a random string m(x) of bits.
• An edge is established if two nodes share a prefix which is not shared by the nodes between them.
• Allows prefix search.
• ??? Load balancing ???
0 1 110011
1 1100 00
0 1 0
a b c fed
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Routing in Skip – GraphsRouting in Skip – Graphs
• Greedy Routing – use longest edge possible.• Path length and degree are (log N) w.h.p.
0 1 110011
1 1100 00
0 1 0
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Let H() denote a good hash function, H-Skip graphs are identical to Skip-graphs but with m(x)=H(x)
0 1 110011
1 1100 00
0 1 0
a b c fed
H-Skip-graphsH-Skip-graphs
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
H-Skip-graphsH-Skip-graphs• A node in H-Skip-graphs, in spite of using a
deterministic hash function, has no way of estimate its neighbor’s neighbors.
• Nevertheless, by using a deterministic hashing function the membership vector m(t) of the target become available to the source, and a more efficient search is now possible.• d(x,y)=(y+2m-x) mod 2m
•
))(),((2
2mod)2(),('
ymxmlcs
mm xyyxd
0 1 110011
1 1100 00
0 1 0
a b c fed
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
0123456789
10
2 4 6 8 10 12 14 16 18
log N
ho
ps
Chord
R-ChordGreedyR-Chord NoN
R-Chord SP
H-ChordGreedyH-Chord NoN
H-Chord SP
Chord: N IDs, N nodesLower is better
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
0
1
2
3
4
5
6
7
8
9
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
log N
ho
ps
Chord
R-ChordGreedyR-Chord NoN
R-Chord SP
H-ChordGreedyH-Chord NoN
H-Chord SP
Chord: 232 IDs, N nodesLower is better
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Skip-graphs: N nodes
0
2
4
6
8
10
12
14
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
log N
ho
ps
Skip-graphsGreedySkip-graphsNoN
Skip-graphsSPH-Skip-graphsGreedyH-Skip-graphsNoN
H-Skip-graphsSP
Lower is better
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Skip-graphs: N nodes
0
2
4
6
8
10
12
14
2 4 6 8 10 12 14 16
log N
ho
ps
H-Skip-graphsGreedy
H-Skip-graphsNoN
H-Skip-graphsGreedy (NewMetric)
H-Skip-graphsNoN (NewMetric)
Lower is better
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
ConclusionsConclusions• H-Networks:
• Deterministic P2P networks• No additional information is transmitted nor stored:
• Each node x, knowing y, can compute H(y) and then can estimate y’s neighbors.
• Asymptotically optimal with respect to average path length and degree (No hidden constant)
• Allows a trade-off between efficiency and maintenance• No overhead with respect to greedy routing system
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
BibliographyBibliography
"Degree-Optimal Deterministic Routing for P2P Systems”. G.Cordasco, L.Gargano, M.Hammar, and V.Scarano. In Proc. of 10th IEEE Symposium on computers and communications (ISCC 2005) La Manga del Mar Menor, Cartagena, SPAIN June 27-30, 2005.
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Questions?
Dipartimento di Informatica e Applicazioni “R.M. Capocelli”Università di Salerno, 84081, Baronissi (SA) - Italy
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
• Fine Diapositive
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
• Peer to Peer Systems (P2P)• File sharing system;• File storage system;• Distributed file system;• Redundant storage;• Availability;• Performance; • Permanence;• Anonymity;
Scalability
MotivationMotivation
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Uniform Routing AlgorithmUniform Routing Algorithm• We consider a ring of N identifiers labeled from 0 to N-1We consider a ring of N identifiers labeled from 0 to N-1• A routing algorithm is A routing algorithm is uniformuniform if for each identifier x, x is if for each identifier x, x is
connected to y iff x+z is connected to y+z (i.e. : all the connected to y iff x+z is connected to y+z (i.e. : all the connection are symmetric).connection are symmetric).• AdvantagesAdvantages
• Easy to implementEasy to implement• Greedy algorithm is optimalGreedy algorithm is optimal
• SimpleSimple – to understand and implement – to understand and implement• LocalLocal – routing occurs inside the portion of ring that is delimited by – routing occurs inside the portion of ring that is delimited by
source and destinationsource and destination• No node congestionNo node congestion• Fast BootstrapFast Bootstrap• Do not need to estimate nDo not need to estimate n
• DrawbackDrawback• Less powerful (De Bruijn Graph and Neighbor of Neighbor Greedy Less powerful (De Bruijn Graph and Neighbor of Neighbor Greedy
routing are more powerful)routing are more powerful)
Routing is not greedy
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Asymptotic tradeoff curveAsymptotic tradeoff curve
1
1
n -1
n -1
O(log n)
O(log n)
LB
O(log n/ log(log n))
Diameter
Routing table size
Chord et al.
Ring
Totally connected graph
Uniform Routing algorithm
Non-Uniform Routing algorithm
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
Classification….Classification….
Pure P2P Systems
Uniform Systems
Chord, CAN, Pastry, Tapestry…
F-Chord
Non Uniform Systems
Non Greedy Routing
Viceroy, De Bruijn graphs
Greedy Routing
Randomized Networks and Neighbor of
Neighbor Routing
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
F-Chord(F-Chord())
2 5 13 34 89
F-Chord(1)
• F-Chord()Fib(2i), for i = 1,2, …,(1-)(m-2)Fib(i), for i = 2 (1-)(m-2) +2, …, m-1
• Degree:
F-Chord() use (m-2) jumps
• Diameter:
For any value of , the diameter of F-Chord() is m/2 0.72021 log N
• Average Path Length:
The average path length of the F-Chord() scheme is bounded by 0.39812 log N + (1-
)0.24805 log N+1
1 3 8 21 55
even jumps
all jumps
[1/2,1]
m=log n=1.44 log n
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
0.00
0.20
0.40
0.60
0.80
1.00
1.20
1.40
1.60
0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00
Degree
Diameter
Average Path Length
Chord APL
Chord Degree &Diameter
hops
x
log
n
Graphical resultsGraphical results
Lower is better
Salerno, 20/21/22 giugnoMeeting WEBMINDS 2005
H-NetworksH-Networks
• We denote by j1, j2 , …, jd all the jumps of our schemes (ordered by their size);
• Let H() a good hash function that map an id on a sequence of m bits, for each 1 ≤ i ≤ d, node x is connected by edges to node
x + ji + (H(x)/2m)*(ji+1 - ji) [0,1)
jii
ji+1i+1