218

Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Pastry

R. Himmelmann

Ferienakademie im Sarntal 2008

FAU Erlangen-Nürnberg, TU München, Uni Stuttgart

October 12, 2008

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 1 / 70

Page 2: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Table of Contents

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 2 / 70

Page 3: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Table of Contents

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 2 / 70

Page 4: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Table of Contents

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 2 / 70

Page 5: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Table of Contents

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 2 / 70

Page 6: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

IDs

IDs are numbers ∈ N/(2128N) ≡ {0, ..., 2128 − 1} := ID

∀b ∈ ID.|b| := min(b, 2128 − 1− b)

Every node p in the network has an ID id(p) ∈ ID.

Every piece of data d has an ID id(d)

... and is associated with the node p with |id(p)− id(d)| = min.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 3 / 70

Page 7: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

IDs

IDs are numbers ∈ N/(2128N) ≡ {0, ..., 2128 − 1} := ID

∀b ∈ ID.|b| := min(b, 2128 − 1− b)

Every node p in the network has an ID id(p) ∈ ID.

Every piece of data d has an ID id(d)

... and is associated with the node p with |id(p)− id(d)| = min.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 3 / 70

Page 8: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

IDs

IDs are numbers ∈ N/(2128N) ≡ {0, ..., 2128 − 1} := ID

∀b ∈ ID.|b| := min(b, 2128 − 1− b)

Every node p in the network has an ID id(p) ∈ ID.

Every piece of data d has an ID id(d)

... and is associated with the node p with |id(p)− id(d)| = min.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 3 / 70

Page 9: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

IDs

IDs are numbers ∈ N/(2128N) ≡ {0, ..., 2128 − 1} := ID

∀b ∈ ID.|b| := min(b, 2128 − 1− b)

Every node p in the network has an ID id(p) ∈ ID.

Every piece of data d has an ID id(d)

... and is associated with the node p with |id(p)− id(d)| = min.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 3 / 70

Page 10: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

IDs

IDs are numbers ∈ N/(2128N) ≡ {0, ..., 2128 − 1} := ID

∀b ∈ ID.|b| := min(b, 2128 − 1− b)

Every node p in the network has an ID id(p) ∈ ID.

Every piece of data d has an ID id(d)

... and is associated with the node p with |id(p)− id(d)| = min.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 3 / 70

Page 11: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

IDs

Interpret IDs as numbers with base |B| = 2b

Let m = log|B| |ID|pfxl(x , y) is the length of the greatest common pre�x of x and y .

pfxl(p, q) := pfxl(id(p), id(q)) for nodes p and q.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 4 / 70

Page 12: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

IDs

Interpret IDs as numbers with base |B| = 2b

Let m = log|B| |ID|pfxl(x , y) is the length of the greatest common pre�x of x and y .

pfxl(p, q) := pfxl(id(p), id(q)) for nodes p and q.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 4 / 70

Page 13: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

IDs

Interpret IDs as numbers with base |B| = 2b

Let m = log|B| |ID|pfxl(x , y) is the length of the greatest common pre�x of x and y .

pfxl(p, q) := pfxl(id(p), id(q)) for nodes p and q.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 4 / 70

Page 14: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

IDs

Interpret IDs as numbers with base |B| = 2b

Let m = log|B| |ID|pfxl(x , y) is the length of the greatest common pre�x of x and y .

pfxl(p, q) := pfxl(id(p), id(q)) for nodes p and q.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 4 / 70

Page 15: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

Proximity

Assumption: The cost for sending a message from p to q may be measuredby a metric d .

d(p, q) = d(q, p)

d(p, q) ≤ d(p, p′) + d(p′, q)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 5 / 70

Page 16: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

Proximity

Assumption: The cost for sending a message from p to q may be measuredby a metric d .

d(p, q) = d(q, p)

d(p, q) ≤ d(p, p′) + d(p′, q)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 5 / 70

Page 17: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

Proximity

Assumption: The cost for sending a message from p to q may be measuredby a metric d .

d(p, q) = d(q, p)

d(p, q) ≤ d(p, p′) + d(p′, q)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 5 / 70

Page 18: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

What do we want to optimize?

Every operation should need as few messages as possible.

The overall distance a message travels should be minimal.

A greedy algorithm is used.

Fill the routing tables of nodes only with near nodes.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 6 / 70

Page 19: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

What do we want to optimize?

Every operation should need as few messages as possible.

The overall distance a message travels should be minimal.

A greedy algorithm is used.

Fill the routing tables of nodes only with near nodes.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 6 / 70

Page 20: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

What do we want to optimize?

Every operation should need as few messages as possible.

The overall distance a message travels should be minimal.

A greedy algorithm is used.

Fill the routing tables of nodes only with near nodes.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 6 / 70

Page 21: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Overview

What do we want to optimize?

Every operation should need as few messages as possible.

The overall distance a message travels should be minimal.

A greedy algorithm is used.

Fill the routing tables of nodes only with near nodes.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 6 / 70

Page 22: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 7 / 70

Page 23: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

The Routing Table

Let p be a node.

Rp =: R is a matrix (R[i , j ])0≤i<m,0≤j<|B|.

R[i , j ] =: q is a node with

pfxl(p, q) = i

id(q)[i ] = j

If there is no such q or if j = id(p)[i ] then R[i , j ] = null .

If possible choose a q near to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 8 / 70

Page 24: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

The Routing Table

Let p be a node.

Rp =: R is a matrix (R[i , j ])0≤i<m,0≤j<|B|.

R[i , j ] =: q is a node with

pfxl(p, q) = i

id(q)[i ] = j

If there is no such q or if j = id(p)[i ] then R[i , j ] = null .

If possible choose a q near to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 8 / 70

Page 25: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

The Routing Table

Let p be a node.

Rp =: R is a matrix (R[i , j ])0≤i<m,0≤j<|B|.

R[i , j ] =: q is a node with

pfxl(p, q) = i

id(q)[i ] = j

If there is no such q or if j = id(p)[i ] then R[i , j ] = null .

If possible choose a q near to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 8 / 70

Page 26: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

The Routing Table

Let p be a node.

Rp =: R is a matrix (R[i , j ])0≤i<m,0≤j<|B|.

R[i , j ] =: q is a node with

pfxl(p, q) = i

id(q)[i ] = j

If there is no such q or if j = id(p)[i ] then R[i , j ] = null .

If possible choose a q near to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 8 / 70

Page 27: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

The Routing Table

Let p be a node.

Rp =: R is a matrix (R[i , j ])0≤i<m,0≤j<|B|.

R[i , j ] =: q is a node with

pfxl(p, q) = i

id(q)[i ] = j

If there is no such q or if j = id(p)[i ] then R[i , j ] = null .

If possible choose a q near to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 8 / 70

Page 28: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

The Routing Table

Let p be a node.

Rp =: R is a matrix (R[i , j ])0≤i<m,0≤j<|B|.

R[i , j ] =: q is a node with

pfxl(p, q) = i

id(q)[i ] = j

If there is no such q or if j = id(p)[i ] then R[i , j ] = null .

If possible choose a q near to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 8 / 70

Page 29: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

The Routing Table

Let p be a node.

Rp =: R is a matrix (R[i , j ])0≤i<m,0≤j<|B|.

R[i , j ] =: q is a node with

pfxl(p, q) = i

id(q)[i ] = j

If there is no such q or if j = id(p)[i ] then R[i , j ] = null .

If possible choose a q near to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 8 / 70

Page 30: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

Example

..1.. ..2.. ..3.. ..4..

xxxx null 2xxx 3xxx 4xxx

1xxx 11xx null 13xx 14xx

12xx 121x 122x null 124x

123x 1231 null 1233 1234

Rp with id(p) = 1232

|B| = 4.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 9 / 70

Page 31: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Routing Table

Size of R

Theorem

Rp for node p contains usually ≤ O( log nb

2b) entries.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 10 / 70

Page 32: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Leaf Set

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 11 / 70

Page 33: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Leaf Set

The Leaf Set

The leaf set L for a node p is an array with

|L|/2 nodes with next higher IDs and

|L|/2 nodes with next lower IDs.

If |L|/2 > n nodes may be on both sides of the leaf �set�.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 12 / 70

Page 34: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Leaf Set

The Leaf Set

The leaf set L for a node p is an array with

|L|/2 nodes with next higher IDs and

|L|/2 nodes with next lower IDs.

If |L|/2 > n nodes may be on both sides of the leaf �set�.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 12 / 70

Page 35: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Leaf Set

The Leaf Set

The leaf set L for a node p is an array with

|L|/2 nodes with next higher IDs and

|L|/2 nodes with next lower IDs.

If |L|/2 > n nodes may be on both sides of the leaf �set�.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 12 / 70

Page 36: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Leaf Set

Example

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 13 / 70

Page 37: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Neighbourhood Set

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 14 / 70

Page 38: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Neighbourhood Set

The Neighbourhood Set

The Neighbourhood M of a node p contains |M| = 2b nodes.

For all q ∈ M the distance d(p, q) should be small.

M is used for repairs and insertion of peers.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 15 / 70

Page 39: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Neighbourhood Set

The Neighbourhood Set

The Neighbourhood M of a node p contains |M| = 2b nodes.

For all q ∈ M the distance d(p, q) should be small.

M is used for repairs and insertion of peers.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 15 / 70

Page 40: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Neighbourhood Set

The Neighbourhood Set

The Neighbourhood M of a node p contains |M| = 2b nodes.

For all q ∈ M the distance d(p, q) should be small.

M is used for repairs and insertion of peers.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 15 / 70

Page 41: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Data Structures Neighbourhood Set

Example 2

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 16 / 70

Page 42: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 17 / 70

Page 43: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Algorithm for Routing

For a given r ∈ ID we want to �nd the node n with |id(n)− r | = min.

We start at a node p.

If n is in the leaf set we forward the message to it.

Otherwise let c = pfxl(id(p), r)

If R[c , r [c]] 6= null forward to that node.

Otherwise route to the �best� node p′ known to p with|r − id(p′)| < |r − id(p)| and pfxl(id(p′), r) ≥ r .

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 18 / 70

Page 44: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Algorithm for Routing

For a given r ∈ ID we want to �nd the node n with |id(n)− r | = min.

We start at a node p.

If n is in the leaf set we forward the message to it.

Otherwise let c = pfxl(id(p), r)

If R[c , r [c]] 6= null forward to that node.

Otherwise route to the �best� node p′ known to p with|r − id(p′)| < |r − id(p)| and pfxl(id(p′), r) ≥ r .

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 18 / 70

Page 45: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Algorithm for Routing

For a given r ∈ ID we want to �nd the node n with |id(n)− r | = min.

We start at a node p.

If n is in the leaf set we forward the message to it.

Otherwise let c = pfxl(id(p), r)

If R[c , r [c]] 6= null forward to that node.

Otherwise route to the �best� node p′ known to p with|r − id(p′)| < |r − id(p)| and pfxl(id(p′), r) ≥ r .

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 18 / 70

Page 46: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Algorithm for Routing

For a given r ∈ ID we want to �nd the node n with |id(n)− r | = min.

We start at a node p.

If n is in the leaf set we forward the message to it.

Otherwise let c = pfxl(id(p), r)

If R[c , r [c]] 6= null forward to that node.

Otherwise route to the �best� node p′ known to p with|r − id(p′)| < |r − id(p)| and pfxl(id(p′), r) ≥ r .

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 18 / 70

Page 47: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Algorithm for Routing

For a given r ∈ ID we want to �nd the node n with |id(n)− r | = min.

We start at a node p.

If n is in the leaf set we forward the message to it.

Otherwise let c = pfxl(id(p), r)

If R[c , r [c]] 6= null forward to that node.

Otherwise route to the �best� node p′ known to p with|r − id(p′)| < |r − id(p)| and pfxl(id(p′), r) ≥ r .

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 18 / 70

Page 48: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Algorithm for Routing

For a given r ∈ ID we want to �nd the node n with |id(n)− r | = min.

We start at a node p.

If n is in the leaf set we forward the message to it.

Otherwise let c = pfxl(id(p), r)

If R[c , r [c]] 6= null forward to that node.

Otherwise route to the �best� node p′ known to p with|r − id(p′)| < |r − id(p)| and pfxl(id(p′), r) ≥ r .

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 18 / 70

Page 49: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Correctness

Theorem

Routing takes no more than O(n/|L|) steps.

(Assume correct routing tables and leaf sets)

Theorem

The expected value is O(log2b n) = O( log nb

) messages.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 19 / 70

Page 50: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Correctness

Theorem

Routing takes no more than O(n/|L|) steps.

(Assume correct routing tables and leaf sets)

Theorem

The expected value is O(log2b n) = O( log nb

) messages.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 19 / 70

Page 51: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Correctness

Theorem

Routing takes no more than O(n/|L|) steps.

(Assume correct routing tables and leaf sets)

Theorem

The expected value is O(log2b n) = O( log nb

) messages.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 19 / 70

Page 52: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Notes

Usually not the node p with |id(p)− r | = min . is needed.

One of the k nodes nearest to r in the ID-space is su�cient.

E.g. in Past, a �le storage protocol layered atop pastry:

At least k copies of a �le are stored in the k nodes

with the closest IDs to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 20 / 70

Page 53: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Notes

Usually not the node p with |id(p)− r | = min . is needed.

One of the k nodes nearest to r in the ID-space is su�cient.

E.g. in Past, a �le storage protocol layered atop pastry:

At least k copies of a �le are stored in the k nodes

with the closest IDs to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 20 / 70

Page 54: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Notes

Usually not the node p with |id(p)− r | = min . is needed.

One of the k nodes nearest to r in the ID-space is su�cient.

E.g. in Past, a �le storage protocol layered atop pastry:

At least k copies of a �le are stored in the k nodes

with the closest IDs to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 20 / 70

Page 55: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Routing

Notes

Usually not the node p with |id(p)− r | = min . is needed.

One of the k nodes nearest to r in the ID-space is su�cient.

E.g. in Past, a �le storage protocol layered atop pastry:

At least k copies of a �le are stored in the k nodes

with the closest IDs to p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 20 / 70

Page 56: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Insertion of peers

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 21 / 70

Page 57: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Insertion of peers

Insertion of a peer

Let p be a new peer with tables R , L and M.

Try to choose values for the routing table so, that distances areminimal.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 22 / 70

Page 58: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Insertion of peers

Insertion of a peer

Let p be a new peer with tables R , L and M.

Try to choose values for the routing table so, that distances areminimal.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 22 / 70

Page 59: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Insertion of peers

Insertion of a peer

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 23 / 70

Page 60: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Insertion of peers

Insertion of a peer

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 23 / 70

Page 61: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Insertion of peers

Insertion of a peer

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 23 / 70

Page 62: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Insertion of peers

Insertion of a peer

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 23 / 70

Page 63: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Insertion of peers

Insertion of a peer

Request Rq from all q ∈ M and look for better entries for R .

Notify every peer in M, L and R about our arrival.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 24 / 70

Page 64: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Insertion of peers

Insertion of a peer

Request Rq from all q ∈ M and look for better entries for R .

Notify every peer in M, L and R about our arrival.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 24 / 70

Page 65: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 25 / 70

Page 66: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality

Locality

IDs are distributed randomly through the underlying network.

It is unlikely that |L|/2 nodes with consecutive IDs fail.

Routing is stable.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 26 / 70

Page 67: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality

Locality

IDs are distributed randomly through the underlying network.

It is unlikely that |L|/2 nodes with consecutive IDs fail.

Routing is stable.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 26 / 70

Page 68: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality

Locality

IDs are distributed randomly through the underlying network.

It is unlikely that |L|/2 nodes with consecutive IDs fail.

Routing is stable.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 26 / 70

Page 69: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality

Locality in insertion

The cost of routing operations depends on good choices for R[i , j ].

Fact

The algorithm for inserting peers generates good R[i , j ].

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 27 / 70

Page 70: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality

Locality in insertion

The cost of routing operations depends on good choices for R[i , j ].

Fact

The algorithm for inserting peers generates good R[i , j ].

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 27 / 70

Page 71: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality in Routing

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 28 / 70

Page 72: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality in Routing

Locality in Routing

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 29 / 70

Page 73: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality in Routing

Locality in Routing

p1, ..., pa, pb, pc , ..., pz with pb ∈ Ra and pc ∈ Rb

d(pa, pb) < d(pa, pc)Otherwise ..., pa, pc , ... would be used.

pi is taken from a set S with |S | ≈ n/2bi .

The most expensive step is usually the last step in the leaf set.

... which can often be avoided depending on the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 30 / 70

Page 74: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality in Routing

Locality in Routing

p1, ..., pa, pb, pc , ..., pz with pb ∈ Ra and pc ∈ Rb

d(pa, pb) < d(pa, pc)Otherwise ..., pa, pc , ... would be used.

pi is taken from a set S with |S | ≈ n/2bi .

The most expensive step is usually the last step in the leaf set.

... which can often be avoided depending on the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 30 / 70

Page 75: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality in Routing

Locality in Routing

p1, ..., pa, pb, pc , ..., pz with pb ∈ Ra and pc ∈ Rb

d(pa, pb) < d(pa, pc)Otherwise ..., pa, pc , ... would be used.

pi is taken from a set S with |S | ≈ n/2bi .

The most expensive step is usually the last step in the leaf set.

... which can often be avoided depending on the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 30 / 70

Page 76: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality in Routing

Locality in Routing

p1, ..., pa, pb, pc , ..., pz with pb ∈ Ra and pc ∈ Rb

d(pa, pb) < d(pa, pc)Otherwise ..., pa, pc , ... would be used.

pi is taken from a set S with |S | ≈ n/2bi .

The most expensive step is usually the last step in the leaf set.

... which can often be avoided depending on the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 30 / 70

Page 77: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality in Routing

Locality in Routing

p1, ..., pa, pb, pc , ..., pz with pb ∈ Ra and pc ∈ Rb

d(pa, pb) < d(pa, pc)Otherwise ..., pa, pc , ... would be used.

pi is taken from a set S with |S | ≈ n/2bi .

The most expensive step is usually the last step in the leaf set.

... which can often be avoided depending on the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 30 / 70

Page 78: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Operations Locality in Routing

Locality in Routing

p1, ..., pa, pb, pc , ..., pz with pb ∈ Ra and pc ∈ Rb

d(pa, pb) < d(pa, pc)Otherwise ..., pa, pc , ... would be used.

pi is taken from a set S with |S | ≈ n/2bi .

The most expensive step is usually the last step in the leaf set.

... which can often be avoided depending on the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 30 / 70

Page 79: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Leaf Set

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 31 / 70

Page 80: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Leaf Set

Dead nodes

A peer may leave the network without warning.

The underlying network supports pinging.

The protocol atop pastry may include keep-alive messages.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 32 / 70

Page 81: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Leaf Set

Dead nodes

A peer may leave the network without warning.

The underlying network supports pinging.

The protocol atop pastry may include keep-alive messages.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 32 / 70

Page 82: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Leaf Set

Dead nodes

A peer may leave the network without warning.

The underlying network supports pinging.

The protocol atop pastry may include keep-alive messages.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 32 / 70

Page 83: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Leaf Set

Repairing the Leaf Set

A peer p notices that a node p′ ∈ Lp is dead.

p requests the leaf sets from other nodes in Lp.

With them p can �ll Lp and reconstruct Lp′ .

All nodes in Lp′ are noti�ed by p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 33 / 70

Page 84: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Leaf Set

Repairing the Leaf Set

A peer p notices that a node p′ ∈ Lp is dead.

p requests the leaf sets from other nodes in Lp.

With them p can �ll Lp and reconstruct Lp′ .

All nodes in Lp′ are noti�ed by p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 33 / 70

Page 85: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Leaf Set

Repairing the Leaf Set

A peer p notices that a node p′ ∈ Lp is dead.

p requests the leaf sets from other nodes in Lp.

With them p can �ll Lp and reconstruct Lp′ .

All nodes in Lp′ are noti�ed by p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 33 / 70

Page 86: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Leaf Set

Repairing the Leaf Set

A peer p notices that a node p′ ∈ Lp is dead.

p requests the leaf sets from other nodes in Lp.

With them p can �ll Lp and reconstruct Lp′ .

All nodes in Lp′ are noti�ed by p.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 33 / 70

Page 87: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Routing Table

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 34 / 70

Page 88: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Routing Table

Missing nodes after insertion

Before a message is routed to a node p′ it is checked if p′ is alive.

The algorithm for insertion does not gurantee that all nodes updated.

Consider a network with no node with an ID with pre�x 1.

If id(p) starts with 1 all nodes will need to be updated.

However correct routing is still guarantied.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 35 / 70

Page 89: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Routing Table

Missing nodes after insertion

Before a message is routed to a node p′ it is checked if p′ is alive.

The algorithm for insertion does not gurantee that all nodes updated.

Consider a network with no node with an ID with pre�x 1.

If id(p) starts with 1 all nodes will need to be updated.

However correct routing is still guarantied.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 35 / 70

Page 90: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Routing Table

Missing nodes after insertion

Before a message is routed to a node p′ it is checked if p′ is alive.

The algorithm for insertion does not gurantee that all nodes updated.

Consider a network with no node with an ID with pre�x 1.

If id(p) starts with 1 all nodes will need to be updated.

However correct routing is still guarantied.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 35 / 70

Page 91: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Routing Table

Missing nodes after insertion

Before a message is routed to a node p′ it is checked if p′ is alive.

The algorithm for insertion does not gurantee that all nodes updated.

Consider a network with no node with an ID with pre�x 1.

If id(p) starts with 1 all nodes will need to be updated.

However correct routing is still guarantied.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 35 / 70

Page 92: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Routing Table

Missing nodes after insertion

Before a message is routed to a node p′ it is checked if p′ is alive.

The algorithm for insertion does not gurantee that all nodes updated.

Consider a network with no node with an ID with pre�x 1.

If id(p) starts with 1 all nodes will need to be updated.

However correct routing is still guarantied.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 35 / 70

Page 93: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Routing Table

Repairing the Routing Table II

Method from FreePastry:

A peer p gets message m routed from peer p′.

Let l ← p�x(id(p), id(m))if pfxl(id(p′), id(m)) = l and

R[l , id(m)[l ]] 6= null do

Send our R[l , ∗] to p′.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 36 / 70

Page 94: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Routing Table

Repairing the Routing Table II

Method from FreePastry:

A peer p gets message m routed from peer p′.

Let l ← p�x(id(p), id(m))if pfxl(id(p′), id(m)) = l and

R[l , id(m)[l ]] 6= null do

Send our R[l , ∗] to p′.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 36 / 70

Page 95: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Routing Table

Repairing the Routing Table II

Method from FreePastry:

A peer p gets message m routed from peer p′.

Let l ← p�x(id(p), id(m))if pfxl(id(p′), id(m)) = l and

R[l , id(m)[l ]] 6= null do

Send our R[l , ∗] to p′.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 36 / 70

Page 96: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Malicious Nodes

Methods against Malicious Nodes

What happens if there are nodes in the network that do not do what theyare supposed to do?

The algorithm discussed earlier is randomized.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 37 / 70

Page 97: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Malicious Nodes

Methods against Malicious Nodes

What happens if there are nodes in the network that do not do what theyare supposed to do?

The algorithm discussed earlier is randomized.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 37 / 70

Page 98: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Malicious Nodes

Methods against Malicious Nodes

What happens if there are nodes in the network that do not do what theyare supposed to do?

The algorithm discussed earlier is randomized.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 37 / 70

Page 99: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Malicious Nodes

Methods against Malicious Nodes

What happens if there are nodes in the network that do not do what theyare supposed to do?

The algorithm discussed earlier is randomized.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 37 / 70

Page 100: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Malicious Nodes

Methods against Malicious Nodes

What happens if there are nodes in the network that do not do what theyare supposed to do?

The algorithm discussed earlier is randomized.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 37 / 70

Page 101: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Malicious Nodes

Methods against Malicious Nodes

What happens if there are nodes in the network that do not do what theyare supposed to do?

The algorithm discussed earlier is randomized.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 37 / 70

Page 102: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Experimental Results

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 38 / 70

Page 103: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Experimental Results

Number of Hops

Average number of hops for b = 4, |L| = 16 and |M| = 32.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 39 / 70

Page 104: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Experimental Results

Number of Hops

Probability vs. Number of Hops.

Again with b = 4, |L| = 16 and |M| = 32 and n = 106.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 40 / 70

Page 105: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Experimental Results

Distances in Routing

Relative Distance vs. Number of Peers

Pastry is realtively good.

Finding short routes scales well.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 41 / 70

Page 106: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Experimental Results

Distances in Routing

Relative Distance vs. Number of Peers

Pastry is realtively good.

Finding short routes scales well.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 41 / 70

Page 107: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Experimental Results

Distances in Routing

Relative Distance vs. Number of Peers

Pastry is realtively good.

Finding short routes scales well.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 41 / 70

Page 108: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Experimental Results

Number of Entries

b = 4, |L| = 16 and |M| = 32 as before.

Set n to 106

∀p : |Rp| & (2b − 1) log2b n > 60

|Rp|+ |Lp|+ |Mp| & 108

This is more than most other networks.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 42 / 70

Page 109: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Stability Experimental Results

Number of Entries

b = 4, |L| = 16 and |M| = 32 as before.

Set n to 106

∀p : |Rp| & (2b − 1) log2b n > 60

|Rp|+ |Lp|+ |Mp| & 108

This is more than most other networks.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 42 / 70

Page 110: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook FreePastry

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 43 / 70

Page 111: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook FreePastry

FreePastry

Java-Implementation of Pastry.

Simultation or TCP/IP.

Can run Past or Scribe.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 44 / 70

Page 112: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook FreePastry

FreePastry

Java-Implementation of Pastry.

Simultation or TCP/IP.

Can run Past or Scribe.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 44 / 70

Page 113: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook FreePastry

FreePastry

Java-Implementation of Pastry.

Simultation or TCP/IP.

Can run Past or Scribe.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 44 / 70

Page 114: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Other applications

Other applications

Other applications build on Pastry include:

a pubish/subscribe system. (SCRIBE)

a caching system (SQUIRREL)

a messaging infrastructure (POST)

a high-bandwidth contend istribution system (SplitStream)

... and many more.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 45 / 70

Page 115: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Other applications

Other applications

Other applications build on Pastry include:

a pubish/subscribe system. (SCRIBE)

a caching system (SQUIRREL)

a messaging infrastructure (POST)

a high-bandwidth contend istribution system (SplitStream)

... and many more.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 45 / 70

Page 116: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Other applications

Other applications

Other applications build on Pastry include:

a pubish/subscribe system. (SCRIBE)

a caching system (SQUIRREL)

a messaging infrastructure (POST)

a high-bandwidth contend istribution system (SplitStream)

... and many more.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 45 / 70

Page 117: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Other applications

Other applications

Other applications build on Pastry include:

a pubish/subscribe system. (SCRIBE)

a caching system (SQUIRREL)

a messaging infrastructure (POST)

a high-bandwidth contend istribution system (SplitStream)

... and many more.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 45 / 70

Page 118: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Other applications

Other applications

Other applications build on Pastry include:

a pubish/subscribe system. (SCRIBE)

a caching system (SQUIRREL)

a messaging infrastructure (POST)

a high-bandwidth contend istribution system (SplitStream)

... and many more.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 45 / 70

Page 119: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Other applications

Other applications

Other applications build on Pastry include:

a pubish/subscribe system. (SCRIBE)

a caching system (SQUIRREL)

a messaging infrastructure (POST)

a high-bandwidth contend istribution system (SplitStream)

... and many more.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 45 / 70

Page 120: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 46 / 70

Page 121: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

A distributed �le storage system.

IDs of �les are the checksum of the �lename.

Files are stored in the k nodes with nearest IDs to the ID of a �le.

Mechanisms for maintaining this invariant are added to the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 47 / 70

Page 122: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

A distributed �le storage system.

IDs of �les are the checksum of the �lename.

Files are stored in the k nodes with nearest IDs to the ID of a �le.

Mechanisms for maintaining this invariant are added to the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 47 / 70

Page 123: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

A distributed �le storage system.

IDs of �les are the checksum of the �lename.

Files are stored in the k nodes with nearest IDs to the ID of a �le.

Mechanisms for maintaining this invariant are added to the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 47 / 70

Page 124: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

A distributed �le storage system.

IDs of �les are the checksum of the �lename.

Files are stored in the k nodes with nearest IDs to the ID of a �le.

Mechanisms for maintaining this invariant are added to the protocol.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 47 / 70

Page 125: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

Every node has a capacity.

If a node has a relatively high capacity it is split.

If a node has a relatively low capacity it is asked to leave the network.

Nodes may also join the network as observers.

For optimisation the following techniques are used:

Replica diversion to balance among near nodes.

File diversion to avoid a imbalance between regions of the ID-space.

Caching

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 48 / 70

Page 126: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

Every node has a capacity.

If a node has a relatively high capacity it is split.

If a node has a relatively low capacity it is asked to leave the network.

Nodes may also join the network as observers.

For optimisation the following techniques are used:

Replica diversion to balance among near nodes.

File diversion to avoid a imbalance between regions of the ID-space.

Caching

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 48 / 70

Page 127: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

Every node has a capacity.

If a node has a relatively high capacity it is split.

If a node has a relatively low capacity it is asked to leave the network.

Nodes may also join the network as observers.

For optimisation the following techniques are used:

Replica diversion to balance among near nodes.

File diversion to avoid a imbalance between regions of the ID-space.

Caching

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 48 / 70

Page 128: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

Every node has a capacity.

If a node has a relatively high capacity it is split.

If a node has a relatively low capacity it is asked to leave the network.

Nodes may also join the network as observers.

For optimisation the following techniques are used:

Replica diversion to balance among near nodes.

File diversion to avoid a imbalance between regions of the ID-space.

Caching

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 48 / 70

Page 129: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

Every node has a capacity.

If a node has a relatively high capacity it is split.

If a node has a relatively low capacity it is asked to leave the network.

Nodes may also join the network as observers.

For optimisation the following techniques are used:

Replica diversion to balance among near nodes.

File diversion to avoid a imbalance between regions of the ID-space.

Caching

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 48 / 70

Page 130: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

Every node has a capacity.

If a node has a relatively high capacity it is split.

If a node has a relatively low capacity it is asked to leave the network.

Nodes may also join the network as observers.

For optimisation the following techniques are used:

Replica diversion to balance among near nodes.

File diversion to avoid a imbalance between regions of the ID-space.

Caching

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 48 / 70

Page 131: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

Every node has a capacity.

If a node has a relatively high capacity it is split.

If a node has a relatively low capacity it is asked to leave the network.

Nodes may also join the network as observers.

For optimisation the following techniques are used:

Replica diversion to balance among near nodes.

File diversion to avoid a imbalance between regions of the ID-space.

Caching

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 48 / 70

Page 132: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook PAST

PAST

Every node has a capacity.

If a node has a relatively high capacity it is split.

If a node has a relatively low capacity it is asked to leave the network.

Nodes may also join the network as observers.

For optimisation the following techniques are used:

Replica diversion to balance among near nodes.

File diversion to avoid a imbalance between regions of the ID-space.

Caching

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 48 / 70

Page 133: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Scribe and SplitStream

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 49 / 70

Page 134: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Scribe and SplitStream

Scribe

Distribute data to many nodes.

There are topics.

Each topic has an ID.

One node is the root of the topic.

Build trees using the routing procedure of pastry.

Distribute messages from the root to the leafs of the tree.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 50 / 70

Page 135: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Scribe and SplitStream

Scribe

Distribute data to many nodes.

There are topics.

Each topic has an ID.

One node is the root of the topic.

Build trees using the routing procedure of pastry.

Distribute messages from the root to the leafs of the tree.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 50 / 70

Page 136: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Scribe and SplitStream

Scribe

Distribute data to many nodes.

There are topics.

Each topic has an ID.

One node is the root of the topic.

Build trees using the routing procedure of pastry.

Distribute messages from the root to the leafs of the tree.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 50 / 70

Page 137: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Scribe and SplitStream

Scribe

Distribute data to many nodes.

There are topics.

Each topic has an ID.

One node is the root of the topic.

Build trees using the routing procedure of pastry.

Distribute messages from the root to the leafs of the tree.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 50 / 70

Page 138: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Scribe and SplitStream

Scribe

Distribute data to many nodes.

There are topics.

Each topic has an ID.

One node is the root of the topic.

Build trees using the routing procedure of pastry.

Distribute messages from the root to the leafs of the tree.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 50 / 70

Page 139: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Scribe and SplitStream

Scribe

Distribute data to many nodes.

There are topics.

Each topic has an ID.

One node is the root of the topic.

Build trees using the routing procedure of pastry.

Distribute messages from the root to the leafs of the tree.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 50 / 70

Page 140: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Scribe and SplitStream

SplitStream

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 51 / 70

Page 141: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Conclusion and Outlook Scribe and SplitStream

SplitStream

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 52 / 70

Page 142: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Questions?

Page 143: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 54 / 70

Page 144: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Algorithm for Routing

Search(r)

if (id(L[−|L|/2]) ≤ r ≤ id(L[|L|/2]))Route to peer p′ ∈L, so that |r − id(p)′|is minimal.

return;

c ← pfxl(r , id(p))if (R[c, r [c]] 6= null)

Route to peer R[c , r [c]]return

Route to a p′ ∈ R ∪ L ∪M with

pfxl(r , id(p′)) ≥ c and

|r − id(p′)| < |r − id(p)|

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 55 / 70

Page 145: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Algorithm for Routing

Search(r)

if (id(L[−|L|/2]) ≤ r ≤ id(L[|L|/2]))Route to peer p′ ∈L, so that |r − id(p)′|is minimal.

return;

c ← pfxl(r , id(p))if (R[c, r [c]] 6= null)

Route to peer R[c , r [c]]return

Route to a p′ ∈ R ∪ L ∪M with

pfxl(r , id(p′)) ≥ c and

|r − id(p′)| < |r − id(p)|

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 55 / 70

Page 146: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Algorithm for Routing

Search(r)

if (id(L[−|L|/2]) ≤ r ≤ id(L[|L|/2]))Route to peer p′ ∈L, so that |r − id(p)′|is minimal.

return;

c ← pfxl(r , id(p))if (R[c, r [c]] 6= null)

Route to peer R[c , r [c]]return

Route to a p′ ∈ R ∪ L ∪M with

pfxl(r , id(p′)) ≥ c and

|r − id(p′)| < |r − id(p)|

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 55 / 70

Page 147: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Algorithm for Routing

Search(r)

if (id(L[−|L|/2]) ≤ r ≤ id(L[|L|/2]))Route to peer p′ ∈L, so that |r − id(p)′|is minimal.

return;

c ← pfxl(r , id(p))if (R[c , r [c]] 6= null)

Route to peer R[c , r [c]]return

Route to a p′ ∈ R ∪ L ∪M with

pfxl(r , id(p′)) ≥ c and

|r − id(p′)| < |r − id(p)|

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 55 / 70

Page 148: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Algorithm for Routing

Search(r)

if (id(L[−|L|/2]) ≤ r ≤ id(L[|L|/2]))Route to peer p′ ∈L, so that |r − id(p)′|is minimal.

return;

c ← pfxl(r , id(p))if (R[c , r [c]] 6= null)

Route to peer R[c , r [c]]return

Route to a p′ ∈ R ∪ L ∪M with

pfxl(r , id(p′)) ≥ c and

|r − id(p′)| < |r − id(p)|

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 55 / 70

Page 149: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Algorithm for Routing

Search(r)

if (id(L[−|L|/2]) ≤ r ≤ id(L[|L|/2]))Route to peer p′ ∈L, so that |r − id(p)′|is minimal.

return;

c ← pfxl(r , id(p))if (R[c , r [c]] 6= null)

Route to peer R[c , r [c]]return

Route to a p′ ∈ R ∪ L ∪M with

pfxl(r , id(p′)) ≥ c and

|r − id(p′)| < |r − id(p)|

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 55 / 70

Page 150: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Algorithm for Routing

Search(r)

if (id(L[−|L|/2]) ≤ r ≤ id(L[|L|/2]))Route to peer p′ ∈L, so that |r − id(p)′|is minimal.

return;

c ← pfxl(r , id(p))if (R[c , r [c]] 6= null)

Route to peer R[c , r [c]]return

Route to a p′ ∈ R ∪ L ∪M with

pfxl(r , id(p′)) ≥ c and

|r − id(p′)| < |r − id(p)|

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 55 / 70

Page 151: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Algorithm for Routing

Search(r)

if (id(L[−|L|/2]) ≤ r ≤ id(L[|L|/2]))Route to peer p′ ∈L, so that |r − id(p)′|is minimal.

return;

c ← pfxl(r , id(p))if (R[c , r [c]] 6= null)

Route to peer R[c , r [c]]return

Route to a p′ ∈ R ∪ L ∪M with

pfxl(r , id(p′)) ≥ c and

|r − id(p′)| < |r − id(p)|

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 55 / 70

Page 152: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Size of R

Theorem

Rp for node p contains ≤ O( log nb

2b) entries.

Proof.

∀m.P(∃q : pfxl(p, q) ≥ m ∧ p 6= q) = (n − 1) · (2−b)m

Let m = (c + 2) log nb

for constant c > 0.

P(...) = ... ≈ n−c−1 −→n→∞

0

It is probable that ai ,j = null for i > (c + 2) log nb

.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 56 / 70

Page 153: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Size of R

Theorem

Rp for node p contains ≤ O( log nb

2b) entries.

Proof.

∀m.P(∃q : pfxl(p, q) ≥ m ∧ p 6= q) = (n − 1) · (2−b)m

Let m = (c + 2) log nb

for constant c > 0.

P(...) = ... ≈ n−c−1 −→n→∞

0

It is probable that ai ,j = null for i > (c + 2) log nb

.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 56 / 70

Page 154: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Size of R

Theorem

Rp for node p contains ≤ O( log nb

2b) entries.

Proof.

∀m.P(∃q : pfxl(p, q) ≥ m ∧ p 6= q) = (n − 1) · (2−b)m

Let m = (c + 2) log nb

for constant c > 0.

P(...) = ... ≈ n−c−1 −→n→∞

0

It is probable that ai ,j = null for i > (c + 2) log nb

.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 56 / 70

Page 155: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Size of R

Theorem

Rp for node p contains ≤ O( log nb

2b) entries.

Proof.

∀m.P(∃q : pfxl(p, q) ≥ m ∧ p 6= q) = (n − 1) · (2−b)m

Let m = (c + 2) log nb

for constant c > 0.

P(...) = ... ≈ n−c−1 −→n→∞

0

It is probable that ai ,j = null for i > (c + 2) log nb

.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 56 / 70

Page 156: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Size of R

Theorem

Rp for node p contains ≤ O( log nb

2b) entries.

Proof.

∀m.P(∃q : pfxl(p, q) ≥ m ∧ p 6= q) = (n − 1) · (2−b)m

Let m = (c + 2) log nb

for constant c > 0.

P(...) = ... ≈ n−c−1 −→n→∞

0

It is probable that ai ,j = null for i > (c + 2) log nb

.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 56 / 70

Page 157: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Correctness

(Assume correct routing tables and leaf sets)

Theorem

Routing takes no more than O(n/|L|) steps.

Proof.

We only use the leaf set.

Let p0, p1, ..., pν be the nodes along the route.

∀i ∈ {0, ..., ν − 1} : pi+1 = Lpi[±|L|/2]

|id(Lpi[±|L|/2])− id(pi )| ≈ |ID|n ∗

|L|2

|id(p0)− id(pν)| ≤ |ID|2

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 57 / 70

Page 158: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Correctness

(Assume correct routing tables and leaf sets)

Theorem

Routing takes no more than O(n/|L|) steps.

Proof.

We only use the leaf set.

Let p0, p1, ..., pν be the nodes along the route.

∀i ∈ {0, ..., ν − 1} : pi+1 = Lpi[±|L|/2]

|id(Lpi[±|L|/2])− id(pi )| ≈ |ID|n ∗

|L|2

|id(p0)− id(pν)| ≤ |ID|2

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 57 / 70

Page 159: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Correctness

(Assume correct routing tables and leaf sets)

Theorem

Routing takes no more than O(n/|L|) steps.

Proof.

We only use the leaf set.

Let p0, p1, ..., pν be the nodes along the route.

∀i ∈ {0, ..., ν − 1} : pi+1 = Lpi[±|L|/2]

|id(Lpi[±|L|/2])− id(pi )| ≈ |ID|n ∗

|L|2

|id(p0)− id(pν)| ≤ |ID|2

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 57 / 70

Page 160: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Correctness

(Assume correct routing tables and leaf sets)

Theorem

Routing takes no more than O(n/|L|) steps.

Proof.

We only use the leaf set.

Let p0, p1, ..., pν be the nodes along the route.

∀i ∈ {0, ..., ν − 1} : pi+1 = Lpi[±|L|/2]

|id(Lpi[±|L|/2])− id(pi )| ≈ |ID|n ∗

|L|2

|id(p0)− id(pν)| ≤ |ID|2

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 57 / 70

Page 161: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Correctness

(Assume correct routing tables and leaf sets)

Theorem

Routing takes no more than O(n/|L|) steps.

Proof.

We only use the leaf set.

Let p0, p1, ..., pν be the nodes along the route.

∀i ∈ {0, ..., ν − 1} : pi+1 = Lpi[±|L|/2]

|id(Lpi[±|L|/2])− id(pi )| ≈ |ID|n ∗

|L|2

|id(p0)− id(pν)| ≤ |ID|2

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 57 / 70

Page 162: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Correctness

(Assume correct routing tables and leaf sets)

Theorem

Routing takes no more than O(n/|L|) steps.

Proof.

We only use the leaf set.

Let p0, p1, ..., pν be the nodes along the route.

∀i ∈ {0, ..., ν − 1} : pi+1 = Lpi[±|L|/2]

|id(Lpi[±|L|/2])− id(pi )| ≈ |ID|n ∗

|L|2

|id(p0)− id(pν)| ≤ |ID|2

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 57 / 70

Page 163: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Correctness

(Assume correct routing tables and leaf sets)

Theorem

Routing takes no more than O(n/|L|) steps.

Proof.

We only use the leaf set.

Let p0, p1, ..., pν be the nodes along the route.

∀i ∈ {0, ..., ν − 1} : pi+1 = Lpi[±|L|/2]

|id(Lpi[±|L|/2])− id(pi )| ≈ |ID|n ∗

|L|2

|id(p0)− id(pν)| ≤ |ID|2

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 57 / 70

Page 164: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Routing is fast.

Theorem

The excpected value is O(log2b n) = O( log nb

) messages.

Proof.

We use the routing table.

Each time a pi+1 is found in the routing tablepfxl(id(pi+1), r) > pfxl(id(pi ), r)

There are only approx. O( log nb

) rows in each routing table.

Now we use the leaf set.

The probability that two (three) hops in L are needed is .02 (.0006).

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 58 / 70

Page 165: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Routing is fast.

Theorem

The excpected value is O(log2b n) = O( log nb

) messages.

Proof.

We use the routing table.

Each time a pi+1 is found in the routing tablepfxl(id(pi+1), r) > pfxl(id(pi ), r)

There are only approx. O( log nb

) rows in each routing table.

Now we use the leaf set.

The probability that two (three) hops in L are needed is .02 (.0006).

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 58 / 70

Page 166: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Routing is fast.

Theorem

The excpected value is O(log2b n) = O( log nb

) messages.

Proof.

We use the routing table.

Each time a pi+1 is found in the routing tablepfxl(id(pi+1), r) > pfxl(id(pi ), r)

There are only approx. O( log nb

) rows in each routing table.

Now we use the leaf set.

The probability that two (three) hops in L are needed is .02 (.0006).

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 58 / 70

Page 167: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Routing is fast.

Theorem

The excpected value is O(log2b n) = O( log nb

) messages.

Proof.

We use the routing table.

Each time a pi+1 is found in the routing tablepfxl(id(pi+1), r) > pfxl(id(pi ), r)

There are only approx. O( log nb

) rows in each routing table.

Now we use the leaf set.

The probability that two (three) hops in L are needed is .02 (.0006).

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 58 / 70

Page 168: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Routing is fast.

Theorem

The excpected value is O(log2b n) = O( log nb

) messages.

Proof.

We use the routing table.

Each time a pi+1 is found in the routing tablepfxl(id(pi+1), r) > pfxl(id(pi ), r)

There are only approx. O( log nb

) rows in each routing table.

Now we use the leaf set.

The probability that two (three) hops in L are needed is .02 (.0006).

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 58 / 70

Page 169: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix E�ciency

Routing is fast.

Theorem

The excpected value is O(log2b n) = O( log nb

) messages.

Proof.

We use the routing table.

Each time a pi+1 is found in the routing tablepfxl(id(pi+1), r) > pfxl(id(pi ), r)

There are only approx. O( log nb

) rows in each routing table.

Now we use the leaf set.

The probability that two (three) hops in L are needed is .02 (.0006).

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 58 / 70

Page 170: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 59 / 70

Page 171: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer

Let p be a new peer with tables R , L and M.

Try to choose values for the routing table so, that distances areminimal.

Algorithm:

p contacts a peer p0. Assume that p is near to p0.

p sends a join-Message with recepient id(p).

Every peer that gets the message sends its R , L and M.

Let p0, p1, ..., pz be the path of the message.

Assume z ≥ m and pfxl(p, pi ) ≥ i for i < m − 1(Otherwise include nodes more than once.)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 60 / 70

Page 172: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer

Let p be a new peer with tables R , L and M.

Try to choose values for the routing table so, that distances areminimal.

Algorithm:

p contacts a peer p0. Assume that p is near to p0.

p sends a join-Message with recepient id(p).

Every peer that gets the message sends its R , L and M.

Let p0, p1, ..., pz be the path of the message.

Assume z ≥ m and pfxl(p, pi ) ≥ i for i < m − 1(Otherwise include nodes more than once.)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 60 / 70

Page 173: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer

Let p be a new peer with tables R , L and M.

Try to choose values for the routing table so, that distances areminimal.

Algorithm:

p contacts a peer p0. Assume that p is near to p0.

p sends a join-Message with recepient id(p).

Every peer that gets the message sends its R , L and M.

Let p0, p1, ..., pz be the path of the message.

Assume z ≥ m and pfxl(p, pi ) ≥ i for i < m − 1(Otherwise include nodes more than once.)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 60 / 70

Page 174: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer

Let p be a new peer with tables R , L and M.

Try to choose values for the routing table so, that distances areminimal.

Algorithm:

p contacts a peer p0. Assume that p is near to p0.

p sends a join-Message with recepient id(p).

Every peer that gets the message sends its R , L and M.

Let p0, p1, ..., pz be the path of the message.

Assume z ≥ m and pfxl(p, pi ) ≥ i for i < m − 1(Otherwise include nodes more than once.)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 60 / 70

Page 175: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer

Let p be a new peer with tables R , L and M.

Try to choose values for the routing table so, that distances areminimal.

Algorithm:

p contacts a peer p0. Assume that p is near to p0.

p sends a join-Message with recepient id(p).

Every peer that gets the message sends its R , L and M.

Let p0, p1, ..., pz be the path of the message.

Assume z ≥ m and pfxl(p, pi ) ≥ i for i < m − 1(Otherwise include nodes more than once.)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 60 / 70

Page 176: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer

Let p be a new peer with tables R , L and M.

Try to choose values for the routing table so, that distances areminimal.

Algorithm:

p contacts a peer p0. Assume that p is near to p0.

p sends a join-Message with recepient id(p).

Every peer that gets the message sends its R , L and M.

Let p0, p1, ..., pz be the path of the message.

Assume z ≥ m and pfxl(p, pi ) ≥ i for i < m − 1(Otherwise include nodes more than once.)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 60 / 70

Page 177: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer

Let p be a new peer with tables R , L and M.

Try to choose values for the routing table so, that distances areminimal.

Algorithm:

p contacts a peer p0. Assume that p is near to p0.

p sends a join-Message with recepient id(p).

Every peer that gets the message sends its R , L and M.

Let p0, p1, ..., pz be the path of the message.

Assume z ≥ m and pfxl(p, pi ) ≥ i for i < m − 1(Otherwise include nodes more than once.)

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 60 / 70

Page 178: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer (cont.)

Let M = M0.

|id(p)− id(pz)| is minimal.

Use Lz for L and insert pz at position 1 or −1.Let R[0, ∗] = R0[0, ∗]; R[1, ∗] = R1[1, ∗]; ... ;

pfxl(p, pi ) ≥ i ⇒ ∀q ∈ Ri [i , ∗].pfxl(q, p) ≥ i

Request Rq from all q ∈ M and look for better entries for R .

Notify every peer in M, L and R about our arrival.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 61 / 70

Page 179: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer (cont.)

Let M = M0.

|id(p)− id(pz)| is minimal.

Use Lz for L and insert pz at position 1 or −1.Let R[0, ∗] = R0[0, ∗]; R[1, ∗] = R1[1, ∗]; ... ;

pfxl(p, pi ) ≥ i ⇒ ∀q ∈ Ri [i , ∗].pfxl(q, p) ≥ i

Request Rq from all q ∈ M and look for better entries for R .

Notify every peer in M, L and R about our arrival.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 61 / 70

Page 180: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer (cont.)

Let M = M0.

|id(p)− id(pz)| is minimal.

Use Lz for L and insert pz at position 1 or −1.Let R[0, ∗] = R0[0, ∗]; R[1, ∗] = R1[1, ∗]; ... ;

pfxl(p, pi ) ≥ i ⇒ ∀q ∈ Ri [i , ∗].pfxl(q, p) ≥ i

Request Rq from all q ∈ M and look for better entries for R .

Notify every peer in M, L and R about our arrival.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 61 / 70

Page 181: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer (cont.)

Let M = M0.

|id(p)− id(pz)| is minimal.

Use Lz for L and insert pz at position 1 or −1.Let R[0, ∗] = R0[0, ∗]; R[1, ∗] = R1[1, ∗]; ... ;

pfxl(p, pi ) ≥ i ⇒ ∀q ∈ Ri [i , ∗].pfxl(q, p) ≥ i

Request Rq from all q ∈ M and look for better entries for R .

Notify every peer in M, L and R about our arrival.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 61 / 70

Page 182: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer (cont.)

Let M = M0.

|id(p)− id(pz)| is minimal.

Use Lz for L and insert pz at position 1 or −1.Let R[0, ∗] = R0[0, ∗]; R[1, ∗] = R1[1, ∗]; ... ;

pfxl(p, pi ) ≥ i ⇒ ∀q ∈ Ri [i , ∗].pfxl(q, p) ≥ i

Request Rq from all q ∈ M and look for better entries for R .

Notify every peer in M, L and R about our arrival.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 61 / 70

Page 183: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer (cont.)

Let M = M0.

|id(p)− id(pz)| is minimal.

Use Lz for L and insert pz at position 1 or −1.Let R[0, ∗] = R0[0, ∗]; R[1, ∗] = R1[1, ∗]; ... ;

pfxl(p, pi ) ≥ i ⇒ ∀q ∈ Ri [i , ∗].pfxl(q, p) ≥ i

Request Rq from all q ∈ M and look for better entries for R .

Notify every peer in M, L and R about our arrival.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 61 / 70

Page 184: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Insertion of a peer (cont.)

Let M = M0.

|id(p)− id(pz)| is minimal.

Use Lz for L and insert pz at position 1 or −1.Let R[0, ∗] = R0[0, ∗]; R[1, ∗] = R1[1, ∗]; ... ;

pfxl(p, pi ) ≥ i ⇒ ∀q ∈ Ri [i , ∗].pfxl(q, p) ≥ i

Request Rq from all q ∈ M and look for better entries for R .

Notify every peer in M, L and R about our arrival.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 61 / 70

Page 185: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Fact

The algorithm for inserting peers generates good R[i , j ].

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 62 / 70

Page 186: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Proof.

(Outline)

Assume that the routing tables are optimized.

R[0, ∗] is taken from p0.

∀q ∈ R[0, ∗]. d(p0, q) small =⇒ d(p, q) small.

R[1, ∗] is taken from p1.

∀q ∈ R[1, ∗] : d(p1, q) is good, d(p, p1) is good.

The following is needed: q ∈ {s|p�x(s, p) ≥ 1}Thus ∀q ∈ R[1, ∗] : d(p, q) is relatively small.

And so on for all R[i , ∗]

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 63 / 70

Page 187: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Proof.

(Outline)

Assume that the routing tables are optimized.

R[0, ∗] is taken from p0.

∀q ∈ R[0, ∗]. d(p0, q) small =⇒ d(p, q) small.

R[1, ∗] is taken from p1.

∀q ∈ R[1, ∗] : d(p1, q) is good, d(p, p1) is good.

The following is needed: q ∈ {s|p�x(s, p) ≥ 1}Thus ∀q ∈ R[1, ∗] : d(p, q) is relatively small.

And so on for all R[i , ∗]

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 63 / 70

Page 188: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Proof.

(Outline)

Assume that the routing tables are optimized.

R[0, ∗] is taken from p0.

∀q ∈ R[0, ∗]. d(p0, q) small =⇒ d(p, q) small.

R[1, ∗] is taken from p1.

∀q ∈ R[1, ∗] : d(p1, q) is good, d(p, p1) is good.

The following is needed: q ∈ {s|p�x(s, p) ≥ 1}Thus ∀q ∈ R[1, ∗] : d(p, q) is relatively small.

And so on for all R[i , ∗]

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 63 / 70

Page 189: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Proof.

(Outline)

Assume that the routing tables are optimized.

R[0, ∗] is taken from p0.

∀q ∈ R[0, ∗]. d(p0, q) small =⇒ d(p, q) small.

R[1, ∗] is taken from p1.

∀q ∈ R[1, ∗] : d(p1, q) is good, d(p, p1) is good.

The following is needed: q ∈ {s|p�x(s, p) ≥ 1}Thus ∀q ∈ R[1, ∗] : d(p, q) is relatively small.

And so on for all R[i , ∗]

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 63 / 70

Page 190: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Proof.

(Outline)

Assume that the routing tables are optimized.

R[0, ∗] is taken from p0.

∀q ∈ R[0, ∗]. d(p0, q) small =⇒ d(p, q) small.

R[1, ∗] is taken from p1.

∀q ∈ R[1, ∗] : d(p1, q) is good, d(p, p1) is good.

The following is needed: q ∈ {s|p�x(s, p) ≥ 1}Thus ∀q ∈ R[1, ∗] : d(p, q) is relatively small.

And so on for all R[i , ∗]

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 63 / 70

Page 191: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Proof.

(Outline)

Assume that the routing tables are optimized.

R[0, ∗] is taken from p0.

∀q ∈ R[0, ∗]. d(p0, q) small =⇒ d(p, q) small.

R[1, ∗] is taken from p1.

∀q ∈ R[1, ∗] : d(p1, q) is good, d(p, p1) is good.

The following is needed: q ∈ {s|p�x(s, p) ≥ 1}Thus ∀q ∈ R[1, ∗] : d(p, q) is relatively small.

And so on for all R[i , ∗]

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 63 / 70

Page 192: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Proof.

(Outline)

Assume that the routing tables are optimized.

R[0, ∗] is taken from p0.

∀q ∈ R[0, ∗]. d(p0, q) small =⇒ d(p, q) small.

R[1, ∗] is taken from p1.

∀q ∈ R[1, ∗] : d(p1, q) is good, d(p, p1) is good.

The following is needed: q ∈ {s|p�x(s, p) ≥ 1}Thus ∀q ∈ R[1, ∗] : d(p, q) is relatively small.

And so on for all R[i , ∗]

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 63 / 70

Page 193: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Proof.

(Outline)

Assume that the routing tables are optimized.

R[0, ∗] is taken from p0.

∀q ∈ R[0, ∗]. d(p0, q) small =⇒ d(p, q) small.

R[1, ∗] is taken from p1.

∀q ∈ R[1, ∗] : d(p1, q) is good, d(p, p1) is good.

The following is needed: q ∈ {s|p�x(s, p) ≥ 1}Thus ∀q ∈ R[1, ∗] : d(p, q) is relatively small.

And so on for all R[i , ∗]

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 63 / 70

Page 194: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Insertion

Locality in Insertion

Proof.

(Outline)

Assume that the routing tables are optimized.

R[0, ∗] is taken from p0.

∀q ∈ R[0, ∗]. d(p0, q) small =⇒ d(p, q) small.

R[1, ∗] is taken from p1.

∀q ∈ R[1, ∗] : d(p1, q) is good, d(p, p1) is good.

The following is needed: q ∈ {s|p�x(s, p) ≥ 1}Thus ∀q ∈ R[1, ∗] : d(p, q) is relatively small.

And so on for all R[i , ∗]

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 63 / 70

Page 195: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Repair

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 64 / 70

Page 196: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Repair

Repairing the Routing Table

How are missing entries in R �lled?

Algorithm:

A peer notices that it is missing an entry R[i , j ].It asks all other q ∈ R[i , ∗] for their entry Rq[i , j ]If this does not succeed it tries its next row R[i + 1, ∗], ...

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 65 / 70

Page 197: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Repair

Repairing the Routing Table

How are missing entries in R �lled?

Algorithm:

A peer notices that it is missing an entry R[i , j ].It asks all other q ∈ R[i , ∗] for their entry Rq[i , j ]If this does not succeed it tries its next row R[i + 1, ∗], ...

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 65 / 70

Page 198: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Repair

Repairing the Routing Table

How are missing entries in R �lled?

Algorithm:

A peer notices that it is missing an entry R[i , j ].It asks all other q ∈ R[i , ∗] for their entry Rq[i , j ]If this does not succeed it tries its next row R[i + 1, ∗], ...

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 65 / 70

Page 199: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Repair

Repairing the Routing Table

How are missing entries in R �lled?

Algorithm:

A peer notices that it is missing an entry R[i , j ].It asks all other q ∈ R[i , ∗] for their entry Rq[i , j ]If this does not succeed it tries its next row R[i + 1, ∗], ...

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 65 / 70

Page 200: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Overview

1 Data StructuresRouting TableLeaf SetNeighbourhood Set

2 OperationsRoutingInsertion of peersLocalityLocality in Routing

3 StabilityLeaf SetRouting TableExperimental Results

4 Conclusion and OutlookFreePastryPASTScribe and SplitStreamE�ciencyInsertionRepairMalicious Nodes

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 66 / 70

Page 201: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Malicious Nodes

There may be faulty implemtations of pastry.

There may be nodes that try to interfer with the network.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 67 / 70

Page 202: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Malicious Nodes

There may be faulty implemtations of pastry.

There may be nodes that try to interfer with the network.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 67 / 70

Page 203: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Assumtions

Routing in pastry is deterministic.

Invariant: In routing through ...pi , pi+1, ... to ID r :

pfxl(id(pi+1), r) > pfxl(id(pi ), r) or at least

|id(pi+1)− r | > |id(pi )− r |

Assumption: Most nodes in the network are working properly

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 68 / 70

Page 204: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Assumtions

Routing in pastry is deterministic.

Invariant: In routing through ...pi , pi+1, ... to ID r :

pfxl(id(pi+1), r) > pfxl(id(pi ), r) or at least

|id(pi+1)− r | > |id(pi )− r |

Assumption: Most nodes in the network are working properly

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 68 / 70

Page 205: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Assumtions

Routing in pastry is deterministic.

Invariant: In routing through ...pi , pi+1, ... to ID r :

pfxl(id(pi+1), r) > pfxl(id(pi ), r) or at least

|id(pi+1)− r | > |id(pi )− r |

Assumption: Most nodes in the network are working properly

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 68 / 70

Page 206: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Assumtions

Routing in pastry is deterministic.

Invariant: In routing through ...pi , pi+1, ... to ID r :

pfxl(id(pi+1), r) > pfxl(id(pi ), r) or at least

|id(pi+1)− r | > |id(pi )− r |

Assumption: Most nodes in the network are working properly

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 68 / 70

Page 207: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Assumtions

Routing in pastry is deterministic.

Invariant: In routing through ...pi , pi+1, ... to ID r :

pfxl(id(pi+1), r) > pfxl(id(pi ), r) or at least

|id(pi+1)− r | > |id(pi )− r |

Assumption: Most nodes in the network are working properly

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 68 / 70

Page 208: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Methods against Malicious Nodes

The algorithm discussed earlier is randomized.

The invariant is maintaied.

A strong bias towards using R is applied.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 69 / 70

Page 209: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Methods against Malicious Nodes

The algorithm discussed earlier is randomized.

The invariant is maintaied.

A strong bias towards using R is applied.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 69 / 70

Page 210: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Methods against Malicious Nodes

The algorithm discussed earlier is randomized.

The invariant is maintaied.

A strong bias towards using R is applied.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 69 / 70

Page 211: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Methods against Malicious Nodes

The algorithm discussed earlier is randomized.

The invariant is maintaied.

A strong bias towards using R is applied.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 69 / 70

Page 212: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Methods against Malicious Nodes

The algorithm discussed earlier is randomized.

The invariant is maintaied.

A strong bias towards using R is applied.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 69 / 70

Page 213: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Methods against Malicious Nodes

The algorithm discussed earlier is randomized.

The invariant is maintaied.

A strong bias towards using R is applied.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 69 / 70

Page 214: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Methods against Malicious Nodes

The algorithm discussed earlier is randomized.

The invariant is maintaied.

A strong bias towards using R is applied.

No single node stores all copies of a piece of data.

Nodes send replies when they store data etc.

Messages are signed.

id(p) is the checksum of p's public key.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 69 / 70

Page 215: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Robustness

Remove 10% of all peers from the network.

Then repair:

Randomly choose two peers p and q and an ID d .

Send a message from p and from q to d .

Repeat 100.000 times.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 70 / 70

Page 216: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Robustness

Remove 10% of all peers from the network.

Then repair:

Randomly choose two peers p and q and an ID d .

Send a message from p and from q to d .

Repeat 100.000 times.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 70 / 70

Page 217: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Robustness

Remove 10% of all peers from the network.

Then repair:

Randomly choose two peers p and q and an ID d .

Send a message from p and from q to d .

Repeat 100.000 times.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 70 / 70

Page 218: Pastry - TUM · Pastry R. Himmelmann Ferienakademie im Sarntal 2008 AUF Erlangen-Nürnberg, TU München, Uni Stuttgart October 12, 2008 R. Himmelmann (Ferienakademie '08) Pastry October

Appendix Malicious Nodes

Robustness

Remove 10% of all peers from the network.

Then repair:

Randomly choose two peers p and q and an ID d .

Send a message from p and from q to d .

Repeat 100.000 times.

R. Himmelmann (Ferienakademie '08) Pastry October 12, 2008 70 / 70