From chaos to order: self-stabilizing distributed datastructure (e.g., p2p) failures,
adversary, attack, … ..... Classic data structures: lists, trees. ▫ Linked list: move ...
Self-stabilizing and Self-optimizing
Distributed Data Structures
Stefan Schmid (TU Berlin & T-Labs) Collaborators: Riko Jacob, Andrea Richa, Christian Scheideler, Hanjo Täubig, …
1
Self-stabilizing and Self-optimizing
Distributed Data Structures
Stefan Schmid (TU Berlin & T-Labs) Collaborators: Riko Jacob, Andrea Richa, Christian Scheideler, Hanjo Täubig, …
2
Bremen Stadtmusikanten On A Windy Evening
© Shlomi’s book 3
Stefan Schmid (T-Labs)
Bremen Stadtmusikanten On A Windy Evening Page 1 Page 4
Page 22
Requirements: - Play “happy birthday” again and again - Wind changes pages without players knowing! - When wind stops, harmonize eventually! 4
Stefan Schmid (T-Labs)
Bremen Stadtmusikanten On A Windy Evening Page 1 Page 4
Page 22
How to achieve? Idea 1: If out of sync, just change to the page of a nearby player! But what if the neighbor does the same? Do not know who was right! May never converge…
Idea 2: Go to start when asynchrony detected! But players further away detect it later and restart later! May never converge… 5
Stefan Schmid (T-Labs)
Bremen Stadtmusikanten On A Windy Evening Page 1 Page 4
Page 22
What about synchronizing to the neighbor with the smallest page number? What about…? We need a “self-stabilizing algorithm”! How to achieve? Idea 1: If out of sync, just change to the page of a nearby player! But what if the neighbor does the same? Do not know who was right! May never converge…
Idea 2: Go to start when asynchrony detected! But players further away detect it later and restart later! May never converge… 6
Stefan Schmid (T-Labs)
A Historical Note
Self-stabilizing algorithms pioneered by Dijkstra (1973): for example self-stabilizing mutual exclusion.
“I regard this as Dijkstra’s most brilliant work. Self-stabilization is a very important concept in fault tolerance.” Leslie Lamport (PODC 1983)
7
Stefan Schmid (T-Labs)
This Talk: Topological Self-Stabilization From chaos to order: self-stabilizing distributed datastructure (e.g., p2p)
failures, adversary, attack, …
t0 adversary stops
t0+D desired structure
8
Stefan Schmid (T-Labs)
Formal View Example: Hypercube (log+log)
110
111 011
010 100 000
110
101 001
failures, adversary, attack, …
100 000
100
101 001
t0 weakly connected
111 011
010
011
010
110
111
000
101 001
t0+D stabilized hypercube
9
Stefan Schmid (T-Labs)
Formal View Example: Hypercube (log+log)
110
111 011
010 100 000
110 011
010 101
001
failures, adversary, attack, …
100 000
110
111
011
010
How? 101
001
t0 weakly connected
000
111
100
101 001
t0+D stabilized hypercube
How: Distributed: local algorithm Fast: minimize D, and stay there! 10
Stefan Schmid (T-Labs)
Model & Terminology Configuration
Rules
110
Constants: identifiers Variables: neighborhoods (set of identifiers) Union over all nodes
111
011
010 100
101
001
000
Scheduler: execute enabled actions Gives next configuration In parallel, or “scalably”
100 000
111
100 000
101
111
Self-Stabilization
011
010 101
001
111
110
111 011
010
001
001
110
101
101
Execution
Condition: on local state Action: propose new link in neighborhood Careful: stay connected!
Convergence: eventually we end up in desired configuration Closure: once there, stays there
001 11
Stefan Schmid (T-Labs)
Performance Metrics 110
100
111 011
010
011
010
000
110
111
100
101 000
001
t0
101 001
t0+D
weakly connected
stabilized
Parallel Time complexity
Number of parallel rounds until stabilization in the worst case Depends on scheduler (scalable: only constant number of enabled actions per node)
Work
Number of changed edges
Input-sensitive
Local repairs and joins/leaves 12
Stefan Schmid (T-Labs)
Local Algorithms (LOCAL Model)
Send...
... receive...
... compute.
13
Stefan Schmid (T-Labs)
Talk Overview
Primo Piatto: Linearization
Main Dish: The Skip+ Graph
Dessert: Delaunay Graphs & Co.
Digestive: From Self-Stabilization to Self-Optimization
14
Stefan Schmid (T-Labs)
Linearization Input: Weakly Connected Graph
1
2
3
4
5
6
7
8
5
6
7
8
Output: Sorted Network (wrt IDs!) 1
How?
2
3
4
Local neighborhood changes only Preserve connectivity Once there, stay there
15
Stefan Schmid (T-Labs)
A First Insight: Local Checkability Basic requirement: 1
Yes!
2
Yes!
3
Yes!
4
Yes!
5
6
7
8
No!
No!
No!
No!
At least one node must observe (and continue changing)! Local checkability:
F(
Yes!
Yes!
Yes!
No!
) = No! 16 Stefan Schmid (T-Labs)
Most Simple Undirected Linearization Linearize left (x