Download presentation
Presentation is loading. Please wait.
Published byHalle Blois Modified over 10 years ago
1
Shameless Statements about Replication Rachid Guerraoui School of Computer and Communication Sciences, EPFL Joint ruminations with Eli Gafni (UCLA-MSR)
2
Shameless Statements about Replication Slide 2 Replication is all over the place Replicated databasesReplicated databases Reliable middleware Storage systems Non-blocking data structures Group communication
3
Shameless Statements about Replication Slide 3 Highlight the important principles (results/algorithms) Deconstructing replication
4
Shameless Statements about Replication Slide 4 A perspective on replication
5
Shameless Statements about Replication Slide 5 “Here are my principles. If you don’t like them, I have others” Groucho Marx A grain of salt
6
Shameless Statements about Replication Slide 6 Deconstructing replication For now, let’sFor now, let’s (1) ignore performance and focus on (2) strong and general replication of (3) an object shared by 2 processes
7
Shameless Statements about Replication Slide 7 Replication P1 P2 OO opA opA opB opB
8
Shameless Statements about Replication Slide 8 The players
9
Shameless Statements about Replication Slide 9 The scheduler decides which process goes next The processes take steps The game
10
Shameless Statements about Replication Slide 10 Replication P1 P2 O O’ opA opB Fair agreement on the order Fair agreement on the order opA opB opAopB
11
Shameless Statements about Replication Slide 11 Replication P1 P2 O O’ opA opB Consensus Sharedmemory opB opA opB opA
12
Shameless Statements about Replication Slide 12 Statement (1) Behind every replication lie a(1) Behind every replication lie a consensus and a shared memory consensus and a shared memory Consensus
13
Shameless Statements about Replication Slide 13 Consensus is impossible: FLP Asynchronous shared memory system p1 p2
14
Shameless Statements about Replication Slide 14 Synchronous consensus is possible Synchronous system Asynchronous system
15
Shameless Statements about Replication Slide 15 <>Synchronous consensus is possible <>Synchronous system Asynchronous system
16
Shameless Statements about Replication Slide 16 Consensus is almost possible -synchronous system -synchronous system
17
Shameless Statements about Replication Slide 17 “One person is missing and the whole world seems depopulated” Alphonse de la Martine Consensus is possible iff -synchrony Consensus is possible iff -synchrony p1 p2
18
Shameless Statements about Replication Slide 18 Bottom line (1) Behind every replication lie a(1) Behind every replication lie a consensus and a shared memory consensus and a shared memory (2) Behind every consensus lies some -synchrony
19
Shameless Statements about Replication Slide 19 Consensus is almost possible
20
Shameless Statements about Replication Slide 20 Consensus (primary) P1 P2 V1 V2 V1 Sharedmemory V1
21
Shameless Statements about Replication Slide 21 Consensus (primary) P1 P2 V1 V2 Sharedmemory V1 crash
22
Shameless Statements about Replication Slide 22 Consensus (primary-backup) P1 P2 V1 V2 V1 Sharedmemory V1V1
23
Shameless Statements about Replication Slide 23 Consensus (primary-backup) P1 P2 V1 V2 V2 Sharedmemory crash V1
24
Shameless Statements about Replication Slide 24 Consensus (primary-backup) P1 P2 V1 V2 V2 Sharedmemory V1 V1 V2
25
Shameless Statements about Replication Slide 25 Consensus (2PC) P1 P2 V1 V2 Shared memory V1 V1 V1 commit
26
Shameless Statements about Replication Slide 26 Consensus (2PC) P1 P2 V1 V2 Shared memory V2 V2V2 commit
27
Shameless Statements about Replication Slide 27 Consensus (2PC) P1 P2 V1 V2 Shared memory V1 V2 abort abort
28
Shameless Statements about Replication Slide 28 Towards indulgent consensus Asynchronous system Indulgence: tolerates arbitrarily long periods of asynchrony, i.e., tolerates any prefix
29
Shameless Statements about Replication Slide 29 Indulgence
30
Shameless Statements about Replication Slide 30 « He that is without sin among you, let him cast the first stone at her » John 8:3-11 Indulgence
31
Shameless Statements about Replication Slide 31 Indulgence Always preserves safety Ensures liveness whenever possible « While there is life there is hope » Cicero
32
Shameless Statements about Replication Slide 32 Indulgent consensus (3PC) P1 P2 V1 V2 commit/abortcommit/abort
33
Shameless Statements about Replication Slide 33 The processes dynamically exclude one suffix of a run, using a system oracle: Indulgent consensus (3PC) A failure detector
34
Shameless Statements about Replication Slide 34 Weakest failure detector The weakest failure detector for consensus - The weakest failure detector question translates into the smallest suffix set to be excluded
35
Shameless Statements about Replication Slide 35 Weakest failure detector p1 p2
36
Shameless Statements about Replication Slide 36 Shared memory assumption Helps better understand consensus results (FLP, FD, 2PC, 3PC) Needed anyway for replication (and indulgent consensus)
37
Shameless Statements about Replication Slide 37 Bottom line (1) Behind every replication lie a(1) Behind every replication lie a consensus and a shared memory consensus and a shared memory (2) Behind every consensus lies some -synchrony shared memory
38
Shameless Statements about Replication Slide 38 ABD (Snapshot) P1 P2 V1 V2 Quorum Quorum write read
39
Shameless Statements about Replication Slide 39 The many faces of quorums Byzantine quorums Failure detector quorums Refined quorums Probabilistic quorums
40
Shameless Statements about Replication Slide 40 Bottom line (1) Behind every replication lie a(1) Behind every replication lie a consensus and a shared memory consensus and a shared memory (2) Behind every consensus lies some -synchrony (3) Behind every shared memory lies a quorum
41
Shameless Statements about Replication Slide 41 Deconstructing replication (1) ignoring performance And focusing on (2) strong and general replication of (3) one object shared by 2 processes
42
Shameless Statements about Replication Slide 42 The engineer In real systems, we do care about performance and we are happy with weak replication Much ado about nothing?
43
Shameless Statements about Replication Slide 43 What about performance? Let’s move now to a message passing system with communication delays/rounds
44
Shameless Statements about Replication Slide 44 What about performance? Synchronous system with few failures Asynchronous system Plan for the worst and hope for the best Plan for the worst and hope for the best
45
Shameless Statements about Replication Slide 45 What about performance? How many synchronous rounds does consensus need? A shared memory system of n processes with 1 failure can simulate x rounds of a synchronous system with x failures At least t+1
46
Shameless Statements about Replication Slide 46 The inherent price of indulgence How many synchronous rounds does an indulgent consensus need to decide with f failures? A shared memory system of n processes with 1 failure can simulate x+1 synchronous rounds of an indulgent consensus algorithm with x failures At least f+2
47
Shameless Statements about Replication Slide 47 The inherent price of indulgence For how long does a system need to be synchronous for indulgent consensus to terminate? No clue…
48
Shameless Statements about Replication Slide 48 The inherent price of indulgence How many servers need to be correct in order for indulgent consensus to decide in x synchronous rounds? Refined quorums
49
Shameless Statements about Replication Slide 49 More about performance… Disk accesses? Throughput?
50
Shameless Statements about Replication Slide 50 What about weak replication? Is consensus necessary for weak replication? Is consensus necessary for weak replication? If replicas would never need to agree on any state, they would not be called replicas
51
Shameless Statements about Replication Slide 51 What is weak replication? T he answer, my friend, is blowin' in the wind
52
Shameless Statements about Replication Slide 52 What about weak replication? Does ad-hoc replication need consensus? We need consensus among 2 processes Say we know the semantics of an object, e.g., a queue? (weaker than consensus)
53
Shameless Statements about Replication Slide 53 What about weak replication? Does eventual replication need consensus? It does eventually.. Does probabilistic replication need consensus? It does need randomized consensus..
54
Shameless Statements about Replication Slide 54 What if We give up safety and let some of the replicas disagree? We might need set-agreement We give up liveness and ensure termination only if k processes are concurrent? We might need set-agreement
55
Shameless Statements about Replication Slide 55 The future of replication What form of quorum (shared memory) does a set-agreement actually need? For how long does a system need to be synchronous for indulgent set-agreement to terminate?
56
Shameless Statements about Replication Slide 56 The one slide to remember (1) Behind every replication lie(1) Behind every replication lie agreement and shared memory agreement and shared memory (2) Behind every agreement lies -synchrony (3) Behind every shared memory lies a quorum
57
Shameless Statements about Replication Slide 57 Or at least this one
58
Shameless Statements about Replication Slide 58 What about more processes? f-process wait-free system n-process (f-1)-resilient system
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.