Distributed systems Causal Broadcast

Slides:



Advertisements
Similar presentations
Distributed systems Total Order Broadcast Prof R. Guerraoui Distributed Programming Laboratory.
Advertisements

Prof R. Guerraoui Distributed Programming Laboratory
DISTRIBUTED SYSTEMS II FAULT-TOLERANT BROADCAST Prof Philippas Tsigas Distributed Computing and Systems Research Group.
1 Distributed systems Causal Broadcast Prof R. Guerraoui Distributed Programming Laboratory.
Distributed Systems Overview Ali Ghodsi
Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Broadcast Variants. Distributed Systems (DNR)2 why broadcasts? distributed systems are inherently group oriented and hence it is more useful to talk about.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Logical Clocks and Global State.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 3 – Distributed Systems.
Distributed Systems Non-Blocking Atomic Commit
1 Principles of Reliable Distributed Systems Lecture 5: Failure Models, Fault-Tolerant Broadcasts and State-Machine Replication Spring 2005 Dr. Idit Keidar.
1 Principles of Reliable Distributed Systems Recitation 8 ◊S-based Consensus Spring 2009 Alex Shraer.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Ordered Communication. Define guarantees about the order of deliveries inside group of processes Type of ordering: Deliveries respect the FIFO ordering.
 Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 6: Impossibility.
Aran Bergman & Eddie Bortnikov & Alex Shraer, Principles of Reliable Distributed Systems, Spring Principles of Reliable Distributed Systems Recitation.
Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation 5: Reliable.
Distributed Systems Terminating Reliable Broadcast Prof R. Guerraoui Distributed Programming Laboratory.
Composition Model and its code. bound:=bound+1.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Logical Clocks and Global State.
Chapter 5.
CIS 720 Distributed algorithms. “Paint on the forehead” problem Each of you can see other’s forehead but not your own. I announce “some of you have paint.
1 A Modular Approach to Fault-Tolerant Broadcasts and Related Problems Author: Vassos Hadzilacos and Sam Toueg Distributed Systems: 526 U1580 Professor:
Failure detection and consensus Ludovic Henrio CNRS - projet OASIS Distributed Algorithms.
1 © R. Guerraoui Regular register algorithms R. Guerraoui Distributed Programming Laboratory lpdwww.epfl.ch.
Distributed systems Consensus Prof R. Guerraoui Distributed Programming Laboratory.
CIS825 Lecture 2. Model Processors Communication medium.
Building Dependable Distributed Systems, Copyright Wenbing Zhao
1 © R. Guerraoui Distributed algorithms Prof R. Guerraoui Assistant Marko Vukolic Exam: Written, Feb 5th Reference: Book - Springer.
Impossibility of Distributed Consensus with One Faulty Process By, Michael J.Fischer Nancy A. Lynch Michael S.Paterson.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Efficient Algorithms for Distributed Snapshots and Global Virtual Time Approximation Author: Friedermann Mattern Presented By: Shruthi Koundinya.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Lecture 9: Multicast Sep 22, 2015 All slides © IG.
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Distributed systems Causal Broadcast
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSE 486/586 Distributed Systems Reliable Multicast --- 1
Coordination and Agreement
Atomic register algorithms
CSE 486/586 Distributed Systems Global States
Distributed Snapshots & Termination detection
Coordination and Agreement
Distributed systems Total Order Broadcast
COT 5611 Operating Systems Design Principles Spring 2012
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
EECS 498 Introduction to Distributed Systems Fall 2017
CS 425 / ECE 428 Distributed Systems Fall 2017 Indranil Gupta (Indy)
Distributed Systems CS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Event Ordering.
EEC 688/788 Secure and Dependable Computing
Distributed systems Reliable Broadcast
Distributed Systems CS
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Lecture 9: Ordered Multicasting
- Atomic register specification -
Distributed Systems CS
CSE 486/586 Distributed Systems Global States
Distributed algorithms
Distributed systems Consensus
CSE 486/586 Distributed Systems Reliable Multicast --- 2
Broadcasting with failures
Distributed Systems Terminating Reliable Broadcast
COT 5611 Operating Systems Design Principles Spring 2014
Distributed systems Causal Broadcast
CSE 486/586 Distributed Systems Reliable Multicast --- 1
Presentation transcript:

Distributed systems Causal Broadcast Prof R. Guerraoui Distributed Programming Laboratory

Overview Intuitions: why causal broadcast? Specifications of causal broadcast Algorithms: A non-blocking algorithm using the past and A blocking algorithm using vector clocks

Broadcast A deliver m B m broadcast deliver C

Intuitions (1) So far, we did not consider ordering among messages; In particular, we considered messages to be independent Two messages from the same process might not be delivered in the order they were broadcast A message m1 that causes a message m2 might be delivered by some process after m2

Intuitions (2) Consider a system of news where every new event that is displayed in the screen contains a reference to the event that caused it, e.g., a comment on some information includes a reference to the actual information Even uniform reliable broadcast does not guarantee such a dependency of delivery Causal broadcast alleviates the need for the application to deal with such dependencies

Modules of a process Applications (R-U) Causal broadcast indication Applications request (R-U) Causal broadcast indication request indication (R-U)Reliable broadcast Failure detector Channels

Overview Intuitions: why causal broadcast? Specifications of causal broadcast Algorithms: A non-blocking algorithm using the past and A blocking algorithm using vector clocks

Causal broadcast Events Request: <coBroadcast, m> Indication: <coDeliver, src, m> Property: Causal Order (CO)

Causality Let m1 and m2 be any two messages: m1 -> m2 (m1 causally precedes m2) iff C1 (FIFO order). Some process pi broadcasts m1 before broadcasting m2 C2 (Local order). Some process pi delivers m1 and then broadcasts m2 C3 (Transitivity). There is a message m3 such that m1 -> m3 and m3 - > m2

Causal broadcast Events Request: <coBroadcast, m> Indication: <coDeliver, src, m> Property: CO: If any process pi delivers a message m2, then pi must have delivered every message m1 such that m1 -> m2

Causality ? p1 p2 p3 delivery delivery m2 m1 delivery delivery m1 m2

Causality ? p1 p2 p3 delivery delivery m2 m1 delivery delivery m1 m2

Reliable causal broadcast (rcb) Events Request: <rcoBroadcast, m> Indication: <rcoDeliver, src, m> Properties: RB1, RB2, RB3, RB4 + CO

Uniform causal broadcast (ucb) Events Request: <ucoBroadcast, m> Indication: <ucoDeliver, src, m> Properties: URB1, URB2, URB3, URB4 + CO

Overview Intuitions: why causal broadcast? Specifications of causal broadcast Algorithms: A non-blocking algorithm using the past and A blocking algorithm using vector clocks

Algorithms We present reliable causal broadcast algorithms using reliable broadcast underlying abstractions We obtain uniform causal broadcast algorithms by using instead an underlying uniform reliable broadcast

Algorithm 1 Implements: ReliableCausalOrderBroadcast (rco). Uses: ReliableBroadcast (rb). upon event < Init > do delivered := past := empty; upon event < rcoBroadcast, m> do trigger < rbBroadcast, [Data,past,m]>; past := past U {[self,m]};

Algorithm 1 (cont’d) if m not in delivered then upon event <rbDeliver,pi,[Data,pastm,m]> do if m not in delivered then (*) forall [sn, n] in pastm do if n not in delivered then trigger < rcoDeliver,sn,n>; delivered := delivered U {n}; past := past U {[sn, n]};

Algorithm 1 (cont’d) (*) … trigger <rcoDeliver,pi,m>; delivered := delivered U {m}; past := past U {[pi,m]};

Algorithm 1 m1 m2 p1 m2(m1) m1 m2 p2 m1 m1 m2(m1) m1 p3 m2

Algorithm 1 m1 m2 p1 m2(m1) m1 m1 m2 p2 m1 m2(m1) m1 p3 m2

Uniformity Algorithm 1 ensures causal reliable broadcast If we replace reliable broadcast with uniform reliable broadcast, Algorithm 1 would ensure uniform causal broadcast

Algorithm 1’ (gc) Implements: GarbageCollection (+ Algo 1). Uses: ReliableBroadcast (rb). PerfectFailureDetector(P). upon event < Init > do delivered := past := empty; correct := S; ackm := empty (for all m);

Algorithm 1’ (gc – cont’d) upon event < crash, pi > do correct := correct \ {pi} upon for some m in delivered: self not in ackm do ackm := ackm U {self}; trigger < rbBroadcast, [ACK,m]>;

Algorithm 1’ (gc – cont’d) upon event <rbDeliver,pi,[ACK,m]> do ackm := ackm U {pi}; if forall pj in correct: pj in ackm do past := past \ {[sm, m]};

Algorithm 2 Implements: ReliableCausalOrderBroadcast (rco). Uses: ReliableBroadcast (rb). upon event < Init > do for all pi in S: VC[pi] := 0; upon event < rcoBroadcast, m> do VC[self] := VC[self] + 1. trigger < rbBroadcast, [Data,VC,m]>;

Algorithm 2 upon event <rbDeliver, pj, [Data,VCm,m]> do wait until ( (VC[pj]  VCm[pj] – 1) and (for all pk ≠ pj: VC[pk]  VCm[pk])); trigger < rcoDeliver, pj,m>; if pj ≠ self then VC[pj] := VC[pj] + 1.

Algorithm 2 p1 p2 p3 m1 m2 m2 m1 [2,0,0] [1,0,0] m1 m2 m1 m2 [1,0,0]

Algorithm 2 p1 p2 p3 m1 m2 m1 m2 [1,0,0] [1,1,0] m2 m1 m1 m2 [1,0,0]