SlideShare una empresa de Scribd logo
1 de 226
Descargar para leer sin conexión
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Algorithms for
Cloud Computing
Nokia Wrocław, Poland
Miotacze Piorunów Team:
Sławek Zborowski, Marek Zdonek, Andrzej Albin, Bartek ’BaSz’ Szurgot
December 16, 2015
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Miotacze Piorunów Team :-)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Miotacze Piorunów - the flag :-)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Roadmap
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
http://dailynewsdig.com/wp-content/uploads/2013/06/20-Funny-Shocked-Cat-Memes-3.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Roadmap
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
http://dailynewsdig.com/wp-content/uploads/2013/06/20-Funny-Shocked-Cat-Memes-3.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cloud blitzkrieg! :-)
http://upload.wikimedia.org/wikipedia/commons/1/10/Bundesarchiv_Bild_101I-646-5188-17%2C_Flugzeuge_Junkers_Ju_87.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 1
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Supercomputers - ’60-’80
http://upload.wikimedia.org/wikipedia/commons/c/c4/CDC_6600.jc.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Clusters - since ’70
http://upload.wikimedia.org/wikipedia/commons/3/3d/Us-nasa-columbia.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Grids - since ’90
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
P2P - since end of ’90
http://upload.wikimedia.org/wikipedia/en/f/fa/Unstructured_peer-to-peer_network_diagram.png
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Clouds - since ’00
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
What is cloud?
No single definition
A bit grid-like
With massive storage
CPUs + data put close
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
What is cloud?
No single definition
A bit grid-like
With massive storage
CPUs + data put close
Commonly agreed
Data intensive
Lot of CPU power
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
What is cloud?
No single definition
A bit grid-like
With massive storage
CPUs + data put close
Commonly agreed
Data intensive
Lot of CPU power
S C A L E!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cloud types
http://upload.wikimedia.org/wikipedia/commons/b/b5/Cloud_computing.svg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
What makes it different?
Scale bring problems. . .
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
What makes it different?
Scale bring problems. . .
Mean Time Between Failures (MTBF):
Server: 6 years
Disk: 4 years
Good results!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
What makes it different?
Scale bring problems. . .
Mean Time Between Failures (MTBF):
Server: 6 years
Disk: 4 years
Good results!
10k servers (2 disk each)
Every day:
5 servers die
14 disks fail
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
What makes it different?
Scale bring problems. . .
Mean Time Between Failures (MTBF):
Server: 6 years
Disk: 4 years
Good results!
10k servers (2 disk each)
Every day:
5 servers die
14 disks fail
Lesson learned
At scale incredibly rare is a commonplace.
http://upload.wikimedia.org/wikipedia/commons/b/b9/Hard_disk_failure.jpeg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
How to deal with it?
Errors do happen
Any time
Any place
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
How to deal with it?
Errors do happen
Any time
Any place
Massive scale
Lots of communication
Unreliable networks
Data intensive
. . .
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
How to deal with it?
Errors do happen
Any time
Any place
Massive scale
Lots of communication
Unreliable networks
Data intensive
. . .
Addressed by software
Algorithms
http://upload.wikimedia.org/wikipedia/commons/1/19/Train_wreck_at_Montparnasse_1895.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 2
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The problem
Massive scale system
Node has new data
How to inform others?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The problem
Massive scale system
Node has new data
How to inform others?
One-to-one?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The problem
Massive scale system
Node has new data
How to inform others?
One-to-one?
Will take ages to propagate!
What about packet loss?
What about node loss?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The problem
Massive scale system
Node has new data
How to inform others?
One-to-one?
Will take ages to propagate!
What about packet loss?
What about node loss?
All-to-all?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The problem
Massive scale system
Node has new data
How to inform others?
One-to-one?
Will take ages to propagate!
What about packet loss?
What about node loss?
All-to-all?
O(N2
) messages!
Sending will kill any network!
Receiving will kill every node!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The problem
Massive scale system
Node has new data
How to inform others?
One-to-one?
Will take ages to propagate!
What about packet loss?
What about node loss?
All-to-all?
O(N2
) messages!
Sending will kill any network!
Receiving will kill every node!
We can do better than that. . .
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The solution
1 Each node:
1 Pick random node
2 Send update to it
3 Receive incoming messages / wait
4 Repeat periodically
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The solution
1 Each node:
1 Pick random node
2 Send update to it
3 Receive incoming messages / wait
4 Repeat periodically
2 Run on all nodes
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example run
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example run
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example run
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example run
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example run
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Spreads like a disease!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Gossip at Amazon S3
Amazon S3:
Simple Storage Service
Online file storage
Part of Amazon Web Services
Gossiping:
Spreading state info
Base component of storage
Some numbers:
Over 2 ∗ 1012
objects (2013)
99.9% availability/month
99.99% availability/year
99.999999999% durability/year
https://upload.wikimedia.org/wikipedia/commons/e/ed/AWS_Simple_Icons_Storage_Amazon_S3_Bucket_with_Objects.svg
https://upload.wikimedia.org/wikipedia/commons/1/1d/AmazonWebservices_Logo.svg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 3
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Basic concepts
Aka. "failure detection"
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Basic concepts
Aka. "failure detection"
Properties:
Accuracy == no mistakes during judgment
Completeness == every failure is detected
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Basic concepts
Aka. "failure detection"
Properties:
Accuracy == no mistakes during judgment
Completeness == every failure is detected
Speed == time to first detection
Scale == distributing load on nodes uniformly
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Basic concepts
Aka. "failure detection"
Properties:
Accuracy == no mistakes during judgment
Completeness == every failure is detected
Speed == time to first detection
Scale == distributing load on nodes uniformly
Accuracy vs. completeness
Cannot have both (over unreliable networks)!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The idea
Inform others:
You’re alive
Others known to be:
Alive
Dead
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The idea
Inform others:
You’re alive
Others known to be:
Alive
Dead
That is:
Propagate dead/alive info. . .
Over large number of nodes. . .
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The idea
Inform others:
You’re alive
Others known to be:
Alive
Dead
That is:
Propagate dead/alive info. . .
Over large number of nodes. . .
Sounds familiar? :-)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Yup!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Local entries table
Each node keeps table
Table for node A:
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Local entries table
Each node keeps table
Table for node A: Three columns
1 Node name
2 Heartbeat count
3 Entry timeout
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Local entries table
Each node keeps table
Table for node A: Three columns
1 Node name
2 Heartbeat count
3 Entry timeout
Timeout is local
Timed out entries are dead
Heartbeat incremented on send
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Merging entries
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Merging entries
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Amazon DynamoDB
Amazon DynamoDB:
Database-like
Distributed Hash Table (DHT)
Powers Amazon Web Services
Used by Amazon S3
Membership + failure detection
No central register
Excelent scaling
https://upload.wikimedia.org/wikipedia/commons/e/ed/AWS_Simple_Icons_Storage_Amazon_S3_Bucket_with_Objects.svg
https://upload.wikimedia.org/wikipedia/commons/1/1d/AmazonWebservices_Logo.svg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 4
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Overview
Scalable, Weakly-consistent, Infection-style Membership protocol
Pings instead of heartbeats
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Overview
Scalable, Weakly-consistent, Infection-style Membership protocol
Pings instead of heartbeats
Algorithm:
1 Ping 1, random host (H)
2 Of got pong == ok (done)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Overview
Scalable, Weakly-consistent, Infection-style Membership protocol
Pings instead of heartbeats
Algorithm:
1 Ping 1, random host (H)
2 Of got pong == ok (done)
3 Else
1 Ask N, random hosts to ping (H)
2 1 "ack" == ok
3 Else mark as failed
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Overview
Scalable, Weakly-consistent, Infection-style Membership protocol
Pings instead of heartbeats
Algorithm:
1 Ping 1, random host (H)
2 Of got pong == ok (done)
3 Else
1 Ask N, random hosts to ping (H)
2 1 "ack" == ok
3 Else mark as failed
Extra attempt to verify:
Special (more network paths)
Temporal (more time to response)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example - direct ping succeeded
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example - direct ping succeeded
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example - direct ping failed
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example - all pings failed
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Suspicion mechanism
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Suspicion mechanism
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 5
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Overview
Classic algorithm
Proposed by Google
Sourcing from functional languages
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Overview
Classic algorithm
Proposed by Google
Sourcing from functional languages
Two stages:
Map
Reduce
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Overview
Classic algorithm
Proposed by Google
Sourcing from functional languages
Two stages:
Map
Reduce
Mapping:
Input: raw source data
Output: (key -> value) pairs
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Overview
Classic algorithm
Proposed by Google
Sourcing from functional languages
Two stages:
Map
Reduce
Mapping:
Input: raw source data
Output: (key -> value) pairs
Reducing:
Input: (key -> values[])
Output: (key -> merged-values)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cars example
Input: database of cars registered, per year
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cars example
Input: database of cars registered, per year
1991:
Opel Vectra, ABS
Mercedes W124, ABS, airbag
1995:
Opel Vectra, AC, TC
Dodge Viper, ABS, airbag
...
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cars example
Input: database of cars registered, per year
1991:
Opel Vectra, ABS
Mercedes W124, ABS, airbag
1995:
Opel Vectra, AC, TC
Dodge Viper, ABS, airbag
...
Query: which cars where produced when?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cars example
Input: database of cars registered, per year
1991:
Opel Vectra, ABS
Mercedes W124, ABS, airbag
1995:
Opel Vectra, AC, TC
Dodge Viper, ABS, airbag
...
Query: which cars where produced when?
Opel Vectra: 1988-2009
Dodge Viper: 1992-1995
...
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Computations
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Algorithm properties
Mapping:
Generation is independent
Perfect parallel task
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Algorithm properties
Mapping:
Generation is independent
Perfect parallel task
Reducing:
Can be run in parallel
Good distribution of mapped entries needed!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Algorithm properties
Mapping:
Generation is independent
Perfect parallel task
Reducing:
Can be run in parallel
Good distribution of mapped entries needed!
Algorithm:
Highly parallel
Widely adopted
Common solution for batch tasks
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Practical applications
https://upload.wikimedia.org/wikipedia/commons/a/aa/Logo_Google_2013_Official.svg
https://upload.wikimedia.org/wikipedia/commons/0/0e/Hadoop_logo.svg
https://upload.wikimedia.org/wikipedia/en/f/f8/CouchDB.svg
https://upload.wikimedia.org/wikipedia/en/e/eb/MongoDB_Logo.png
https://upload.wikimedia.org/wikipedia/en/8/8e/Riak_distributed_NoSQL_key-value_data_store_logo.png
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 6
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Once upon a time...
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Once upon a time...
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Once upon a time...
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Consensus
Consensus problem
Reaching an agreement upon a single value/state.
Fundamental problem in distributed systems
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Consensus
Consensus problem
Reaching an agreement upon a single value/state.
Fundamental problem in distributed systems
How to:
Agree upon single value?
Tolerate failures?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Consensus
Consensus problem
Reaching an agreement upon a single value/state.
Fundamental problem in distributed systems
How to:
Agree upon single value?
Tolerate failures?
Example algorithms:
Paxos
Raft
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Raft’s organization
Node is in a given state
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Raft’s organization
Node is in a given state
Basic operations:
Leader election
Log replication ("state machine")
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Raft’s organization
Node is in a given state
Basic operations:
Leader election
Log replication ("state machine")
Voting for a leader
"Term counter":
Identify voting rounds
Incremented by candidate
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Raft’s organization
Node is in a given state
Basic operations:
Leader election
Log replication ("state machine")
Voting for a leader
"Term counter":
Identify voting rounds
Incremented by candidate
Leader:
Send heartbeats
Synchronizes followers
Clients talk with leader
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Log replication
How log
(state machine)
is replicated?
https://fiftytwomedia.files.wordpress.com/2011/05/cloned-sheep.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Log replication
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Log replication
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Log replication
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Log replication
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Log replication
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Log replication
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Leader election
How leader
election works?
http://i.huffpost.com/gen/1849024/thumbs/o-ELECTION-BALLOT-facebook.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Leader election
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Leader election
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Leader election
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Leader election
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Leader election
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Leader election
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
That simple?
Does leader
election
always work?
http://cache.gawkerassets.com/assets/images/4/2010/01/500x_hamshred.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Split vote
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Split vote
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Split vote
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Split vote
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Split vote
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Split vote
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Split vote
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Raft’s ecosystem
Base of CockroachDB
Widespread use
"Paxos made simple"
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Raft’s ecosystem
Base of CockroachDB
Widespread use
"Paxos made simple"
Raft’s implementations:
cppa-raft, LogCabin, bspolley/raft, noeleo/raft, whitewater,
willemt/raft, NRaft, dupdob/RAFTiNG, dinghy, melee, raft-clj,
rodriguezvalencia/rafting, draft, zraft_lib, eraft, huckleberry,
rafter, rafterl, Flotten, graft, go-raft, etcd/raft, hashicorp/raft,
jpathy/raft, peterbourgon/raft, pontoon, seaturtles, kontiki,
allengeorge/libraft, barge, chicm/CmRaft, copycat,
drpicox/uoc-raft-2013p, jalvaro/raft, jgroups-raft,
RaftKVDatabase/JSimpleDB, OpenDaylight, pvilas/raft,
Raft4WS, Raft-JVM, r4j, liferaft, benbjohnson/raft.js,
dannycoates/raft-core, kanaka/raft.js, skiff, ocaml-raft,
py-raft, simpleRaft, floss, giraft, harryw/raft, zodiac-prime,
hoverbear/raft, akka-raft, archie/raft, cb372/raft, chelan,
ckite, scalaraft, lite-raft, C5, yora, srned/Prez, fxsjy/Ins
https://pbs.twimg.com/profile_images/592837647577587714/eNMItpUG_400x400.png
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 7
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Network partitioning
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Network partitioning
+
http://upload.wikimedia.org/wikipedia/commons/b/b9/Kitchen-Scissors.jpg
http://upload.wikimedia.org/wikipedia/commons/4/49/Fibreoptic.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
CAP theorem
Systems’ properties:
1 Consistency
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
CAP theorem
Systems’ properties:
1 Consistency
2 Availability
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
CAP theorem
Systems’ properties:
1 Consistency
2 Availability
3 Partition-tolerance
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
CAP theorem
Systems’ properties:
1 Consistency
2 Availability
3 Partition-tolerance
CAP theorem
Having C/A/P – choose (at most) 2 of 3!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
CAP theorem
Systems’ properties:
1 Consistency
2 Availability
3 Partition-tolerance
CAP theorem
Having C/A/P – choose (at most) 2 of 3!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example systems’ classification
Having:
Consistency
Availability
Partition-tolerance
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example systems’ classification
Having:
Consistency
Availability
Partition-tolerance
Examples:
PostgreSQL – CAP
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example systems’ classification
Having:
Consistency
Availability
Partition-tolerance
Examples:
PostgreSQL – CAP
MongoDB – CAP
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example systems’ classification
Having:
Consistency
Availability
Partition-tolerance
Examples:
PostgreSQL – CAP
MongoDB – CAP
Cassandra – CAP
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example systems’ classification
Having:
Consistency
Availability
Partition-tolerance
Examples:
PostgreSQL – CAP
MongoDB – CAP
Cassandra – CAP
In reality:
Modulo bugs! :-)
Often configuration-dependent. . .
"Call me maybe" series
https://upload.wikimedia.org/wikipedia/commons/2/29/Postgresql_elephant.svg
https://upload.wikimedia.org/wikipedia/commons/5/5e/Cassandra_logo.svg
https://upload.wikimedia.org/wikipedia/en/e/eb/MongoDB_Logo.png
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 8
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Synchronizing time
Given events:
A (at nodeA)
B (at nodeB)
Did A happened before B?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Synchronizing time
Given events:
A (at nodeA)
B (at nodeB)
Did A happened before B?
Check their time!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Synchronizing time
Given events:
A (at nodeA)
B (at nodeB)
Did A happened before B?
Check their time!
Are clocks in sync? (clock skew)
How precise?
What about latencies?
Will clocks remain in sync? (clock drift)
http://1.bp.blogspot.com/-m4Wd15SQ3eY/T75YMmeYwrI/AAAAAAAAAaw/nrH2BxGSimw/s320/Clock+art-Salvador+Dali.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cristian’s algorithm
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cristian’s algorithm
Assuming delay1 = delay2
New time: t1 = t + RTT
2
Where:
RTT – Round Trip Time
t1 – new local time
t – time from remote party
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cristian’s algorithm
Assuming delay1 = delay2
New time: t1 = t + RTT
2
Where:
RTT – Round Trip Time
t1 – new local time
t – time from remote party
Fairly Simple™;-)
Often imprecise
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cristian’s algorithm
Assuming delay1 = delay2
New time: t1 = t + RTT
2
Where:
RTT – Round Trip Time
t1 – new local time
t – time from remote party
Fairly Simple™;-)
Often imprecise
Single point of synchronization
Does not scale
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
NTP’s algorithm
Network Time Protocol
More clock sources
Better scalability
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
NTP’s algorithm
Network Time Protocol
More clock sources
Better scalability
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
NTP’s algorithm
Network Time Protocol
More clock sources
Better scalability
Better RTT estimation
Probabilistic analysis of data
Continuous operation
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
NTP’s algorithm
Network Time Protocol
More clock sources
Better scalability
Better RTT estimation
Probabilistic analysis of data
Continuous operation
Commonly use in the Internet
Still clocks skew and drift. . .
http://upload.wikimedia.org/wikipedia/commons/c/c9/Network_Time_Protocol_servers_and_clients.svg
http://upload.wikimedia.org/wikipedia/commons/8/8d/NTP-Algorithm.svg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Now what if...
Cannot solve?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Now what if...
Cannot solve?
Step back
Find a different path. . .
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Now what if...
Cannot solve?
Step back
Find a different path. . .
What is REALLY needed?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Now what if...
Cannot solve?
Step back
Find a different path. . .
What is REALLY needed?
Ordering knowledge
"What happened first?"
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Now what if...
Cannot solve?
Step back
Find a different path. . .
What is REALLY needed?
Ordering knowledge
"What happened first?"
Can be done without time. . .
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 9
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Logical ordering
Lamport’s Time Stamp
Proposed by Leslie Lamport
Establishes happens-before relation
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Logical ordering
Lamport’s Time Stamp
Proposed by Leslie Lamport
Establishes happens-before relation
Each process has counter lts
Initially lts = 0
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Logical ordering
Lamport’s Time Stamp
Proposed by Leslie Lamport
Establishes happens-before relation
Each process has counter lts
Initially lts = 0
Algorithm:
Before sending: lts = lts + 1
Include counter in the message
When receiving: lts = max(lts, msg_lts) + 1
Also can increment at will
https://upload.wikimedia.org/wikipedia/commons/5/50/Leslie_Lamport.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Come again?
http://lshss.pubs.asha.org/data/Journals/LSHSS/930529/LSHSS_45_3_220fig0.jpeg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Properties
Events: A and B
With timestamps: C(A) and C(B)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Properties
Events: A and B
With timestamps: C(A) and C(B)
A → B ⇒ C(A) < C(B)
Note: implication!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Properties
Events: A and B
With timestamps: C(A) and C(B)
A → B ⇒ C(A) < C(B)
Note: implication!
What does C(A) < C(B) mean?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Properties
Events: A and B
With timestamps: C(A) and C(B)
A → B ⇒ C(A) < C(B)
Note: implication!
What does C(A) < C(B) mean?
One of:
A → B
A B
But not B → A
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Properties
Events: A and B
With timestamps: C(A) and C(B)
A → B ⇒ C(A) < C(B)
Note: implication!
What does C(A) < C(B) mean?
One of:
A → B
A B
But not B → A
Cause-effect ordering!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Let’s check!
C(A) < C(B) ⇔ A → B ∨ A B
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Lamport’s timestamps at . . .
Pretty much everywhere. . . ;)
Including. . .
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Lamport’s timestamps at . . .
Pretty much everywhere. . . ;)
Including. . .
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Lamport’s timestamps at . . .
Pretty much everywhere. . . ;)
Including. . .
Part of BTS software:
WCDMA OAM
SRAN OAM
Cloud OAM
Distributed service registration
Introduces logical ordering
Registration updates’ ordering
https://upload.wikimedia.org/wikipedia/commons/0/02/Nokia_wordmark.svg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 10
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Enhanced logical ordering
Similar to Lamport’s timestamps
Detects parallel events
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Enhanced logical ordering
Similar to Lamport’s timestamps
Detects parallel events
Each process has vector of counters vc = [c1, c2, ..., cN]
Initially vc = [0, 0, ..., 0]
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Enhanced logical ordering
Similar to Lamport’s timestamps
Detects parallel events
Each process has vector of counters vc = [c1, c2, ..., cN]
Initially vc = [0, 0, ..., 0]
Algorithm:
On i-th node
Before sending: vc[i] = vc[i] + 1
Include vector in the message
When receiving:
∀j = i : vc[j] = max(vc[j], msg_vc[j])
vc[i] = vc[i] + 1
Also can increment local counter at will
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
You don’t say. . .
http://syosseths.com/z/acapics/mathslide.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Properties
Events: A and B
With vector clocks: VC(A) and VC(B)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Properties
Events: A and B
With vector clocks: VC(A) and VC(B)
Operations:
vc1 = vc2 ⇔ ∀i : vc1[i] = vc2[i]
vc1 ≤ vc2 ⇔ ∀i : vc1[i] ≤ vc2[i]
vc1 < vc2 ⇔ vc1 ≤ vc2 ∧ ∃i : vc1[i] < vc2[i]
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Properties
Events: A and B
With vector clocks: VC(A) and VC(B)
Operations:
vc1 = vc2 ⇔ ∀i : vc1[i] = vc2[i]
vc1 ≤ vc2 ⇔ ∀i : vc1[i] ≤ vc2[i]
vc1 < vc2 ⇔ vc1 ≤ vc2 ∧ ∃i : vc1[i] < vc2[i]
Causality:
A → B ⇔ vc(A) < vc(B)
A B ⇔ ¬(vc(A) ≤ vc(B)) ∧ ¬(vc(B) ≤ vc(A))
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Let’s check!
A → B ⇔ vc(A) < vc(B)
A B ⇔ ¬(vc(A) ≤ vc(B)) ∧ ¬(vc(B) ≤ vc(A))
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Vector clocks inside Riak
Riak:
NoSQL data base
Based on "Dynamo" paper
VC for eventual consistency
Help solve conflicts:
Resolve duplicates
Detect latest version
Detect simultaneous updates
https://upload.wikimedia.org/wikipedia/en/8/8e/Riak_distributed_NoSQL_key-value_data_store_logo.png
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 11
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Hash table
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Distributed Hash Table (DHT)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Keys distribution
https://upload.wikimedia.org/wikipedia/commons/9/98/DHT_en.svg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
DHTs everywhere
Common since the end of ’90
Base of most NoSQL DBs
Advantages:
Massive storage
Decentralized
Fault tolerant
Scalable
https://upload.wikimedia.org/wikipedia/commons/5/5e/Cassandra_logo.svg
http://www.gluster.org/images/antmascot.png?1432254431
https://upload.wikimedia.org/wikipedia/en/8/8e/Riak_distributed_NoSQL_key-value_
data_store_logo.png
https://upload.wikimedia.org/wikipedia/commons/6/6d/Transmission_icon.png
https://upload.wikimedia.org/wikipedia/en/9/9f/UTorrent_%28logo%29.png
https://upload.wikimedia.org/wikipedia/commons/9/9e/Qbittorrent_logo.png
https://upload.wikimedia.org/wikipedia/commons/f/ff/Qbittorrent_mascot.png
https://upload.wikimedia.org/wikipedia/en/d/d5/BitComet_logo.svg
https://upload.wikimedia.org/wikipedia/commons/0/0a/Shareaza.png
https://upload.wikimedia.org/wikipedia/en/d/d6/Logo_of_BearShare_from_Website.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 12
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The ring
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The ring
Ring-organized
m-bits (2m
possible entries)
Ordered clock-wise
Node keeps preceding keys
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The ring
Ring-organized
m-bits (2m
possible entries)
Ordered clock-wise
Node keeps preceding keys
Nodes hashed by:
Address (IP?)
Port
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
The ring
Ring-organized
m-bits (2m
possible entries)
Ordered clock-wise
Node keeps preceding keys
Nodes hashed by:
Address (IP?)
Port
Keys:
User’s hash
Share key space with nodes
SHA-1 commonly used
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Finger table
Each node keeps own
m-entries
(n + 2i
)%2m
Where:
i – entry number
n – node’s number
m – hash bits
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Finger table
Each node keeps own
m-entries
(n + 2i
)%2m
Where:
i – entry number
n – node’s number
m – hash bits
Here: n = 4, m = 4
i.e. 24
= 16 entries
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
One ring to hash them all!
https://upload.wikimedia.org/wikipedia/commons/b/b7/Unico_Anello.png
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Query algorithm
1 Having query for k
2 If has k – return it
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Query algorithm
1 Having query for k
2 If has k – return it
3 next = max(ft[i] : i ∈ 0; m) ∧ ft[i] k)
4 Note: ft[i] k is done on the ring!
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Query algorithm
1 Having query for k
2 If has k – return it
3 next = max(ft[i] : i ∈ 0; m) ∧ ft[i] k)
4 Note: ft[i] k is done on the ring!
5 If has next – return it
6 Else return first successor
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Query example
Node 4 – query 1
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Query example
Node 4 – query 1
Finger tables:
1 n = 4
ft[0] = 8
ft[1] = 8
ft[2] = 8
ft[3] = 12
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Query example
Node 4 – query 1
Finger tables:
1 n = 4
ft[0] = 8
ft[1] = 8
ft[2] = 8
ft[3] = 12
2 n = 12
ft[0] = 0
ft[1] = 0
ft[2] = 0
ft[3] = 4
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Query example
Node 4 – query 1
Finger tables:
1 n = 4
ft[0] = 8
ft[1] = 8
ft[2] = 8
ft[3] = 12
2 n = 12
ft[0] = 0
ft[1] = 0
ft[2] = 0
ft[3] = 4
3 n = 0
ft[0] = 2
ft[1] = 2
ft[2] = 4
ft[3] = 8
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Additional notes
O(log N) memory
(Amortized) O(log N) lookup
Considered almost O(1)
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Additional notes
O(log N) memory
(Amortized) O(log N) lookup
Considered almost O(1)
Other scenarios:
Initialization – query for self
Nodes joining – splitting ranges
Nodes leaving – merging ranges
Nodes crashing = nodes leaving
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Additional notes
O(log N) memory
(Amortized) O(log N) lookup
Considered almost O(1)
Other scenarios:
Initialization – query for self
Nodes joining – splitting ranges
Nodes leaving – merging ranges
Nodes crashing = nodes leaving
Failures handing:
Duplication of data
More entries per finger table
Keeping few predecessors
Monitoring neighborhood
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 13
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Idea
Split space:
k affinity groups
k ≈
√
N
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Idea
Split space:
k affinity groups
k ≈
√
N
Group based on node’s hash
Node in a group knows:
All members of its group
One node per other groups
All group’s hashes
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Example - node 2
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Local query
Querying for
key from the same
affinity group
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Node #2 querying "yellow" key
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
It’s here!
http://asalesguyrecruiting.com/wp-content/uploads/2014/03/Oh-Hell-Yeah-566x372.png
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Remote query
Querying for
key from different
affinity group
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Node #2 querying "red" key
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Node #2 querying "red" key
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Node #2 querying "red" key
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Node #2 querying "red" key
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Additional notes
(Amortized) O(1) lookup
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Additional notes
(Amortized) O(1) lookup
O(
√
N) memory
Scary?
Not really. . .
N ≈ millions → few MBs. . .
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Additional notes
(Amortized) O(1) lookup
O(
√
N) memory
Scary?
Not really. . .
N ≈ millions → few MBs. . .
Other scenarios:
Initialization – query own affinity group
Nodes joining – more data replicated
Nodes leaving – less replication
Nodes crashing = nodes leaving
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Additional notes
(Amortized) O(1) lookup
O(
√
N) memory
Scary?
Not really. . .
N ≈ millions → few MBs. . .
Other scenarios:
Initialization – query own affinity group
Nodes joining – more data replicated
Nodes leaving – less replication
Nodes crashing = nodes leaving
Failures handing:
Monitoring own affinity group
Querying others for affinity neighbors
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Part 14
1 Introduction
2 Gossip
3 Membership
4 SWIM
5 Map-Reduce
6 Raft
7 CAP
8 Time
9 LTS
10 Vector clocks
11 DHT
12 Chord
13 Kelips
14 What next?
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Cloud @ enterprises
http://enterpriseitadoption.com/images/adoption_cycle.png
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
More to learn...
Coursera:
Cloud computing concepts – part 1 & 2
Cloud computing applications
Cloud networking
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
More to learn...
Coursera:
Cloud computing concepts – part 1 & 2
Cloud computing applications
Cloud networking
Other problems/algorithms:
Mutual exclusion
Snapshoting
Multicast problem
Transactions
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
More to learn...
Coursera:
Cloud computing concepts – part 1 & 2
Cloud computing applications
Cloud networking
Other problems/algorithms:
Mutual exclusion
Snapshoting
Multicast problem
Transactions
General concepts:
Microservices
Continuous deployment
NoSQL
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
More to learn...
Coursera:
Cloud computing concepts – part 1 & 2
Cloud computing applications
Cloud networking
Other problems/algorithms:
Mutual exclusion
Snapshoting
Multicast problem
Transactions
General concepts:
Microservices
Continuous deployment
NoSQL
Hot topics:
Docker
NewSQL
. . .
http://matthewjamestaylor.com/img/recursive-drawing/pubic-hair.jpg
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Keep learning
Johann Wolfgang von Goethe
What we do not understand we do not possess.
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Keep learning
Johann Wolfgang von Goethe
What we do not understand we do not possess.
Knowledge is power
Better understanding
Control over environment
Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next?
Questions?
?

Más contenido relacionado

Destacado

cyber terrorism
cyber terrorismcyber terrorism
cyber terrorismAccenture
 
Cyber Terrorism Presentation
Cyber Terrorism PresentationCyber Terrorism Presentation
Cyber Terrorism Presentationmerlyna
 
Cyber Wars And Cyber Terrorism
Cyber Wars And Cyber TerrorismCyber Wars And Cyber Terrorism
Cyber Wars And Cyber TerrorismGanesh DNP
 
Internet Protocol version 6
Internet Protocol version 6Internet Protocol version 6
Internet Protocol version 6Rekha Yadav
 

Destacado (7)

cyber terrorism
cyber terrorismcyber terrorism
cyber terrorism
 
ipv6 ppt
ipv6 pptipv6 ppt
ipv6 ppt
 
Cyber Terrorism Presentation
Cyber Terrorism PresentationCyber Terrorism Presentation
Cyber Terrorism Presentation
 
IPv6
IPv6IPv6
IPv6
 
Cyber Wars And Cyber Terrorism
Cyber Wars And Cyber TerrorismCyber Wars And Cyber Terrorism
Cyber Wars And Cyber Terrorism
 
CYBER TERRORISM
     CYBER TERRORISM     CYBER TERRORISM
CYBER TERRORISM
 
Internet Protocol version 6
Internet Protocol version 6Internet Protocol version 6
Internet Protocol version 6
 

Similar a Algorithms for Cloud Computing

IBM SAN Volume Controller Performance Analysis
IBM SAN Volume Controller Performance AnalysisIBM SAN Volume Controller Performance Analysis
IBM SAN Volume Controller Performance Analysisbrettallison
 
Maximize Application Performance and Bandwidth Efficiency with WAN Optimization
Maximize Application Performance and Bandwidth Efficiency with WAN OptimizationMaximize Application Performance and Bandwidth Efficiency with WAN Optimization
Maximize Application Performance and Bandwidth Efficiency with WAN OptimizationCisco Enterprise Networks
 
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYC
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYCPractical webRTC - from API to Solution - webRTC Summit 2014 @ NYC
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYCAlexandre Gouaillard
 
Twitch Plays Pokémon: Twitch's Chat Architecture
Twitch Plays Pokémon: Twitch's Chat ArchitectureTwitch Plays Pokémon: Twitch's Chat Architecture
Twitch Plays Pokémon: Twitch's Chat ArchitectureC4Media
 
Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?APNIC
 
Tears for quantum fears
Tears for quantum fearsTears for quantum fears
Tears for quantum fearsMark Carney
 
YOW! Data Keynote (2021)
YOW! Data Keynote (2021)YOW! Data Keynote (2021)
YOW! Data Keynote (2021)Sid Anand
 
Layer one 2011-gh0stwood-d-dos-attacks
Layer one 2011-gh0stwood-d-dos-attacksLayer one 2011-gh0stwood-d-dos-attacks
Layer one 2011-gh0stwood-d-dos-attacksfangjiafu
 
C* Summit 2013: Time is Money Jake Luciani and Carl Yeksigian
C* Summit 2013: Time is Money Jake Luciani and Carl YeksigianC* Summit 2013: Time is Money Jake Luciani and Carl Yeksigian
C* Summit 2013: Time is Money Jake Luciani and Carl YeksigianDataStax Academy
 
Mining Billion-node Graphs: Patterns, Generators and Tools__HadoopSummit2010
Mining Billion-node Graphs: Patterns, Generators and Tools__HadoopSummit2010Mining Billion-node Graphs: Patterns, Generators and Tools__HadoopSummit2010
Mining Billion-node Graphs: Patterns, Generators and Tools__HadoopSummit2010Yahoo Developer Network
 
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...confluent
 
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...confluent
 
WebRTC: A front-end perspective
WebRTC: A front-end perspectiveWebRTC: A front-end perspective
WebRTC: A front-end perspectiveshwetank
 
FOSDEM 2021 - Infrastructure as Code Drift & Driftctl
FOSDEM 2021 - Infrastructure as Code Drift & DriftctlFOSDEM 2021 - Infrastructure as Code Drift & Driftctl
FOSDEM 2021 - Infrastructure as Code Drift & DriftctlStephane Jourdan
 
Journey through the ML model deployment to production @DSC5
Journey through the ML model deployment to production @DSC5Journey through the ML model deployment to production @DSC5
Journey through the ML model deployment to production @DSC5SmartCat
 
A journey through the machine learning model deployment to production
A journey through the machine learning model deployment to productionA journey through the machine learning model deployment to production
A journey through the machine learning model deployment to productionInstitute of Contemporary Sciences
 
Nluug dev ops conference privatecloud&devops
Nluug dev ops conference   privatecloud&devopsNluug dev ops conference   privatecloud&devops
Nluug dev ops conference privatecloud&devopsMicrosoft
 
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)Thomas Graf
 

Similar a Algorithms for Cloud Computing (20)

IBM SAN Volume Controller Performance Analysis
IBM SAN Volume Controller Performance AnalysisIBM SAN Volume Controller Performance Analysis
IBM SAN Volume Controller Performance Analysis
 
Maximize Application Performance and Bandwidth Efficiency with WAN Optimization
Maximize Application Performance and Bandwidth Efficiency with WAN OptimizationMaximize Application Performance and Bandwidth Efficiency with WAN Optimization
Maximize Application Performance and Bandwidth Efficiency with WAN Optimization
 
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYC
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYCPractical webRTC - from API to Solution - webRTC Summit 2014 @ NYC
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYC
 
Twitch Plays Pokémon: Twitch's Chat Architecture
Twitch Plays Pokémon: Twitch's Chat ArchitectureTwitch Plays Pokémon: Twitch's Chat Architecture
Twitch Plays Pokémon: Twitch's Chat Architecture
 
Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?
 
Tears for quantum fears
Tears for quantum fearsTears for quantum fears
Tears for quantum fears
 
IPv6 @ Cloudflare
IPv6 @ CloudflareIPv6 @ Cloudflare
IPv6 @ Cloudflare
 
YOW! Data Keynote (2021)
YOW! Data Keynote (2021)YOW! Data Keynote (2021)
YOW! Data Keynote (2021)
 
Layer one 2011-gh0stwood-d-dos-attacks
Layer one 2011-gh0stwood-d-dos-attacksLayer one 2011-gh0stwood-d-dos-attacks
Layer one 2011-gh0stwood-d-dos-attacks
 
C* Summit 2013: Time is Money Jake Luciani and Carl Yeksigian
C* Summit 2013: Time is Money Jake Luciani and Carl YeksigianC* Summit 2013: Time is Money Jake Luciani and Carl Yeksigian
C* Summit 2013: Time is Money Jake Luciani and Carl Yeksigian
 
Mining Billion-node Graphs: Patterns, Generators and Tools__HadoopSummit2010
Mining Billion-node Graphs: Patterns, Generators and Tools__HadoopSummit2010Mining Billion-node Graphs: Patterns, Generators and Tools__HadoopSummit2010
Mining Billion-node Graphs: Patterns, Generators and Tools__HadoopSummit2010
 
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
 
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
 
WebRTC: A front-end perspective
WebRTC: A front-end perspectiveWebRTC: A front-end perspective
WebRTC: A front-end perspective
 
FOSDEM 2021 - Infrastructure as Code Drift & Driftctl
FOSDEM 2021 - Infrastructure as Code Drift & DriftctlFOSDEM 2021 - Infrastructure as Code Drift & Driftctl
FOSDEM 2021 - Infrastructure as Code Drift & Driftctl
 
Journey through the ML model deployment to production @DSC5
Journey through the ML model deployment to production @DSC5Journey through the ML model deployment to production @DSC5
Journey through the ML model deployment to production @DSC5
 
A journey through the machine learning model deployment to production
A journey through the machine learning model deployment to productionA journey through the machine learning model deployment to production
A journey through the machine learning model deployment to production
 
Nluug dev ops conference privatecloud&devops
Nluug dev ops conference   privatecloud&devopsNluug dev ops conference   privatecloud&devops
Nluug dev ops conference privatecloud&devops
 
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
 
nodebots presentation @seekjobs
nodebots presentation @seekjobsnodebots presentation @seekjobs
nodebots presentation @seekjobs
 

Más de Sławomir Zborowski

C++ Undefined Behavior (Code::Dive 2016)
C++ Undefined Behavior (Code::Dive 2016)C++ Undefined Behavior (Code::Dive 2016)
C++ Undefined Behavior (Code::Dive 2016)Sławomir Zborowski
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...Sławomir Zborowski
 
What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...Sławomir Zborowski
 
Boost.Python - domesticating the snake
Boost.Python - domesticating the snakeBoost.Python - domesticating the snake
Boost.Python - domesticating the snakeSławomir Zborowski
 
Metaprogramming in C++ - from 70's to C++17
Metaprogramming in C++ - from 70's to C++17Metaprogramming in C++ - from 70's to C++17
Metaprogramming in C++ - from 70's to C++17Sławomir Zborowski
 
How it's made: C++ compilers (GCC)
How it's made: C++ compilers (GCC)How it's made: C++ compilers (GCC)
How it's made: C++ compilers (GCC)Sławomir Zborowski
 

Más de Sławomir Zborowski (8)

C++ Undefined Behavior (Code::Dive 2016)
C++ Undefined Behavior (Code::Dive 2016)C++ Undefined Behavior (Code::Dive 2016)
C++ Undefined Behavior (Code::Dive 2016)
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...
 
What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...
 
More functional C++14
More functional C++14More functional C++14
More functional C++14
 
Boost.Python - domesticating the snake
Boost.Python - domesticating the snakeBoost.Python - domesticating the snake
Boost.Python - domesticating the snake
 
Metaprogramming in C++ - from 70's to C++17
Metaprogramming in C++ - from 70's to C++17Metaprogramming in C++ - from 70's to C++17
Metaprogramming in C++ - from 70's to C++17
 
Boost Multi Index
Boost Multi IndexBoost Multi Index
Boost Multi Index
 
How it's made: C++ compilers (GCC)
How it's made: C++ compilers (GCC)How it's made: C++ compilers (GCC)
How it's made: C++ compilers (GCC)
 

Último

MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 

Último (20)

MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 

Algorithms for Cloud Computing

  • 1. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Algorithms for Cloud Computing Nokia Wrocław, Poland Miotacze Piorunów Team: Sławek Zborowski, Marek Zdonek, Andrzej Albin, Bartek ’BaSz’ Szurgot December 16, 2015
  • 2. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Miotacze Piorunów Team :-)
  • 3. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Miotacze Piorunów - the flag :-)
  • 4. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Roadmap 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next? http://dailynewsdig.com/wp-content/uploads/2013/06/20-Funny-Shocked-Cat-Memes-3.jpg
  • 5. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Roadmap 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next? http://dailynewsdig.com/wp-content/uploads/2013/06/20-Funny-Shocked-Cat-Memes-3.jpg
  • 6. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cloud blitzkrieg! :-) http://upload.wikimedia.org/wikipedia/commons/1/10/Bundesarchiv_Bild_101I-646-5188-17%2C_Flugzeuge_Junkers_Ju_87.jpg
  • 7. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 1 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 8. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Supercomputers - ’60-’80 http://upload.wikimedia.org/wikipedia/commons/c/c4/CDC_6600.jc.jpg
  • 9. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Clusters - since ’70 http://upload.wikimedia.org/wikipedia/commons/3/3d/Us-nasa-columbia.jpg
  • 10. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Grids - since ’90
  • 11. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? P2P - since end of ’90 http://upload.wikimedia.org/wikipedia/en/f/fa/Unstructured_peer-to-peer_network_diagram.png
  • 12. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Clouds - since ’00
  • 13. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? What is cloud? No single definition A bit grid-like With massive storage CPUs + data put close
  • 14. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? What is cloud? No single definition A bit grid-like With massive storage CPUs + data put close Commonly agreed Data intensive Lot of CPU power
  • 15. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? What is cloud? No single definition A bit grid-like With massive storage CPUs + data put close Commonly agreed Data intensive Lot of CPU power S C A L E!
  • 16. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cloud types http://upload.wikimedia.org/wikipedia/commons/b/b5/Cloud_computing.svg
  • 17. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? What makes it different? Scale bring problems. . .
  • 18. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? What makes it different? Scale bring problems. . . Mean Time Between Failures (MTBF): Server: 6 years Disk: 4 years Good results!
  • 19. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? What makes it different? Scale bring problems. . . Mean Time Between Failures (MTBF): Server: 6 years Disk: 4 years Good results! 10k servers (2 disk each) Every day: 5 servers die 14 disks fail
  • 20. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? What makes it different? Scale bring problems. . . Mean Time Between Failures (MTBF): Server: 6 years Disk: 4 years Good results! 10k servers (2 disk each) Every day: 5 servers die 14 disks fail Lesson learned At scale incredibly rare is a commonplace. http://upload.wikimedia.org/wikipedia/commons/b/b9/Hard_disk_failure.jpeg
  • 21. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? How to deal with it? Errors do happen Any time Any place
  • 22. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? How to deal with it? Errors do happen Any time Any place Massive scale Lots of communication Unreliable networks Data intensive . . .
  • 23. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? How to deal with it? Errors do happen Any time Any place Massive scale Lots of communication Unreliable networks Data intensive . . . Addressed by software Algorithms http://upload.wikimedia.org/wikipedia/commons/1/19/Train_wreck_at_Montparnasse_1895.jpg
  • 24. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 2 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 25. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The problem Massive scale system Node has new data How to inform others?
  • 26. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The problem Massive scale system Node has new data How to inform others? One-to-one?
  • 27. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The problem Massive scale system Node has new data How to inform others? One-to-one? Will take ages to propagate! What about packet loss? What about node loss?
  • 28. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The problem Massive scale system Node has new data How to inform others? One-to-one? Will take ages to propagate! What about packet loss? What about node loss? All-to-all?
  • 29. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The problem Massive scale system Node has new data How to inform others? One-to-one? Will take ages to propagate! What about packet loss? What about node loss? All-to-all? O(N2 ) messages! Sending will kill any network! Receiving will kill every node!
  • 30. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The problem Massive scale system Node has new data How to inform others? One-to-one? Will take ages to propagate! What about packet loss? What about node loss? All-to-all? O(N2 ) messages! Sending will kill any network! Receiving will kill every node! We can do better than that. . .
  • 31. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The solution 1 Each node: 1 Pick random node 2 Send update to it 3 Receive incoming messages / wait 4 Repeat periodically
  • 32. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The solution 1 Each node: 1 Pick random node 2 Send update to it 3 Receive incoming messages / wait 4 Repeat periodically 2 Run on all nodes
  • 33. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example run
  • 34. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example run
  • 35. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example run
  • 36. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example run
  • 37. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example run
  • 38. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Spreads like a disease!
  • 39. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Gossip at Amazon S3 Amazon S3: Simple Storage Service Online file storage Part of Amazon Web Services Gossiping: Spreading state info Base component of storage Some numbers: Over 2 ∗ 1012 objects (2013) 99.9% availability/month 99.99% availability/year 99.999999999% durability/year https://upload.wikimedia.org/wikipedia/commons/e/ed/AWS_Simple_Icons_Storage_Amazon_S3_Bucket_with_Objects.svg https://upload.wikimedia.org/wikipedia/commons/1/1d/AmazonWebservices_Logo.svg
  • 40. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 3 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 41. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Basic concepts Aka. "failure detection"
  • 42. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Basic concepts Aka. "failure detection" Properties: Accuracy == no mistakes during judgment Completeness == every failure is detected
  • 43. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Basic concepts Aka. "failure detection" Properties: Accuracy == no mistakes during judgment Completeness == every failure is detected Speed == time to first detection Scale == distributing load on nodes uniformly
  • 44. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Basic concepts Aka. "failure detection" Properties: Accuracy == no mistakes during judgment Completeness == every failure is detected Speed == time to first detection Scale == distributing load on nodes uniformly Accuracy vs. completeness Cannot have both (over unreliable networks)!
  • 45. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The idea Inform others: You’re alive Others known to be: Alive Dead
  • 46. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The idea Inform others: You’re alive Others known to be: Alive Dead That is: Propagate dead/alive info. . . Over large number of nodes. . .
  • 47. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The idea Inform others: You’re alive Others known to be: Alive Dead That is: Propagate dead/alive info. . . Over large number of nodes. . . Sounds familiar? :-)
  • 48. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Yup!
  • 49. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Local entries table Each node keeps table Table for node A:
  • 50. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Local entries table Each node keeps table Table for node A: Three columns 1 Node name 2 Heartbeat count 3 Entry timeout
  • 51. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Local entries table Each node keeps table Table for node A: Three columns 1 Node name 2 Heartbeat count 3 Entry timeout Timeout is local Timed out entries are dead Heartbeat incremented on send
  • 52. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Merging entries
  • 53. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Merging entries
  • 54. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Amazon DynamoDB Amazon DynamoDB: Database-like Distributed Hash Table (DHT) Powers Amazon Web Services Used by Amazon S3 Membership + failure detection No central register Excelent scaling https://upload.wikimedia.org/wikipedia/commons/e/ed/AWS_Simple_Icons_Storage_Amazon_S3_Bucket_with_Objects.svg https://upload.wikimedia.org/wikipedia/commons/1/1d/AmazonWebservices_Logo.svg
  • 55. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 4 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 56. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Overview Scalable, Weakly-consistent, Infection-style Membership protocol Pings instead of heartbeats
  • 57. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Overview Scalable, Weakly-consistent, Infection-style Membership protocol Pings instead of heartbeats Algorithm: 1 Ping 1, random host (H) 2 Of got pong == ok (done)
  • 58. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Overview Scalable, Weakly-consistent, Infection-style Membership protocol Pings instead of heartbeats Algorithm: 1 Ping 1, random host (H) 2 Of got pong == ok (done) 3 Else 1 Ask N, random hosts to ping (H) 2 1 "ack" == ok 3 Else mark as failed
  • 59. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Overview Scalable, Weakly-consistent, Infection-style Membership protocol Pings instead of heartbeats Algorithm: 1 Ping 1, random host (H) 2 Of got pong == ok (done) 3 Else 1 Ask N, random hosts to ping (H) 2 1 "ack" == ok 3 Else mark as failed Extra attempt to verify: Special (more network paths) Temporal (more time to response)
  • 60. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example - direct ping succeeded
  • 61. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example - direct ping succeeded
  • 62. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example - direct ping failed
  • 63. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example - all pings failed
  • 64. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Suspicion mechanism
  • 65. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Suspicion mechanism
  • 66. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 5 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 67. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Overview Classic algorithm Proposed by Google Sourcing from functional languages
  • 68. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Overview Classic algorithm Proposed by Google Sourcing from functional languages Two stages: Map Reduce
  • 69. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Overview Classic algorithm Proposed by Google Sourcing from functional languages Two stages: Map Reduce Mapping: Input: raw source data Output: (key -> value) pairs
  • 70. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Overview Classic algorithm Proposed by Google Sourcing from functional languages Two stages: Map Reduce Mapping: Input: raw source data Output: (key -> value) pairs Reducing: Input: (key -> values[]) Output: (key -> merged-values)
  • 71. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cars example Input: database of cars registered, per year
  • 72. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cars example Input: database of cars registered, per year 1991: Opel Vectra, ABS Mercedes W124, ABS, airbag 1995: Opel Vectra, AC, TC Dodge Viper, ABS, airbag ...
  • 73. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cars example Input: database of cars registered, per year 1991: Opel Vectra, ABS Mercedes W124, ABS, airbag 1995: Opel Vectra, AC, TC Dodge Viper, ABS, airbag ... Query: which cars where produced when?
  • 74. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cars example Input: database of cars registered, per year 1991: Opel Vectra, ABS Mercedes W124, ABS, airbag 1995: Opel Vectra, AC, TC Dodge Viper, ABS, airbag ... Query: which cars where produced when? Opel Vectra: 1988-2009 Dodge Viper: 1992-1995 ...
  • 75. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Computations
  • 76. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Algorithm properties Mapping: Generation is independent Perfect parallel task
  • 77. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Algorithm properties Mapping: Generation is independent Perfect parallel task Reducing: Can be run in parallel Good distribution of mapped entries needed!
  • 78. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Algorithm properties Mapping: Generation is independent Perfect parallel task Reducing: Can be run in parallel Good distribution of mapped entries needed! Algorithm: Highly parallel Widely adopted Common solution for batch tasks
  • 79. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Practical applications https://upload.wikimedia.org/wikipedia/commons/a/aa/Logo_Google_2013_Official.svg https://upload.wikimedia.org/wikipedia/commons/0/0e/Hadoop_logo.svg https://upload.wikimedia.org/wikipedia/en/f/f8/CouchDB.svg https://upload.wikimedia.org/wikipedia/en/e/eb/MongoDB_Logo.png https://upload.wikimedia.org/wikipedia/en/8/8e/Riak_distributed_NoSQL_key-value_data_store_logo.png
  • 80. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 6 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 81. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Once upon a time...
  • 82. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Once upon a time...
  • 83. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Once upon a time...
  • 84. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Consensus Consensus problem Reaching an agreement upon a single value/state. Fundamental problem in distributed systems
  • 85. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Consensus Consensus problem Reaching an agreement upon a single value/state. Fundamental problem in distributed systems How to: Agree upon single value? Tolerate failures?
  • 86. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Consensus Consensus problem Reaching an agreement upon a single value/state. Fundamental problem in distributed systems How to: Agree upon single value? Tolerate failures? Example algorithms: Paxos Raft
  • 87. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Raft’s organization Node is in a given state
  • 88. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Raft’s organization Node is in a given state Basic operations: Leader election Log replication ("state machine")
  • 89. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Raft’s organization Node is in a given state Basic operations: Leader election Log replication ("state machine") Voting for a leader "Term counter": Identify voting rounds Incremented by candidate
  • 90. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Raft’s organization Node is in a given state Basic operations: Leader election Log replication ("state machine") Voting for a leader "Term counter": Identify voting rounds Incremented by candidate Leader: Send heartbeats Synchronizes followers Clients talk with leader
  • 91. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Log replication How log (state machine) is replicated? https://fiftytwomedia.files.wordpress.com/2011/05/cloned-sheep.jpg
  • 92. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Log replication
  • 93. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Log replication
  • 94. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Log replication
  • 95. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Log replication
  • 96. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Log replication
  • 97. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Log replication
  • 98. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Leader election How leader election works? http://i.huffpost.com/gen/1849024/thumbs/o-ELECTION-BALLOT-facebook.jpg
  • 99. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Leader election
  • 100. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Leader election
  • 101. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Leader election
  • 102. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Leader election
  • 103. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Leader election
  • 104. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Leader election
  • 105. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? That simple? Does leader election always work? http://cache.gawkerassets.com/assets/images/4/2010/01/500x_hamshred.jpg
  • 106. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Split vote
  • 107. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Split vote
  • 108. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Split vote
  • 109. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Split vote
  • 110. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Split vote
  • 111. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Split vote
  • 112. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Split vote
  • 113. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Raft’s ecosystem Base of CockroachDB Widespread use "Paxos made simple"
  • 114. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Raft’s ecosystem Base of CockroachDB Widespread use "Paxos made simple" Raft’s implementations: cppa-raft, LogCabin, bspolley/raft, noeleo/raft, whitewater, willemt/raft, NRaft, dupdob/RAFTiNG, dinghy, melee, raft-clj, rodriguezvalencia/rafting, draft, zraft_lib, eraft, huckleberry, rafter, rafterl, Flotten, graft, go-raft, etcd/raft, hashicorp/raft, jpathy/raft, peterbourgon/raft, pontoon, seaturtles, kontiki, allengeorge/libraft, barge, chicm/CmRaft, copycat, drpicox/uoc-raft-2013p, jalvaro/raft, jgroups-raft, RaftKVDatabase/JSimpleDB, OpenDaylight, pvilas/raft, Raft4WS, Raft-JVM, r4j, liferaft, benbjohnson/raft.js, dannycoates/raft-core, kanaka/raft.js, skiff, ocaml-raft, py-raft, simpleRaft, floss, giraft, harryw/raft, zodiac-prime, hoverbear/raft, akka-raft, archie/raft, cb372/raft, chelan, ckite, scalaraft, lite-raft, C5, yora, srned/Prez, fxsjy/Ins https://pbs.twimg.com/profile_images/592837647577587714/eNMItpUG_400x400.png
  • 115. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 7 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 116. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Network partitioning
  • 117. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Network partitioning + http://upload.wikimedia.org/wikipedia/commons/b/b9/Kitchen-Scissors.jpg http://upload.wikimedia.org/wikipedia/commons/4/49/Fibreoptic.jpg
  • 118. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? CAP theorem Systems’ properties: 1 Consistency
  • 119. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? CAP theorem Systems’ properties: 1 Consistency 2 Availability
  • 120. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? CAP theorem Systems’ properties: 1 Consistency 2 Availability 3 Partition-tolerance
  • 121. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? CAP theorem Systems’ properties: 1 Consistency 2 Availability 3 Partition-tolerance CAP theorem Having C/A/P – choose (at most) 2 of 3!
  • 122. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? CAP theorem Systems’ properties: 1 Consistency 2 Availability 3 Partition-tolerance CAP theorem Having C/A/P – choose (at most) 2 of 3!
  • 123. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example systems’ classification Having: Consistency Availability Partition-tolerance
  • 124. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example systems’ classification Having: Consistency Availability Partition-tolerance Examples: PostgreSQL – CAP
  • 125. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example systems’ classification Having: Consistency Availability Partition-tolerance Examples: PostgreSQL – CAP MongoDB – CAP
  • 126. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example systems’ classification Having: Consistency Availability Partition-tolerance Examples: PostgreSQL – CAP MongoDB – CAP Cassandra – CAP
  • 127. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example systems’ classification Having: Consistency Availability Partition-tolerance Examples: PostgreSQL – CAP MongoDB – CAP Cassandra – CAP In reality: Modulo bugs! :-) Often configuration-dependent. . . "Call me maybe" series https://upload.wikimedia.org/wikipedia/commons/2/29/Postgresql_elephant.svg https://upload.wikimedia.org/wikipedia/commons/5/5e/Cassandra_logo.svg https://upload.wikimedia.org/wikipedia/en/e/eb/MongoDB_Logo.png
  • 128. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 8 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 129. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Synchronizing time Given events: A (at nodeA) B (at nodeB) Did A happened before B?
  • 130. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Synchronizing time Given events: A (at nodeA) B (at nodeB) Did A happened before B? Check their time!
  • 131. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Synchronizing time Given events: A (at nodeA) B (at nodeB) Did A happened before B? Check their time! Are clocks in sync? (clock skew) How precise? What about latencies? Will clocks remain in sync? (clock drift) http://1.bp.blogspot.com/-m4Wd15SQ3eY/T75YMmeYwrI/AAAAAAAAAaw/nrH2BxGSimw/s320/Clock+art-Salvador+Dali.jpg
  • 132. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cristian’s algorithm
  • 133. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cristian’s algorithm Assuming delay1 = delay2 New time: t1 = t + RTT 2 Where: RTT – Round Trip Time t1 – new local time t – time from remote party
  • 134. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cristian’s algorithm Assuming delay1 = delay2 New time: t1 = t + RTT 2 Where: RTT – Round Trip Time t1 – new local time t – time from remote party Fairly Simple™;-) Often imprecise
  • 135. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cristian’s algorithm Assuming delay1 = delay2 New time: t1 = t + RTT 2 Where: RTT – Round Trip Time t1 – new local time t – time from remote party Fairly Simple™;-) Often imprecise Single point of synchronization Does not scale
  • 136. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? NTP’s algorithm Network Time Protocol More clock sources Better scalability
  • 137. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? NTP’s algorithm Network Time Protocol More clock sources Better scalability
  • 138. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? NTP’s algorithm Network Time Protocol More clock sources Better scalability Better RTT estimation Probabilistic analysis of data Continuous operation
  • 139. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? NTP’s algorithm Network Time Protocol More clock sources Better scalability Better RTT estimation Probabilistic analysis of data Continuous operation Commonly use in the Internet Still clocks skew and drift. . . http://upload.wikimedia.org/wikipedia/commons/c/c9/Network_Time_Protocol_servers_and_clients.svg http://upload.wikimedia.org/wikipedia/commons/8/8d/NTP-Algorithm.svg
  • 140. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Now what if... Cannot solve?
  • 141. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Now what if... Cannot solve? Step back Find a different path. . .
  • 142. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Now what if... Cannot solve? Step back Find a different path. . . What is REALLY needed?
  • 143. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Now what if... Cannot solve? Step back Find a different path. . . What is REALLY needed? Ordering knowledge "What happened first?"
  • 144. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Now what if... Cannot solve? Step back Find a different path. . . What is REALLY needed? Ordering knowledge "What happened first?" Can be done without time. . .
  • 145. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 9 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 146. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Logical ordering Lamport’s Time Stamp Proposed by Leslie Lamport Establishes happens-before relation
  • 147. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Logical ordering Lamport’s Time Stamp Proposed by Leslie Lamport Establishes happens-before relation Each process has counter lts Initially lts = 0
  • 148. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Logical ordering Lamport’s Time Stamp Proposed by Leslie Lamport Establishes happens-before relation Each process has counter lts Initially lts = 0 Algorithm: Before sending: lts = lts + 1 Include counter in the message When receiving: lts = max(lts, msg_lts) + 1 Also can increment at will https://upload.wikimedia.org/wikipedia/commons/5/50/Leslie_Lamport.jpg
  • 149. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Come again? http://lshss.pubs.asha.org/data/Journals/LSHSS/930529/LSHSS_45_3_220fig0.jpeg
  • 150. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 151. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 152. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 153. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 154. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 155. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Properties Events: A and B With timestamps: C(A) and C(B)
  • 156. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Properties Events: A and B With timestamps: C(A) and C(B) A → B ⇒ C(A) < C(B) Note: implication!
  • 157. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Properties Events: A and B With timestamps: C(A) and C(B) A → B ⇒ C(A) < C(B) Note: implication! What does C(A) < C(B) mean?
  • 158. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Properties Events: A and B With timestamps: C(A) and C(B) A → B ⇒ C(A) < C(B) Note: implication! What does C(A) < C(B) mean? One of: A → B A B But not B → A
  • 159. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Properties Events: A and B With timestamps: C(A) and C(B) A → B ⇒ C(A) < C(B) Note: implication! What does C(A) < C(B) mean? One of: A → B A B But not B → A Cause-effect ordering!
  • 160. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Let’s check! C(A) < C(B) ⇔ A → B ∨ A B
  • 161. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Lamport’s timestamps at . . . Pretty much everywhere. . . ;) Including. . .
  • 162. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Lamport’s timestamps at . . . Pretty much everywhere. . . ;) Including. . .
  • 163. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Lamport’s timestamps at . . . Pretty much everywhere. . . ;) Including. . . Part of BTS software: WCDMA OAM SRAN OAM Cloud OAM Distributed service registration Introduces logical ordering Registration updates’ ordering https://upload.wikimedia.org/wikipedia/commons/0/02/Nokia_wordmark.svg
  • 164. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 10 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 165. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Enhanced logical ordering Similar to Lamport’s timestamps Detects parallel events
  • 166. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Enhanced logical ordering Similar to Lamport’s timestamps Detects parallel events Each process has vector of counters vc = [c1, c2, ..., cN] Initially vc = [0, 0, ..., 0]
  • 167. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Enhanced logical ordering Similar to Lamport’s timestamps Detects parallel events Each process has vector of counters vc = [c1, c2, ..., cN] Initially vc = [0, 0, ..., 0] Algorithm: On i-th node Before sending: vc[i] = vc[i] + 1 Include vector in the message When receiving: ∀j = i : vc[j] = max(vc[j], msg_vc[j]) vc[i] = vc[i] + 1 Also can increment local counter at will
  • 168. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? You don’t say. . . http://syosseths.com/z/acapics/mathslide.jpg
  • 169. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 170. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 171. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 172. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 173. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example
  • 174. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Properties Events: A and B With vector clocks: VC(A) and VC(B)
  • 175. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Properties Events: A and B With vector clocks: VC(A) and VC(B) Operations: vc1 = vc2 ⇔ ∀i : vc1[i] = vc2[i] vc1 ≤ vc2 ⇔ ∀i : vc1[i] ≤ vc2[i] vc1 < vc2 ⇔ vc1 ≤ vc2 ∧ ∃i : vc1[i] < vc2[i]
  • 176. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Properties Events: A and B With vector clocks: VC(A) and VC(B) Operations: vc1 = vc2 ⇔ ∀i : vc1[i] = vc2[i] vc1 ≤ vc2 ⇔ ∀i : vc1[i] ≤ vc2[i] vc1 < vc2 ⇔ vc1 ≤ vc2 ∧ ∃i : vc1[i] < vc2[i] Causality: A → B ⇔ vc(A) < vc(B) A B ⇔ ¬(vc(A) ≤ vc(B)) ∧ ¬(vc(B) ≤ vc(A))
  • 177. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Let’s check! A → B ⇔ vc(A) < vc(B) A B ⇔ ¬(vc(A) ≤ vc(B)) ∧ ¬(vc(B) ≤ vc(A))
  • 178. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Vector clocks inside Riak Riak: NoSQL data base Based on "Dynamo" paper VC for eventual consistency Help solve conflicts: Resolve duplicates Detect latest version Detect simultaneous updates https://upload.wikimedia.org/wikipedia/en/8/8e/Riak_distributed_NoSQL_key-value_data_store_logo.png
  • 179. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 11 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 180. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Hash table
  • 181. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Distributed Hash Table (DHT)
  • 182. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Keys distribution https://upload.wikimedia.org/wikipedia/commons/9/98/DHT_en.svg
  • 183. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? DHTs everywhere Common since the end of ’90 Base of most NoSQL DBs Advantages: Massive storage Decentralized Fault tolerant Scalable https://upload.wikimedia.org/wikipedia/commons/5/5e/Cassandra_logo.svg http://www.gluster.org/images/antmascot.png?1432254431 https://upload.wikimedia.org/wikipedia/en/8/8e/Riak_distributed_NoSQL_key-value_ data_store_logo.png https://upload.wikimedia.org/wikipedia/commons/6/6d/Transmission_icon.png https://upload.wikimedia.org/wikipedia/en/9/9f/UTorrent_%28logo%29.png https://upload.wikimedia.org/wikipedia/commons/9/9e/Qbittorrent_logo.png https://upload.wikimedia.org/wikipedia/commons/f/ff/Qbittorrent_mascot.png https://upload.wikimedia.org/wikipedia/en/d/d5/BitComet_logo.svg https://upload.wikimedia.org/wikipedia/commons/0/0a/Shareaza.png https://upload.wikimedia.org/wikipedia/en/d/d6/Logo_of_BearShare_from_Website.jpg
  • 184. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 12 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 185. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The ring
  • 186. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The ring Ring-organized m-bits (2m possible entries) Ordered clock-wise Node keeps preceding keys
  • 187. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The ring Ring-organized m-bits (2m possible entries) Ordered clock-wise Node keeps preceding keys Nodes hashed by: Address (IP?) Port
  • 188. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? The ring Ring-organized m-bits (2m possible entries) Ordered clock-wise Node keeps preceding keys Nodes hashed by: Address (IP?) Port Keys: User’s hash Share key space with nodes SHA-1 commonly used
  • 189. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Finger table Each node keeps own m-entries (n + 2i )%2m Where: i – entry number n – node’s number m – hash bits
  • 190. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Finger table Each node keeps own m-entries (n + 2i )%2m Where: i – entry number n – node’s number m – hash bits Here: n = 4, m = 4 i.e. 24 = 16 entries
  • 191. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? One ring to hash them all! https://upload.wikimedia.org/wikipedia/commons/b/b7/Unico_Anello.png
  • 192. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Query algorithm 1 Having query for k 2 If has k – return it
  • 193. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Query algorithm 1 Having query for k 2 If has k – return it 3 next = max(ft[i] : i ∈ 0; m) ∧ ft[i] k) 4 Note: ft[i] k is done on the ring!
  • 194. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Query algorithm 1 Having query for k 2 If has k – return it 3 next = max(ft[i] : i ∈ 0; m) ∧ ft[i] k) 4 Note: ft[i] k is done on the ring! 5 If has next – return it 6 Else return first successor
  • 195. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Query example Node 4 – query 1
  • 196. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Query example Node 4 – query 1 Finger tables: 1 n = 4 ft[0] = 8 ft[1] = 8 ft[2] = 8 ft[3] = 12
  • 197. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Query example Node 4 – query 1 Finger tables: 1 n = 4 ft[0] = 8 ft[1] = 8 ft[2] = 8 ft[3] = 12 2 n = 12 ft[0] = 0 ft[1] = 0 ft[2] = 0 ft[3] = 4
  • 198. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Query example Node 4 – query 1 Finger tables: 1 n = 4 ft[0] = 8 ft[1] = 8 ft[2] = 8 ft[3] = 12 2 n = 12 ft[0] = 0 ft[1] = 0 ft[2] = 0 ft[3] = 4 3 n = 0 ft[0] = 2 ft[1] = 2 ft[2] = 4 ft[3] = 8
  • 199. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Additional notes O(log N) memory (Amortized) O(log N) lookup Considered almost O(1)
  • 200. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Additional notes O(log N) memory (Amortized) O(log N) lookup Considered almost O(1) Other scenarios: Initialization – query for self Nodes joining – splitting ranges Nodes leaving – merging ranges Nodes crashing = nodes leaving
  • 201. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Additional notes O(log N) memory (Amortized) O(log N) lookup Considered almost O(1) Other scenarios: Initialization – query for self Nodes joining – splitting ranges Nodes leaving – merging ranges Nodes crashing = nodes leaving Failures handing: Duplication of data More entries per finger table Keeping few predecessors Monitoring neighborhood
  • 202. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 13 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 203. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Idea Split space: k affinity groups k ≈ √ N
  • 204. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Idea Split space: k affinity groups k ≈ √ N Group based on node’s hash Node in a group knows: All members of its group One node per other groups All group’s hashes
  • 205. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Example - node 2
  • 206. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Local query Querying for key from the same affinity group
  • 207. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Node #2 querying "yellow" key
  • 208. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? It’s here! http://asalesguyrecruiting.com/wp-content/uploads/2014/03/Oh-Hell-Yeah-566x372.png
  • 209. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Remote query Querying for key from different affinity group
  • 210. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Node #2 querying "red" key
  • 211. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Node #2 querying "red" key
  • 212. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Node #2 querying "red" key
  • 213. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Node #2 querying "red" key
  • 214. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Additional notes (Amortized) O(1) lookup
  • 215. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Additional notes (Amortized) O(1) lookup O( √ N) memory Scary? Not really. . . N ≈ millions → few MBs. . .
  • 216. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Additional notes (Amortized) O(1) lookup O( √ N) memory Scary? Not really. . . N ≈ millions → few MBs. . . Other scenarios: Initialization – query own affinity group Nodes joining – more data replicated Nodes leaving – less replication Nodes crashing = nodes leaving
  • 217. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Additional notes (Amortized) O(1) lookup O( √ N) memory Scary? Not really. . . N ≈ millions → few MBs. . . Other scenarios: Initialization – query own affinity group Nodes joining – more data replicated Nodes leaving – less replication Nodes crashing = nodes leaving Failures handing: Monitoring own affinity group Querying others for affinity neighbors
  • 218. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Part 14 1 Introduction 2 Gossip 3 Membership 4 SWIM 5 Map-Reduce 6 Raft 7 CAP 8 Time 9 LTS 10 Vector clocks 11 DHT 12 Chord 13 Kelips 14 What next?
  • 219. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Cloud @ enterprises http://enterpriseitadoption.com/images/adoption_cycle.png
  • 220. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? More to learn... Coursera: Cloud computing concepts – part 1 & 2 Cloud computing applications Cloud networking
  • 221. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? More to learn... Coursera: Cloud computing concepts – part 1 & 2 Cloud computing applications Cloud networking Other problems/algorithms: Mutual exclusion Snapshoting Multicast problem Transactions
  • 222. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? More to learn... Coursera: Cloud computing concepts – part 1 & 2 Cloud computing applications Cloud networking Other problems/algorithms: Mutual exclusion Snapshoting Multicast problem Transactions General concepts: Microservices Continuous deployment NoSQL
  • 223. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? More to learn... Coursera: Cloud computing concepts – part 1 & 2 Cloud computing applications Cloud networking Other problems/algorithms: Mutual exclusion Snapshoting Multicast problem Transactions General concepts: Microservices Continuous deployment NoSQL Hot topics: Docker NewSQL . . . http://matthewjamestaylor.com/img/recursive-drawing/pubic-hair.jpg
  • 224. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Keep learning Johann Wolfgang von Goethe What we do not understand we do not possess.
  • 225. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Keep learning Johann Wolfgang von Goethe What we do not understand we do not possess. Knowledge is power Better understanding Control over environment
  • 226. Introduction Gossip Membership SWIM Map-Reduce Raft CAP Time LTS Vector clocks DHT Chord Kelips What next? Questions? ?