Important announcement

Dear visitor,

Please note that this OpenCourseWare platform will be replaced at the end of 2026 by a new platform (under the same url ocw.tudelft.nl).

Courses and their contents that are currently available the platform will partly be migrated. URL’s for this content will change and content might be unavailable for some time. In addition, some courses will not be available anymore.

If you are linking to specific courses on this platform (for instance for your students), please take timely measures to avoid problems with access. Possible actions are:

  • Download the materials to your local platform (laptop, server)
  • For educators only (including TU Delft lecturers): Contact us at ocw@tudelft.nl and inform us what course you are using in what context (institute, program, period of use, number of students). We will research (in collaboration with the authors of the course) and decide if we will migrate the course, and if yes, can supply you with a new url.

Thank you.

1.2.3 The Struggle for Causality

Course subject(s) 1: Introduction and Foundations

The Problem of Network Delays

In some situations, network delays can have unintended consequences due to order violations.

a slow message causes an ordering violation

In the example above, two independent transactions are issued, a deposit of 100 EUR and a withdrawal of 50 EUR from the same bank account. If we start with an empty bank account, a severe delay of the first message can have the second transaction getting cancelled because at this point the deposit has not been processed yet. This points to a deeper underlying problem. In many applications, we implicitly rely on some ordering principle which a bare communication channel cannot guarantee.

The Struggle for Causality

In a simplified model, we might want to ensure that messages are received in a relative order, meaning that a message sent first is also received first by the other endpoint. We typically call this model First-In-First-Out (FIFO). Protocols like TCP can ensure this within a single TCP session by worst case delaying out-of-band messages and performing reordering under the hood.

fifo ordering does not guarantee causality

Unfortunately, FIFO ordering can only ensure causality between two endpoints, but generally not between more endpoints. As the picture above shows, all messages are compliant with FIFO ordering but the red message is overtaken by the sequence of black messages. From an end-to-end point of view, this case violates causal ordering between the first and the third node. By causality, we mean the capacity of one event influencing the other, which in a generic system for which we have no semantic understanding of cause and action, we have to assume to be a temporal property. Since the network is asynchronous, however, the observation of a message arriving gives us very little indication of when it was sent, especially when the message was forwarded through one or more intermediate nodes.

Creative Commons License
Modern Distributed Systems by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://online-learning.tudelft.nl/courses/modern-distributed-systems/
Back to top
[sg_popup id=6]