Ordering and Consistent Cuts
Edward Tremel 11/7/2013
Ordering and Consistent Cuts Edward Tremel 11/7/2013 - - PowerPoint PPT Presentation
Ordering and Consistent Cuts Edward Tremel 11/7/2013 Synchronizing Distributed Systems Time, Clocks, and the Ordering of Events in Distributed Systems o How to agree on an order of events across asynchronous processes o Synchronized
Edward Tremel 11/7/2013
Distributed Systems
processes
States of Distributed Systems
information
11/7/2013 Ordering and Consistent Cuts 2
influential papers in distributed systems
work by Leslie Lamport
still a brand-new field
11/7/2013 Ordering and Consistent Cuts 3
hardware support
Problem
Actions
11/7/2013 Ordering and Consistent Cuts 4
Leslie Lamport chilling on a boat with Andy van Dam (left: Hector Garcia-Molina, distributed systems researcher)
11/7/2013 Ordering and Consistent Cuts 5
Brandeis, 1972
College 1965-69
(1970-77)
PODC Influential Paper award for Time, Clocks, and the Ordering of Events
11/7/2013 Ordering and Consistent Cuts 6
11/7/2013 Ordering and Consistent Cuts 7
Databases (Paul Johnson and Bob Thomas)
distributed state machine
common (physical) clock
apply updates in same order to stay consistent
11/7/2013 Ordering and Consistent Cuts 8
sending messages over directed channels
11/7/2013 Ordering and Consistent Cuts 9
11/7/2013 Ordering and Consistent Cuts 10
precedes b in execution
b is receipt of message by another process
sends/receives cannot be ordered
11/7/2013 Ordering and Consistent Cuts 11
before b, then Ci(a) < Ci(b)
is the receipt of the message by process j, then Ci(a) < Cj(b)
11/7/2013 Ordering and Consistent Cuts 12
11/7/2013 Ordering and Consistent Cuts 13
process
its clock to greater than message’s timestamp
11/7/2013 Ordering and Consistent Cuts 14
p1 p2 C1 C2 1 2 1 2 3 3 4 5 6 Tm=2 Tm=6 7 8 7
events
total order on events
process j
11/7/2013 Ordering and Consistent Cuts 15
acknowledged
learned of all commands issued before that command’s timestamp
channels are reliable and FIFO
much harder problem, also solved by Lamport
11/7/2013 Ordering and Consistent Cuts 16
long as they can only be set forward
clock to message timestamp + 𝜈𝑛
bounded if error in clock rates and unpredictable message delay can be bounded
11/7/2013 Ordering and Consistent Cuts 17
“Jim Gray once told me that he had heard two different opinions of this paper: that it's trivial and that it's brilliant. I can't argue with the former, and I am disinclined to argue with the latter.”
in distributed systems
11/7/2013 Ordering and Consistent Cuts 18
remembered result?
helpful?
11/7/2013 Ordering and Consistent Cuts 19
11/7/2013 Ordering and Consistent Cuts 20
in EE, 1969
Austin 1970-89
Caltech since 1989 Leslie Lamport
working at Stanford Research Institute (SRI International)
“The distributed snapshot algorithm described here came about when I visited Chandy, who was then at the University of Texas in Austin. He posed the problem to me over dinner, but we had both had too much wine to think about it right then. The next morning, in the shower, I came up with the
same solution. I consider the algorithm to be a straightforward application of the basic ideas from [Time, Clocks, and the Ordering of Events in Distributed Systems].” —Leslie Lamport
11/7/2013 Ordering and Consistent Cuts 21
“exactly” the same time
11/7/2013 Ordering and Consistent Cuts 22
all events that happen before it must be in snapshot
11/7/2013 Ordering and Consistent Cuts 23 (image copied from Dinesh Bhat’s 2010 presentation)
inconsistent consistent
recording state
state and receiving marker
state will be recorded
11/7/2013 Ordering and Consistent Cuts 24
nodes once done recording
11/7/2013 Ordering and Consistent Cuts 25
11/7/2013 Ordering and Consistent Cuts 26
p q r s
2 1
(shamelessly stolen from Isaac’s presentation last year)
11/7/2013 Ordering and Consistent Cuts 27
p q r s
1 2
r’s state
11/7/2013 Ordering and Consistent Cuts 28
p q r s
1 2
r’s state s’s state
3
11/7/2013 Ordering and Consistent Cuts 29
p q r s
1
r’s state s’s state
3 2
11/7/2013 Ordering and Consistent Cuts 30
p q r s
1
r’s state s’s state
3 2
q’s state
4
11/7/2013 Ordering and Consistent Cuts 31
p q r s
1
r’s state s’s state
3 2
q’s state p’s state
11/7/2013 Ordering and Consistent Cuts 32
p q r s
r’s state s’s state
2
q’s state p’s state
1 3
11/7/2013 Ordering and Consistent Cuts 33
p q r s
r’s state s’s state
2
q’s state p’s state
1 3
11/7/2013 Ordering and Consistent Cuts 34
p q r s
r’s state s’s state
2
q’s state p’s state
1 3
recorded, then its sending is also recorded (FIFO)
have ever occurred
by system during snapshot
changed
11/7/2013 Ordering and Consistent Cuts 35
complex ones such as Mattern’s
11/7/2013 Ordering and Consistent Cuts 36
enough?
(Lamport claims it’s an extension of clocks).
detection?
11/7/2013 Ordering and Consistent Cuts 37