Lecture 9: Ordered Multicasting

Slides:



Advertisements
Similar presentations
COS 461 Fall 1997 Group Communication u communicate to a group of processes rather than point-to-point u uses –replicated service –efficient dissemination.
Advertisements

Logical Clocks (2).
Replication. Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
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.
Distributed Systems Spring 2009
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
Distributed Systems CS Google Chubby and Message Ordering Recitation 4, Sep 29, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
SynchronizationCS-4513, D-Term Synchronization in Distributed Systems CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts,
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Synchronization in Distributed Systems CS-4513 D-term Synchronization in Distributed Systems CS-4513 Distributed Computing Systems (Slides include.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
Synchronization in Distributed Systems Chapter 6.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Fall 2007cs4251 Distributed Computing Umar Kalim Dept. of Communication Systems Engineering 15/01/2008.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
Synchronization Chapter 5.
Communication & Synchronization Why do processes communicate in DS? –To exchange messages –To synchronize processes Why do processes synchronize in DS?
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
Lecture 10 – Mutual Exclusion Distributed Systems.
Distributed Coordination. Turing Award r The Turing Award is recognized as the Nobel Prize of computing r Earlier this term the 2013 Turing Award went.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
6.2 Logical Clocks Kranthi Koya09/23/2015. Overview Introduction Lamport’s Logical Clocks Vector Clocks Research Areas Conclusion.
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Vector Clocks and Distributed Snapshots
CSE 486/586 Distributed Systems Global States
Distributed Mutex EE324 Lecture 11.
Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013
EECS 498 Introduction to Distributed Systems Fall 2017
Logical time (Lamport)
COT 5611 Operating Systems Design Principles Spring 2012
EECS 498 Introduction to Distributed Systems Fall 2017
CS 425 / ECE 428 Distributed Systems Fall 2017 Indranil Gupta (Indy)
Distributed Systems CS
Distributed Systems CS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Replication Improves reliability Improves availability
Distributed Systems CS
Time And Global Clocks CMPT 431.
Event Ordering.
EEC 688/788 Secure and Dependable Computing
Causal Consistency and Two-Phase Commit
Distributed Systems CS
Lecture 10: Coordination and Agreement
Distributed Systems CS
Chapter 5 (through section 5.4)
CDK: Sections 11.1 – 11.4 TVS: Sections 6.1 – 6.2
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Logical time (Lamport)
Distributed Systems CS
Lecture 11: Coordination and Agreement
Logical time (Lamport)
CSE 486/586 Distributed Systems Global States
CSE 486/586 Distributed Systems Reliable Multicast --- 2
Logical time (Lamport)
COT 5611 Operating Systems Design Principles Spring 2014
Outline Theoretical Foundations
Presentation transcript:

Lecture 9: Ordered Multicasting TVS: Section 6.2 (CDK: Section 12.4)

Contents What is an ordered multicast? Why is it useful? How can it be done? Using logical timestamps 27-Apr-19 COMP28112 Lecture 9

Multicast 1 process sends a message to a group of other processes More efficient than looping in the application sending a message to each May be able to guarantee that either all recipients get the message or none does. 27-Apr-19 COMP28112 Lecture 9

Example: duplicate bank records For speed of response to queries, and improved reliability, suppose a bank keeps its database replicated in geographically distant locations (e.g. London & Edinburgh) Each update request is sent to both (as a multicast) But this leads to an ordering constraint 27-Apr-19 COMP28112 Lecture 9

Fig 6.11 from TvS 27-Apr-19 COMP28112 Lecture 9

The Updates Suppose Update 1 credits £100 to an account containing £100 Suppose Update 2 adds 1% interest to the account. If not done in the same order, can get balances of £201 and £202 in the two databases. 27-Apr-19 COMP28112 Lecture 9

Totally-Ordered multicast To get the same answers, we need totally-ordered multicast, i.e. all messages are delivered in the same order to each receiver. Can be done with Lamport’s logical clocks. Consider a group of processes multicasting to each other. Each message is timestamped with the logical time of the sender. 27-Apr-19 COMP28112 Lecture 9

T-O Multicast (2) Assume multicast also goes to the sender Assume messages from the same sender are received by any 1 receiver in the order they were sent Assume that no messages are lost When message is received, put it in a local queue ordered by its timestamp. The receiver multicasts an ACK to all processes. (Note ACK is not queued!) A process can “act on” a queued message when it is at the head of the queue, and has been ACK’d by every other process. Each process has the same contents in the queue …! 27-Apr-19 COMP28112 Lecture 9

A will have to process messages in a different order (message delivery can be anything as long as it is the same for all processes) A B C 27-Apr-19 COMP28112 Lecture 9

Implications Note: the need to receive ACKs from all processes reduces advantage of replication! A crashed process will cause everything to stop …. Keeping replicas consistent by executing same operations in the same order is a general technique (state machine replication) 27-Apr-19 COMP28112 Lecture 9

Causally-Ordered Multicasting Weaker than totally-ordered because unrelated messages can be processed in different orders on different machines. Useful on, e.g., a bulletin board – may want messages delivered in the correct order where they are related, but not to tie down ordering between messages on unrelated topics 27-Apr-19 COMP28112 Lecture 9

C-O multicasting Now we use Vector clocks – but only noticing sends as events …. Suppose Pj receives message m from Pi with timestamp ts(m) Delay delivery to application until: ts(m)[i] = VCj[i] + 1 ts(m)[k] <= VCj[k] for all other k 27-Apr-19 COMP28112 Lecture 9

C-O multicasting (2) The 1st condition means that this is the next message Pj was expecting from Pi The 2nd means that Pj has seen all the messages seen by Pi when it sent message m. 27-Apr-19 COMP28112 Lecture 9

Example (1,0,0) (1,1,0) P0 m* m m P1 (1,1,0) delay m* P2 (0,0,0) 27-Apr-19 COMP28112 Lecture 9

Explanation m* from P1 arrives at P2 before m from P0 But m* was sent after m arrived at P1 Therefore delivery of m* in P2 is delayed until after m has been delivered. 27-Apr-19 COMP28112 Lecture 9

End-to-end argument Some systems have provided T-O and C-O multicasting (e.g. ISIS) Some debate about whether this is a Good Thing or not Two main problems: Not all causality is real (e.g. 1 sender may send unrelated messages, but the system will believe the order matters) 27-Apr-19 COMP28112 Lecture 9

E-to-E argument (cont.) Not all causality may be captured. E.g. users of the bulletin board might discuss issues offline and then post related messages without reading logically preceding ones first. A particular application will have its own approach, but we may or may not want to build it on top of an infrastructure which assumes the answers. 27-Apr-19 COMP28112 Lecture 9

Exercise a b d c f g i k m j l p n o q r s Use (i) Lamport Clocks; (ii) Vector Clocks to order the events 27-Apr-19 COMP28112 Lecture 9