baseds
Published in

baseds

Logical Time and Lamport Clocks (Part 1)

Logical time and Lamport clocks (part 1)

Causality and “happens before”

Lamport’s paper on causal ordering was published in 1978!
Why do we care about ordering events? So that we can track causality!
Lamport’s logical clocks allow us to shift from happened “when” to happened “before”.

Shifting from “when” to “before”

Understanding the “happened before” notation.
Causally-ordered and concurrent events across two processes.
  1. Events a and b must occur on the same process, and a must occur before b occurs on the process.
  2. The events can occur on different processes so long as a is the send event that corresponds to b, which must be its receive event.
  3. The events are transitively linked with another event in the system, but a still happens before b. For example, if a happens before c, and c happens before b, then we know that a → b.

Logical clocks to the stage

How do the clocks factor in?
Logical clocks: a definition.

Resources

  1. Time, Clocks, and the Ordering of Events in a Distributed System, Leslie Lamport
  2. Time, Clocks and Ordering of Events in a Dist. System, Dan Rubenstein
  3. Time and Ordering: Lamport Timestamps, Indranil Gupta
  4. Lamport’s Logical Clocks, Michael Whittaker
  5. Logical Clocks, Professor Paul Krzyzanowski

--

--

Exploring the basics of distributed systems, every alternate Wednesday, for a year.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store