27
Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic Non-uniform deterministic routing on F-Chord( routing on F-Chord( ) ) Gennaro Cordasco Gennaro Cordasco , Luisa Gargano, Mikael , Luisa Gargano, Mikael Hammar, Alberto Negro, Vittorio Scarano Hammar, Alberto Negro, Vittorio Scarano Dipartimento di Informatica e Applicazioni Dipartimento di Informatica e Applicazioni “R.M. Capocelli” “R.M. Capocelli” Università di Salerno, 84081, Baronissi Università di Salerno, 84081, Baronissi (SA) (SA) - Italy - Italy

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord( ) Gennaro Cordasco, Luisa

Embed Size (px)

Citation preview

Page 1: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

Non-uniform deterministic routing on Non-uniform deterministic routing on F-Chord(F-Chord())

Gennaro CordascoGennaro Cordasco, Luisa Gargano, Mikael Hammar, , Luisa Gargano, Mikael Hammar, Alberto Negro, Vittorio ScaranoAlberto Negro, Vittorio Scarano

Dipartimento di Informatica e Applicazioni “R.M. Capocelli”Dipartimento di Informatica e Applicazioni “R.M. Capocelli”Università di Salerno, 84081, Baronissi (SA) Università di Salerno, 84081, Baronissi (SA) - Italy- Italy

Page 2: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

OutlineOutline P2P e DHTP2P e DHT DHT performance metricsDHT performance metrics Uniform Routing Algorithm vs Non-uniform Uniform Routing Algorithm vs Non-uniform

Routing AlgorithmRouting Algorithm F-Chord F-Chord [CGHNS04] Neighbor of Neighbor routing algorithm Neighbor of Neighbor routing algorithm

[MNW04] Our ProposalOur Proposal

H-schemesH-schemes H-F-ChordH-F-Chord

Page 3: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

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

Page 4: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

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

Page 5: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

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 – routing occurs inside the portion of ring that is delimited

by source and destinationby source and destination No node congestionNo node congestion

DrawbackDrawback Less powerful (De Bruijn Graph and Neighbor of Neighbor Less powerful (De Bruijn Graph and Neighbor of Neighbor

Greedy routing are more powerful)Greedy routing are more powerful)

Routing is not greedy

Page 6: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

Asymptotic tradeoff curveAsymptotic tradeoff curve

Routing table size

1

1

N -1

N -1O(log N)

Chord et al.

Ring

O(log N)

Diameter

Uniform Routing algorithm

Non-Uniform Routing algorithm

Totally connected graph

Page 7: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

F-Chord(F-Chord() [CGHNS04]) [CGHNS04]

2 5 13 34 89

F-Chord(1)

1 3 8 21 55

even jumps

all jumps

F-Chord(F-Chord())Fib(2i), for i = 1,2, …,Fib(2i), for i = 1,2, …,(1-(1-)(m-2))(m-2)Fib(i), for i = 2 Fib(i), for i = 2 (1-(1-)(m-2))(m-2) +2, …, m-1 +2, …, m-1

Degree:Degree:

F-Chord(F-Chord() use ) use (m-2)(m-2) jumps jumps

Diameter:Diameter:

For any value of For any value of , the diameter of F-Chord(, the diameter of F-Chord() is ) is m/2m/2 0.72021 log N 0.72021 log N

Average Path Length:Average Path Length:

The average path length of the F-Chord(The average path length of the F-Chord() scheme is bounded by 0.39812 log N + (1-) scheme is bounded by 0.39812 log N + (1-)0.24805 log N+1)0.24805 log N+1

[1/2,1]

Page 8: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

Let N(Let N(,d) denote the maximum number of consecutive ,d) denote the maximum number of consecutive identifiers obtainable trough a uniform algorithm using identifiers obtainable trough a uniform algorithm using up to up to jumps (i.e. degree jumps (i.e. degree ) and diameter d. For any ) and diameter d. For any 0, d0, d0, it holds that N(0, it holds that N(,d),d) Fib( Fib(+d+1)+d+1)

For each For each [0.58929,0.69424] the F-Chord( [0.58929,0.69424] the F-Chord() schemes ) schemes improve on Chord in all parameters (number of jumps, improve on Chord in all parameters (number of jumps, diameter, and average path length)diameter, and average path length)

F-Chord(1/2) is optimal

F-Chord(F-Chord() [CGHNS04]) [CGHNS04]

Page 9: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

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

nGraphical resultsGraphical results

Lower is better

Page 10: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

The Small World PhenomenaThe Small World Phenomena The “six degree of separation” experiment S. The “six degree of separation” experiment S.

Milgram [M67].Milgram [M67]. The sociological experiment relied on social networks to transmit The sociological experiment relied on social networks to transmit

a letter from a person to unfamiliar targets by passing the letter a letter from a person to unfamiliar targets by passing the letter only via acquaintances. only via acquaintances.

Only a small number (around 6) of steps was needed.Only a small number (around 6) of steps was needed.

Recent work [DRW03], shows that, in the first Recent work [DRW03], shows that, in the first steps the message was forwarded to a person P steps the message was forwarded to a person P by using a guess on who P knew or, in other by using a guess on who P knew or, in other words, on his/her neighbors. words, on his/her neighbors.

Page 11: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

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)

Page 12: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

R-SchemesR-Schemes R-Chord N=2R-Chord N=2m m [MNW04][MNW04]

For each 0 For each 0 ≤ i < m, l≤ i < m, let r(i) denote an integer chosen uniformly at et r(i) denote an integer chosen uniformly at randomrandom from the interval [0,2 from the interval [0,2ii), node x is connected by edges to ), node x is connected by edges to the nodes x+2the nodes x+2ii+r(i);+r(i);

R-Hypercube [MNW04]R-Hypercube [MNW04] For each 0 For each 0 ≤ i ≤ m, node x is connected with y where y is defined ≤ 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 ias follows: the top i-1 bits of y are identical to those of x. The i thth is flipped. The remaining m - i bits are chosen uniformly at is flipped. The remaining m - i bits are chosen uniformly at randomrandom..

x 2i 2i+1

Page 13: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

Neighbor of Neighbor (NoN) Neighbor of Neighbor (NoN) Greedy Routing Greedy Routing [MNW04]

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.

Page 14: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

[MNW04][MNW04] DegreeDegree GreedyGreedy NoN GreedyNoN Greedy

R-Chord, R-Chord,

R-Hypercube,R-Hypercube,

Small World Small World Percolation,Percolation,

Skip GraphsSkip Graphs

SymphonySymphony k < log Nk < log N

NoN-Greedy RoutingNoN-Greedy Routing

Nlog

k

N2log

Nlog

N

N

loglog

log

kk

N

log

log2

Page 15: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

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]

Page 16: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-SchemesH-Schemes

We denote by jWe denote by j11, j, j2 2 , …, j, …, jd d all the jumps of our all the jumps of our

schemes (ordered by their size);schemes (ordered by their size); Let H() a good hash function that map an id on a Let H() a good hash function that map an id on a

sequence of m bits, for each 1 sequence of m bits, for each 1 ≤ ≤ i i ≤ d, node x is ≤ d, node x is connected by edges to nodeconnected by edges to node

x + jx + ji i + + (H(x)/2(H(x)/2mm)*(j)*(ji+1i+1 - j - jii))

[0,1)

jii

ji+1i+1

Page 17: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-SchemesH-Schemes

Deterministic networkDeterministic network No additional information is transmitted No additional information is transmitted

nor stored:nor stored: Each node x, knowing y, can compute H(y) Each node x, knowing y, can compute H(y)

and then can estimate y’s neighbors. and then can estimate y’s neighbors.

Page 18: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-SchemesH-Schemes DegreeDegree GreedyGreedy NoN GreedyNoN Greedy

H-Chord, H-Chord,

H-Hypercube,H-Hypercube,

H-SymphonyH-Symphony k < log Nk < log N

NoN-Greedy RoutingNoN-Greedy Routing

Nlog

k

N2log

Nlog

N

N

loglog

log

kk

N

log

log2

Page 19: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-F-Chord(H-F-Chord())

Theorem 1: The average path length is O(log N/ log log N) hops for the NoN Greedy algorithm on H-F-Chord() in a ring of size Fib(m) where the number of nodes alive is N < Fib(m).

We show, by simulation, that H-F-Chord() is more efficient than the corresponding F-Chord() by a percentage that goes from 10% to 25% even for small N.

Page 20: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-F-Chord(H-F-Chord() – APL ) – APL optimality optimality

Case 1:Case 1:

d=d(s,t)<O(2d=d(s,t)<O(2log n / loglog nlog n / loglog n) we can use greedy routing) we can use greedy routing

Case 2:Case 2:d’=d loglog n / log n d’=d loglog n / log n

Let v Let v [s, t] and let jv [s, t] and let jvi i a jump of va jump of v

Pr[Pr[ i st jv i st jvi i I] > loglog n / log n] > loglog n / log n

s t

s td’

I

d

Page 21: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-F-Chord(H-F-Chord() – APL ) – APL optimality optimality

s td’

I

Pr[s can reach Pr[s can reach II in two hops in two hops whenwhen d d ≥≥O(2O(2log n / loglog nlog n / loglog n))] ] ≥ 1 – e≥ 1 – e-1-1

Hence after O(log d /Hence after O(log d / loglog nloglog n) hops the distance is ) hops the distance is decreased to O(log n / loglog n) and wedecreased to O(log n / loglog n) and we have reduced have reduced case 2 to case 1.case 2 to case 1.

Page 22: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-F-Chord(1)

0

1

2

3

4

5

6

7

8

9

n

Ave

rage

Pat

h Le

ngth

F-Chord(1) H-F-Chord(1) Greedy H-F-Chord(1) NoN (This paper) H-F-Chord(1) SP

Lower is better

Page 23: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-F-Chord(1/2)

0

2

4

6

8

10

12

14

21 55 144 377 987 2584 6765 17711 46368 121393 317811 832040 2178309 5702887

n

Ave

rag

e P

ath

Len

gth

F-Chord(1/2) H-F-Chord(1/2) Greedy H-F-Chord(1/2) NoN (This paper) H-F-Chord(1/2) SP

Lower is better

Page 24: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-F-Chord(0.69424)

0

2

4

6

8

10

12

n

Ave

rag

e P

ath

Len

gth

F-Chord(0.69424) H-F-Chord(0.69424) Greedy

H-F-Chord(0.69424) NoN (This paper) H-F-Chord(0.69424) SP

Lower is better

Page 25: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

H-F-Chord(a) vs H-Chord

3.5

4

4.5

5

5.5

6

6.5

7

7.5

8

8.5

0 50000 100000 150000 200000 250000 300000 350000

n

Ave

rag

e P

ath

Len

gth

H-F-Chord(1/2) H-Chord H-F-Chord(0.69424) H-F-Chord(1)

Lower is better

Page 26: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

Performance

5

7

9

11

13

15

17

19

21

23

25

1 10 100 1000 10000 100000 1000000

n

%

H-F-Chord(1) H-F-Chord(0.69424) H-F-Chord(1/2)

Higher is better

Page 27: Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004 Non-uniform deterministic routing on F-Chord(  ) Gennaro Cordasco, Luisa

Hot Topics in Peer-to-Peer Computing (HOT-P2P 2004) Volendam 08 October 2004

ConclusionsConclusions

H-F-Chord(H-F-Chord():): Deterministic P2P networkDeterministic P2P network Asymptotically optimal with respect to average Asymptotically optimal with respect to average

path length and degree (No hidden constant)path length and degree (No hidden constant) Allows a trade-off between efficiency and Allows a trade-off between efficiency and

maintenancemaintenance No overhead with respect to greedy routing No overhead with respect to greedy routing

systemsystem