CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Reliable Multicast --- 1 Steve Ko Computer Sciences and Engineering University at Buffalo.

Slides:



Advertisements
Similar presentations
1 Process groups and message ordering If processes belong to groups, certain algorithms can be used that depend on group properties membership create (
Advertisements

Global States.
Logical Clocks (2).
CS425/CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT BROADCAST Prof Philippas Tsigas Distributed Computing and Systems Research Group.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Consensus Steve Ko Computer Sciences and Engineering University at Buffalo.
CS542 Topics in Distributed Systems Diganta Goswami.
Uncoordinated Checkpointing The Global State Recording Algorithm Cristian Solano.
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.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
CS 582 / CMPE 481 Distributed Systems
Causality & Global States. P1 P2 P Physical Time 4 6 Include(obj1 ) obj1.method() P2 has obj1 Causality violation occurs when order.
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
Distributed Systems Fall 2009 Logical time, global states, and debugging.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Ordered Communication. Define guarantees about the order of deliveries inside group of processes Type of ordering: Deliveries respect the FIFO ordering.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Lecture 3-1 Computer Science 425 Distributed Systems Lecture 3 Logical Clock and Global States/ Snapshots Reading: Chapter 11.4&11.5 Klara Nahrstedt.
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
Computer Science 425 Distributed Systems (Fall 2009) Lecture 5 Multicast Communication Reading: Section 12.4 Klara Nahrstedt.
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.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Consensus Steve Ko Computer Sciences and Engineering University at Buffalo.
1 Distributed Systems CS 425 / CSE 424 / ECE 428 Global Snapshots Reading: Sections 11.5 (4 th ed), 14.5 (5 th ed)  2010, I. Gupta, K. Nahrtstedt, S.
1 A Modular Approach to Fault-Tolerant Broadcasts and Related Problems Author: Vassos Hadzilacos and Sam Toueg Distributed Systems: 526 U1580 Professor:
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Distributed Shared Memory Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Replication with View Synchronous Group Communication Steve Ko Computer Sciences and Engineering.
Multicast Communication. Unicast vs. Multicast Multicast Whereas the majority of network services and network applications use unicast for IPC, multicasting.
Dealing with open groups The view of a process is its current knowledge of the membership. It is important that all processes have identical views. Inconsistent.
CSE 486/586 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion & Leader Election Steve Ko Computer Sciences and Engineering University.
Building Dependable Distributed Systems, Copyright Wenbing Zhao
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
CSE 486/586 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
Lecture 4-1 Computer Science 425 Distributed Systems (Fall2009) Lecture 4 Chandy-Lamport Snapshot Algorithm and Multicast Communication Reading: Section.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Lecture 9: Multicast Sep 22, 2015 All slides © IG.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Logical Time Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Systems Lecture 7 Multicast 1. Previous lecture Global states – Cuts – Collecting state – Algorithms 2.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Systems Lecture 6 Global states and snapshots 1.
Reliable multicast Tolerates process crashes. The additional requirements are: Only correct processes will receive multicasts from all correct processes.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
CSE 486/586 Distributed Systems Reliable Multicast --- 1
CSE 486/586 Distributed Systems Leader Election
CSE 486/586 Distributed Systems Global States
Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013
CS 425 / ECE 428 Distributed Systems Fall 2017 Indranil Gupta (Indy)
CSE 486/586 Distributed Systems Leader Election
CSE 486/586 Distributed Systems Mutual Exclusion
CSE 486/586 Distributed Systems Global States
CSE 486/586 Distributed Systems Reliable Multicast --- 2
CSE 486/586 Distributed Systems Logical Time
CSE 486/586 Distributed Systems Mutual Exclusion
CSE 486/586 Distributed Systems Reliable Multicast --- 1
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Reliable Multicast Steve Ko Computer Sciences and Engineering University at Buffalo

CSE 486/586, Spring 2014 Last Time Global states –A union of all process states –Consistent global state vs. inconsistent global state The “snapshot” algorithm Take a snapshot of the local state Broadcast a “marker” msg to tell other processes to record Start recording all msgs coming in for each channel until receiving a “marker” Outcome: a consistent global state 2

CSE 486/586, Spring 2014 Today’s Question How do a group of processes communicate? Unicast (best effort or reliable) –One-to-one: Message from process p to process q. –Best effort: message may be delivered, but will be intact –Reliable: message will be delivered Broadcast –One-to-all: Message from process p to all processes –Impractical for large networks Multicast –One-to-many: “Local” broadcast within a group g of processes What are the issues? –Processes crash (we assume crash-stop) –Messages get delayed 3

CSE 486/586, Spring 2014 Why: Examples 4

CSE 486/586, Spring 2014 Why: Examples Akamai’s Configuration Management System (called ACMS) –A core group of 3-5 servers. –Continuously multicast to each other the latest updates. –After an update is reliably multicast within this group, it is then sent out to all the (1000s of) servers Akamai has all over the world. Air Traffic Control System –Commands by one ATC need to be ordered (and reliable) multicast out to other ATC’s. Newsgroup servers –Multicast to each other in a reliable and ordered manner. 5

CSE 486/586, Spring 2014 The Interface 6 Application (at process p) MULTICAST PROTOCOL send multicast Incoming messages deliver multicast One process p

CSE 486/586, Spring 2014 What: Properties to Consider Liveness: guarantee that something good will happen eventually –For the initial state, there is a reachable state where the predicate becomes true. –“Guarantee of termination” is a liveness property Safety: guarantee that something bad will never happen –For any state reachable from the initial state, the predicate is false. –Deadlock avoidance algorithms provide safety Liveness and safety are used in many other CS contexts. 7

CSE 486/586, Spring 2014 Basic Multicast (B-multicast) A straightforward way to implement B-multicast is to use a reliable one-to-one send (unicast) operation: –B-multicast(g,m): for each process p in g, send(p,m). –receive(m): B-deliver(m) at p. Guarantees? –All processes in g eventually receive every multicast message… –… as long as the sender doesn’t crash 8

CSE 486/586, Spring 2014 What: Reliable Multicast Goals Integrity: A correct (i.e., non-faulty) process p delivers a message m at most once. –“Non-faulty”: doesn’t deviate from the protocol & alive Agreement: If a correct process delivers message m, then all the other correct processes in group(m) will eventually deliver m. –Property of “all or nothing.” Validity: If a correct process multicasts (sends) message m, then it will eventually deliver m itself. –Guarantees liveness to the sender. Validity and agreement together ensure overall liveness: if some correct process multicasts a message m, then, all correct processes deliver m too. 9

CSE 486/586, Spring 2014 Reliable Multicast Overview Keep a history of messages for at-most-once delivery Everyone repeats multicast upon a receipt of a message for agreement & validity. –Why? 10

CSE 486/586, Spring 2014 Reliable R-Multicast Algorithm On initialization Received := {}; For process p to R-multicast message m to group g B-multicast(g,m); (p ∈ g is included as destination) On B-deliver(m) at process q with g = group(m) if (m ∉ Received): Received := Received ∪ {m}; if (q ≠ p): B-multicast(g,m); R-deliver(m) R-multicast B-multicast reliable unicast “USES” 11

CSE 486/586, Spring 2014 Reliable R-Multicast Algorithm On initialization Received := {}; For process p to R-multicast message m to group g B-multicast(g,m); (p ∈ g is included as destination) On B-deliver(m) at process q with g = group(m) if (m ∉ Received): Received := Received ∪ {m}; if (q ≠ p): B-multicast(g,m); R-deliver(m) Integrity Validity Agreement 12

CSE 486/586, Spring 2014 CSE 486/586 Administrivia PA2 is out. New TA: Yavuz Yilmaz –Office hours: W 12pm – 3pm 13

CSE 486/586, Spring 2014 Ordered Multicast Problem Each process delivers received messages independently. The question is, what ordering does each process use? Three meaningful types of ordering –FIFO –Causal –Total 14 P1 P2 P3 M1 M2

CSE 486/586, Spring 2014 FIFO Ordering Preserving the process order The message delivery order at each process should preserve the message sending order from every process. For example, –P1: m0, m1, m2 –P2: m3, m4, m5 –P3: m6, m7, m8 FIFO? (m0, m3, m6, m1, m4, m7, m2, m5, m8) –Yes! FIFO? (m0, m4, m6, m1, m3, m7, m2, m5, m8) –No! 15

CSE 486/586, Spring 2014 Causal Ordering Preserving the happened-before relations The message delivery order at each process should preserve the happened-before relations across all processes. For example, –P1: m0, m1, m2 –P2: m3, m4, m5 –P3: m6, m7, m8 –Cross-process happened-before: m0  m4, m5  m8 Causal? (m0, m3, m6, m1, m4, m7, m2, m5, m8) –Yes! Causal? (m0, m4, m1, m7, m3, m6, m2, m5, m8) –No! 16

CSE 486/586, Spring 2014 Total Ordering Every process delivers all messages in the same order. For example, –P1: m0, m1, m2 –P2: m3, m4, m5 –P3: m6, m7, m8 Total? –P1: m7, m1, m2, m4, m5, m3, m6, m0, m8 –P2: m7, m1, m2, m4, m5, m3, m6, m0, m8 –P3: m7, m1, m2, m4, m5, m3, m6, m0, m8 Total? –P1: m7, m1, m2, m4, m5, m3, m6, m0, m8 –P2: m7, m2, m1, m4, m5, m3, m6, m0, m8 –P3: m7, m1, m2, m4, m5, m3, m6, m8, m0 17

CSE 486/586, Spring 2014 Ordered Multicast FIFO ordering: If a correct process issues multicast(g,m) and then multicast(g,m’), then every correct process that delivers m’ will have already delivered m. Causal ordering: If multicast(g,m)  multicast(g,m’) then any correct process that delivers m’ will have already delivered m. –Typically,  defined in terms of multicast communication only Total ordering: If a correct process delivers message m before m’ (independent of the senders), then any other correct process that delivers m’ will have already delivered m. 18

CSE 486/586, Spring 2014 Total, FIFO and Causal Ordering Totally ordered messages T 1 and T 2. FIFO-related messages F 1 and F 2. Causally related messages C 1 and C 3 Total ordering does not imply causal ordering. Causal ordering implies FIFO ordering Causal ordering does not imply total ordering. Hybrid mode: causal-total ordering, FIFO-total ordering. 19

CSE 486/586, Spring 2014 Display From Bulletin Board Program Bulletin board: os.interesting Item FromSubject 23A.HanlonMach 24G.JosephMicrokernels 25A.HanlonRe: Microkernels 26T.L’HeureuxRPC performance 27M.WalkerRe: Mach end What is the most appropriate ordering for this application? (a) FIFO (b) causal (c) total What is the most appropriate ordering for this application? (a) FIFO (b) causal (c) total 20

CSE 486/586, Spring 2014 Providing Ordering Guarantees (FIFO) Look at messages from each process in the order they were sent: –Each process keeps a sequence number for each of the other processes. – When a message is received, if message # is: »as expected (next sequence), accept »higher than expected, buffer in a queue »lower than expected, reject 21

CSE 486/586, Spring 2014 Implementing FIFO Ordering S p g : the number of messages p has sent to g. R q g : the sequence number of the latest group-g message p has delivered from q. For p to FO-multicast m to g –p increments S p g by 1. –p “piggy-backs” the value S p g onto the message. –p B-multicasts m to g. At process p, Upon receipt of m from q with sequence number S: –p checks whether S= R q g +1. If so, p FO-delivers m and increments R q g –If S > R q g +1, p places the message in the hold-back queue until the intervening messages have been delivered and S= R q g

CSE 486/586, Spring 2014 Hold-back Queue for Arrived Multicast Messages 23

CSE 486/586, Spring 2014 Example: FIFO Multicast P1 P2 P Physical Time Reject: 1 < Accept 1 = Accept: 2 = Buffer 2>0 +1 Accept: 1 = Accept Buffer 2 =1 + 1 Accept 1 = Sequence Vector (do NOT be confused with vector timestamps) “Accept” = Deliver 24 1

CSE 486/586, Spring 2014 Summary Reliable Multicast –Reliability –Ordering –R-multicast Ordered Multicast –FIFO ordering –Total ordering –Causal ordering Next: continue on multicast 25

CSE 486/586, Spring Acknowledgements These slides contain material developed and copyrighted by Indranil Gupta (UIUC).