A Distributed Polylogarithmic Time Algorithm for Self-Stabilizing - - PowerPoint PPT Presentation

a distributed polylogarithmic time algorithm for self
SMART_READER_LITE
LIVE PREVIEW

A Distributed Polylogarithmic Time Algorithm for Self-Stabilizing - - PowerPoint PPT Presentation

A Distributed Polylogarithmic Time Algorithm for Self-Stabilizing Skip Graphs Christian Decker Distributed Computing Seminar Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 1 / 35 Outline Skip Graphs 1


slide-1
SLIDE 1

A Distributed Polylogarithmic Time Algorithm for Self-Stabilizing Skip Graphs

Christian Decker Distributed Computing Seminar

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 1 / 35

slide-2
SLIDE 2

Outline

1

Skip Graphs

2

ALG+ Idea Rules

3

How it works Bottom-Up Top-Down Node join / departure

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 2 / 35

slide-3
SLIDE 3

Overview

1

Skip Graphs

2

ALG+ Idea Rules

3

How it works Bottom-Up Top-Down Node join / departure

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 3 / 35

slide-4
SLIDE 4

What is a DHT and what is it used for?

Datastructure for storage of data. Scalable Decentralized High fault tolerance

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 4 / 35

slide-5
SLIDE 5

How to create a simple DHT

5 7 9 3 1 4 3 6 9 2

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 5 / 35

slide-6
SLIDE 6

Weaknesses of our Ring design

Long search/put/get operations Single failures result in unrecoverable state

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 6 / 35

slide-7
SLIDE 7

Multiple Rings?

5 7 9 3 1 4

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 7 / 35

slide-8
SLIDE 8

The idea behind Skip Graphs

We generalize the idea of having multiple lists: Each node participates in multiple rings/lists

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 8 / 35

slide-9
SLIDE 9

The idea behind Skip Graphs

We generalize the idea of having multiple lists: Each node participates in multiple rings/lists Each node has a random String rs, of sufficient length

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 8 / 35

slide-10
SLIDE 10

The idea behind Skip Graphs

We generalize the idea of having multiple lists: Each node participates in multiple rings/lists Each node has a random String rs, of sufficient length Each ring/list is identified by a prefix of length i

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 8 / 35

slide-11
SLIDE 11

The idea behind Skip Graphs

We generalize the idea of having multiple lists: Each node participates in multiple rings/lists Each node has a random String rs, of sufficient length Each ring/list is identified by a prefix of length i A node participates in a list if its rs matches the prefix of the list (prei(u))

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 8 / 35

slide-12
SLIDE 12

The idea behind Skip Graphs

We generalize the idea of having multiple lists: Each node participates in multiple rings/lists Each node has a random String rs, of sufficient length Each ring/list is identified by a prefix of length i A node participates in a list if its rs matches the prefix of the list (prei(u)) Each node has a successor (succi(u)) and predecessor (predi(u)) in each list it is participating in

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 8 / 35

slide-13
SLIDE 13

The complete picture

rs=... rs=0 rs=1 rs=00 rs=01 rs=10 rs=11 i=0 i=1 i=2 1 1 1

27 27 27 24 24 24 22 17 22 22 17 17 14 14 10 10 10 9 9 9 7 7 7 6 6 6 5 5 5 3 3 3 2 2 2 14

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 9 / 35

slide-14
SLIDE 14

Summary: Skip Graphs

Logarithmic diameter Hypercubic-style Routing in O(log(n)) Not locally verifiable

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 10 / 35

slide-15
SLIDE 15

Overview

1

Skip Graphs

2

ALG+ Idea Rules

3

How it works Bottom-Up Top-Down Node join / departure

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 11 / 35

slide-16
SLIDE 16

Goals

Start from any weakly connected graph O(log2(n)) rounds to stabilize Fast node join and departure once stabilized

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 12 / 35

slide-17
SLIDE 17

Idea

Divide the algorithm in two phases:

1

Bottom-up phase: create connected ρ-components for all prefixes ρ

2

Top-Down phase: sort each list by merging the the already sorted ρ1- and ρ0-components into a ρ-component

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 13 / 35

slide-18
SLIDE 18

Idea

It’s nothing more than distributed merge sort.

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 14 / 35

slide-19
SLIDE 19

Tools

We have to slightly extend the original Skip Graph:

Extended Predecessor/Successor

Instead of considering just predecessor and successor from our prefix we already look ahead at the next bit: pred∗

i (v, x) = pred(v, {w|prei+1(w) = prei(v) ◦ x})

succ∗

i (v, x) = succ(v, {w|prei+1(w) = prei(v) ◦ x})

Range

Take the farthest away of successor and predecessor. All nodes in between will be in the range and will be the neighbors of the current node: v.range∗[i] = [min{pred∗

i (v, x)}, max{succ∗ i (v, x)}]

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 15 / 35

slide-20
SLIDE 20

The final Picture

rs=... rs=0 rs=1 rs=00 rs=01 rs=10 rs=11 i=0 i=0 i=1 1 1 1

27 27 27 24 24 24 22 17 22 22 17 17 14 14 10 10 10 9 9 9 7 7 7 6 6 6 5 5 5 3 3 3 2 2 2 14

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 16 / 35

slide-21
SLIDE 21

The final Picture

rs=... rs=0 rs=1 rs=00 rs=01 rs=10 rs=11 i=0 i=0 i=1 1 1 1

27 27 27 24 24 24 22 17 22 22 17 17 14 14 10 10 10 9 9 9 7 7 7 6 6 6 5 5 5 3 3 3 2 2 2 14

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 17 / 35

slide-22
SLIDE 22

Tools

Stable / Temporary edges

Edges are either temporary or stable. Edges are considered stable if (from the local view of the node) it will appear in the finished Skip+

  • Graph. Stable edges are represented by a local flag u.F(v) = 1

ρ-component

A subgraph of all nodes sharing the prefix ρ.

ρ-Buddy

Each node has a Buddy at each level | ρ |= i which differs at the last

  • bit. These are used to pass temporary to better fitting candidates.

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 18 / 35

slide-23
SLIDE 23

Basic operations

insert(u, v) is the basic operation of the algorithm. Any node w issues an insert(u, v) operation to a node u telling it to add v to its neighborhood.

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 19 / 35

slide-24
SLIDE 24

Rounds

Preprocessing

◮ Process all insert(u, v) requests by adding them as temporary

(u.F(v) = 0)

◮ Check liveness of neighbors and remove failed ones ◮ For every i determine predi(u, 0), predi(u, 1), succi(u, 0) and

succi(u, 1)

◮ Send state updates to neighbors

Execute Rules according to local state

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 20 / 35

slide-25
SLIDE 25

Rules

Rule 1a: Create reverse edges

For every stable edge (u, v), u sets u.F(v) = 1 and initiates an insert(v, u)

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 21 / 35

slide-26
SLIDE 26

Rules

Rule 1a: Create reverse edges

For every stable edge (u, v), u sets u.F(v) = 1 and initiates an insert(v, u)

Rule 1b and 1c: Introduce Stable Edges

u initiates insert(v, w) and insert(w, v) for every neighbors w in the range of v (prei(v) = prei(w) and w.id ∈ v.range[i])

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 21 / 35

slide-27
SLIDE 27

Rules

Rule 2: Forward Temporary Edges

Every temporary edge (u, v) is forwarded to a stable neightbor of u that has the largest common prefix with v.rs

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 22 / 35

slide-28
SLIDE 28

Rules

Rule 3a: Introduce All

Every node u that has changed its stable edge set (destabilizing or stabilizing edges) they introduce all neighbors with each other. insert(u, v) u, v ∈ N(w)

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 23 / 35

slide-29
SLIDE 29

Rules

Rule 3a: Introduce All

Every node u that has changed its stable edge set (destabilizing or stabilizing edges) they introduce all neighbors with each other. insert(u, v) u, v ∈ N(w)

Rule 3b: Linearize

u identifies stable neighbors (v1, . . . , vk), with common prefix of length i, orders them by vk.id and executes insert(v1, v2), insert(v2, v3), . . . , insert(vk−1, vk)

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 23 / 35

slide-30
SLIDE 30

Overview

1

Skip Graphs

2

ALG+ Idea Rules

3

How it works Bottom-Up Top-Down Node join / departure

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 24 / 35

slide-31
SLIDE 31

How it works: Bottom-up

Remember that we want to create connected components for each non-trivial prefix ρ

ρ-connected graphs stay connected

If a and b are ρ-connected at time t0, then they’ll be ρ-connected at any t > t0

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 25 / 35

slide-32
SLIDE 32

How it works: Bottom-up

σ-V-Links

If we have two nodes u and v with prefix ρx = σ and a node w with prefix ρ¯ x and u, v ∈ N(w), then u and v are said to be σ-V-Linked. If two nodes are σ-V-Linked they’ll be σ-connected in the next round.

24 22 10

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 26 / 35

slide-33
SLIDE 33

How it works: Bottom-up

σ-k-Bridges

Two nodes a and b with prefix σ = ρx are in different components. c (d) is a stable neighbor of a (b) with prefix ρ¯

  • x. c and d are connected

at level | ρ | +k.

27 24 24 17 14 14

k

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 27 / 35

slide-34
SLIDE 34

How it works: Bottom-up

(σ, k)-pre-components

Two nodes in different ρx = σ components are in a (σ, k)-pre-component if Gρ, each has a buddy in ρ¯ x and they are connected (directly, via a σ-V-Link or via a (σ, k′)-bridge with k′ ≤ k). After 4 rounds a and b are σ-connected.

27 22 17 9 7 6 5

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 28 / 35

slide-35
SLIDE 35

How it works: Bottom-up

Bubbling up temporary edges

A temporary edge (u, v) at level l either stabilizes, or forwarded to l +1.

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 29 / 35

slide-36
SLIDE 36

How it works: Bottom-up

Connecting higher levels

If Gρ is connected at time t then at time t + (H− | ρ |) + O(log(n)) the graphs Gρ0 and Gρ1 will also be connected.

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 30 / 35

slide-37
SLIDE 37

How it works: Bottom-up

Connecting higher levels

If Gρ is connected at time t then at time t + (H− | ρ |) + O(log(n)) the graphs Gρ0 and Gρ1 will also be connected.

Connecting every level

Since every node participates in O(log(n)) levels, connecting each level takes O(log2(n))

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 30 / 35

slide-38
SLIDE 38

How it works: Top-down

We merge already sorted to build the lower levels:

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 31 / 35

slide-39
SLIDE 39

How it works: Top-down

We merge already sorted to build the lower levels:

i-finished

The graph is i-finished if ∀ρ with | ρ |= i, Gρ contains all edges of the final Skip+ Graph and is stably connected to all nodes in his range.

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 31 / 35

slide-40
SLIDE 40

How it works: Top-down

We merge already sorted to build the lower levels:

i-finished

The graph is i-finished if ∀ρ with | ρ |= i, Gρ contains all edges of the final Skip+ Graph and is stably connected to all nodes in his range.

Moving down

If at time t the graph is i-finished, at time t + 3 it will be (i − 1) − finished.

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 31 / 35

slide-41
SLIDE 41

Summary

Connecting all levels takes O(log2(n)) rounds Ordering all levels adds O(log(n)) rounds Overall complexity is O(log2(n))

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 32 / 35

slide-42
SLIDE 42

Node join / departure

The Skip+ Graph has degree O(log(n)) When a node joins/leaves only the neighbors are involved At most O(log4(n)) work (edge inserts) Joins / Leaves can be handled O(log(n)) rounds

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 33 / 35

slide-43
SLIDE 43

References

Skip Graphs, James Aspnes and Gauri Shah, Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 384-393, Baltimore, MD, USA, 12â14 January 2003 A distributed polylogarithmic time algorithm for self-stabilizing skip graphs, Riko Jacob, Andrea Richa, Christian Scheideler, Stefan Schmid, and Hanjo Täubig, PODC 09: Proceedings of the 28th ACM symposium on Principles of distributed computing, pages 131â140, New York, NY, USA, 2009. ACM

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 34 / 35

slide-44
SLIDE 44

Questions?

Christian Decker () Polylog Algorithm for Skip-Graphs Distributed Computing Seminar 35 / 35