Physics Lournal

Powered by 🌱Roam Garden

Time, Clocks, and the Ordering of Events in a Distributed System

Abstract: The concept of one event happening before another is examined, and shown to describe a partial ordering of events.

A distributed algorithm is given for synchronizing a system of logical clocks that can be used to order events.

Logical brings to mind the feeling that time, in systems, is about what existing (past, present or future) system state can be derived from a preceding sequence of events.

Something about this reminds me of a function, because It can also be said to idealize how a varying quantity depends on another quantity, i.e the position of a planet is a function of time. (The state of a system as a function of time).

Time is such a problem in computing.

Again we find ourselves wondering Does time move through data, or does data move through time?

I mean the answer is both, with movement through time being foundational, as data doesn't have to change, but time is fundamentally change, which data is subject to...wait- this is borderline getting into Information Theory & Co because data is just a structured representation of information.

The algorithm is then specialized for synchronizing physical clocks, and a bound is derived on how far out of sync they can become.

Introduction

Time is fundamental to how we think.

The concept of the temporal ordering of events pervades our thinking about systems.

"...here, transmission through space (typically signaling), is the same as transmission through time(typically storage)..."

A distributed system consists of distinct, spatially separated processes, that communicate via messaging.

At some point, a system stops being a set of parts, and starts being a network of connections.

In distributed systems, it is sometimes impossible to say that one of two events happened first, meaning the relation of 'happened before' is only a partial ordering.

The Partial Ordering

Most would say event a happened before eventb, if a happened at an earlier time.

However, if the specification of events observable within the system, is in terms of physical time, the system must contain real clocks, which do not keep precise time, meaning we can not define synchrony in terms of physical clocks, if we want to temporally order events.

Logical Clocks

We will take an abstract view, where a clock is a way of assigning numbers, that represent a "time" at which an event occurred.

If an event a, occurs before b, then a should happen at an earlier "time" than b.

Clock Condition

For any events a,b:a, b: if  a−>  b,  then  Ci⟨a⟩≼Ci⟨b⟩if\; a ->\; b,\; then\; C_i\langle a \rangle\preccurlyeq C_i\langle b \rangle

a,b,∣  Ci⟨a⟩>Ci⟨b⟩a, b, |\; C_i\langle a \rangle \gt C_i\langle b \rangle

If a implies b (or if b can be derived from a), then the Clock Condition of event a should should be lt || gt, depending on your point of view, of event b.

Ordering the Events Totally

We can use a system of clocks satisfying the Clock Condition to place a total ordering on the set of all system events.

Anomalous Behavior

Our resource scheduling algorithms ordering can allow for anomalous behavior, because we're using partial ordering of relative time, which means our systems may observe a chronological order that is inconsistent with reality, because they aren't aware of real-time.

Also Arises from the fact that when we bring together multiple elements the results may not necessarily be equivalent to the sum of the elements properties in isolation.