Presentation is loading. Please wait.

Presentation is loading. Please wait.

Causal Delivery (Thomas) Matt Guinn CS523, Spring 2006.

Similar presentations

Presentation on theme: "Causal Delivery (Thomas) Matt Guinn CS523, Spring 2006."— Presentation transcript:


2 Causal Delivery (Thomas) Matt Guinn CS523, Spring 2006

3 Research Basis Causal Delivery Protocols in Real-time Systems: A Generic Model Paulo Verissimo University of Lisboa 1996 Available at library (not electronically) or from TA 004.3305 RE

4 Purpose – Multicast Reliability Clock-driven Require a global time basis or reference Considered most suitable for real-time systems Timer-driven Clock-less Acknowledgement based relying on local timers (e.g. relative references) Asynchrony led to doubts on applicability

5 Purpose (continued) To show that clock-based protocols are not absolutely necessary to maintain a cause-effect ordering Ensuring causal delivery in a timer-based protocol accomplishes this Allows for more effective protocol development by providing more options in the search for a best fit

6 Outline Basic definitions and assumptions Key concepts of causality Three theorems for proving causal ordering

7 Causal Delivery – Defined Given a distributed system where messages are being passed back and forth, causal delivery ensures that they are all delivered in precedence order More formally: Consider two messages, m 1, m 2, sent by p, resp q, to the same destination participant r. Causal delivery ensures that if send p (m1) send q (m2), then deliver r (m1) deliver r (m2), i.e. m 1 is delivered to r before m 2

8 Assumptions and Notations Systems in question are synchronous Known bounds on CPU speed, message transmission delay, clock rate drift Events Basic event - e i p – either internal or external, it is the i-th event of participant p Action – ACT p (a) – participant p takes some external action (i.e. I/O or sending message) Our send event Observation – OBS p (a) – participant p observes an external event a such as an environmental observation, or delivery of a message sent by another participant Our deliver event

9 Precedence In order for an event to precede () another event, at least one of the following must hold true: for j > i, e i p e j p for p != q, e i p e j q if e i p is an external event ACT p (a) and e j q is an external event OBS q (a) for p != q, e i p e j q if there exists an event e such that e i p e and e e j q

10 Previous work – Logical Ordering Logical ordering Causality controlled by protocol itself A message m 1 logically precedes m 2 if: m 1 is sent before m 2, by the same participant or m 1 is delivered to the sender of m 2 before it sends m 2 or there exists a message m 3 such that m 1 m 3 and m 3 m 2

11 Logical Ordering Continued Oddly similar…why cover again? Logical ordering works naturally in environments where only that protocol is in use Environments which include any type of data transmission which goes unnoticed or unaffected by the protocol can generate failures These conditions are known as hidden channels or clandestine information Almost all modern distributed environments have multiple protocols and any number of hidden channels Would be represented in our system as an ACT or OBS in a chain of causally related events which do not correspond to sends or deliveries of a logical ordering protocol

12 Temporal Ordering Common sense tells us that in order for an event to cause an effect in another, it must precede it in time a message m 1 precedes m 2 temporally if the send event of m 1 physically occurs before that of m 2, in a Newtownian time- frame t(send(m 1 )) < t(send(m 2 ))

13 Temporal Ordering Failings Time-stamping indeed helps maintain causal order under optimal circumstances Fails to account for real-world timing constraints The time required for data to travel from one participant to another, execution time at a node, etc A minimum, finite amount of time is required in order for one event to cause an effect in another δ is our notation for this minimum amount of time Only messages separated by at least this (δ) amount of time can be considered causally related

14 Fixing Temporal Ordering To accommodate the shortcomings of temporal ordering, we introduce three more concepts δ – precedence An event e is said to δ t -precede an event e` (e e`), if t(e`) – t(e) > δ t Synchronism metrics Delivery time of a message, t p d (m) is the interval between send(m) event and deliver p (m) event at p t(dliver p (m)) – t(send(m)) T p d max = maximum delivery time for participant p T p d min = minimum delivery time for participant p

15 Steadiness Steadiness is the greatest difference across all possible participants between their maximum and minimum delivery times and is symbolized by σ σ = max p (T p d max – T p d min) We these fundamentals, we can now state the first of three theorems that support causal delivery

16 Theorem 1 A protocol with σ steadiness delivers messages m1 and m2, such that send(m1) -> send(m2), in temporal order This proves precedence, but not necessarily causality since messages may still precede each other, but not be ordered causally due to the steadiness delay

17 Two additional concepts Local granularity – The minimum delay between any two events in a given participant Symbolized as μ t Propagation Delay – The minimum delay between an Action event and its corresponding Observation event between two participants Symbolized as μ s

18 On hidden channels… Adverse environments – Those where channels external to the protocol can deliver information faster than the protocol itself μ s < min p (T p d min) Propagation delay is now defined by fastest hidden channel Favourable environments – Those where the channels external to the protocol are slower than or as fast as the latter, or do not exist… μ s = min p (T p d min) Propagation delay is defined by the fastest execution available from the protocol

19 Theorem 2 -Adverse and Favourable A system with local granularity μ t and propagation delay μ s can ensure causal delivery if μ t > max μ (T μ d max) - μ s Valid for either adverse or favourable environments Says that as long as your local time between events is greater than the largest transmission time minus the propagation delay, you can ensure causal delivery

20 Theorem 3- Favourable A system with local granularity μ t, propagation delay μ s, a protocol with steadiness σ and an absolute minimum delivery time of min μ (T μ d min), can ensure causal delivery if μ s = min μ (T μ d min) and μ t > σ This is given since in favourable conditions, it lowers the allowed minimum value of μ t

21 Conclusion Precedence, temporal order, synchronicity, δ – precedence, steadiness, local granularity, and propagation delay are all quantities which must be known in order to have a provably causal system Together they support the preceding three theorems which, when applied to a protocol in development, allow one to maintain the requirements for causal delivery if it is so required Forms the basis for much future work which we see everyday in distributed applications

22 Thanks! Direct questions to:

Download ppt "Causal Delivery (Thomas) Matt Guinn CS523, Spring 2006."

Similar presentations

Ads by Google