Table of Contents
Fetching ...

Beyond Lamport, Towards Probabilistic Fair Ordering

Muhammad Haseeb, Jinkun Geng, Radhika Mittal, Aurojit Panda, Srinivas Narayana, Anirudh Sivaraman

TL;DR

This work tackles fair ordering in distributed systems where clock synchronization errors confound deterministic sequencing. It introduces Tommy, a probabilistic sequencer that learns per-client clock-offset distributions to compute a likely-happened-before relation $\\xrightarrow{p}$ and batches events to preserve fairness. Ordering probabilities are derived from the distribution of clock offsets, with Gaussian offsets yielding closed-form expressions and non-Gaussian cases handled via learned convolutions and FFT-based computation. The approach supports online sequencing through safe emission times and produces a partial but practically useful fair ordering, with demonstrated gains over conservative baselines in simulation and clear directions for extending to total order and Byzantine settings.

Abstract

A growing class of applications demands \emph{fair ordering} of events, which ensures that events generated earlier are processed before later events. However, achieving such sequencing is challenging due to the inherent errors in clock synchronization: two events at two clients generated close together may have timestamps that cannot be compared confidently. We advocate for an approach that embraces, rather than eliminates, clock synchronization errors. Instead of attempting to remove the error from a timestamp, \systemname{}, our proposed system, leverages a statistical model to compare two noisy timestamps probabilistically by learning per-clock synchronization error distributions. Our preliminary statistical model computes the probability that one event precedes another by only relying on local clocks of clients. This serves as a foundation for a new relation: \emph{likely-happened-before} denoted by $\xrightarrow{p}$ where $p$ represents the probability that an event happened before another. The $\xrightarrow{p}$ relation provides a basis for ordering multiple events which are otherwise considered \emph{concurrent} by Lamport's \emph{happened-before} ($\rightarrow$) relation. We highlight various related challenges including the intransitivity of the $\xrightarrow{p}$ relation as opposed to the transitive $\rightarrow$ relation. We outline several research directions: online fair sequencing, stochastically fair total ordering, and handling byzantine clients.

Beyond Lamport, Towards Probabilistic Fair Ordering

TL;DR

This work tackles fair ordering in distributed systems where clock synchronization errors confound deterministic sequencing. It introduces Tommy, a probabilistic sequencer that learns per-client clock-offset distributions to compute a likely-happened-before relation and batches events to preserve fairness. Ordering probabilities are derived from the distribution of clock offsets, with Gaussian offsets yielding closed-form expressions and non-Gaussian cases handled via learned convolutions and FFT-based computation. The approach supports online sequencing through safe emission times and produces a partial but practically useful fair ordering, with demonstrated gains over conservative baselines in simulation and clear directions for extending to total order and Byzantine settings.

Abstract

A growing class of applications demands \emph{fair ordering} of events, which ensures that events generated earlier are processed before later events. However, achieving such sequencing is challenging due to the inherent errors in clock synchronization: two events at two clients generated close together may have timestamps that cannot be compared confidently. We advocate for an approach that embraces, rather than eliminates, clock synchronization errors. Instead of attempting to remove the error from a timestamp, \systemname{}, our proposed system, leverages a statistical model to compare two noisy timestamps probabilistically by learning per-clock synchronization error distributions. Our preliminary statistical model computes the probability that one event precedes another by only relying on local clocks of clients. This serves as a foundation for a new relation: \emph{likely-happened-before} denoted by where represents the probability that an event happened before another. The relation provides a basis for ordering multiple events which are otherwise considered \emph{concurrent} by Lamport's \emph{happened-before} () relation. We highlight various related challenges including the intransitivity of the relation as opposed to the transitive relation. We outline several research directions: online fair sequencing, stochastically fair total ordering, and handling byzantine clients.
Paper Structure (18 sections, 1 theorem, 21 equations, 5 figures)

This paper contains 18 sections, 1 theorem, 21 equations, 5 figures.

Key Result

proposition 1

Let $X,Y,Z$ be independent normal random variables Define the preference relation Then $\succ$ is transitive: if $X\succ Y$ and $Y\succ Z$, we necessarily have $X\succ Z$.

Figures (5)

  • Figure 1: The sequencer, Tommy, uses clock offset distributions and noisy timestamps of messages to achieve a fair ordering of messages via a statistical model. Messages whose order cannot be confidently determined become part of the same output batch.
  • Figure 2: Fair if clocks are perfectly synchronized.
  • Figure 3: Fair w/o constraints but probabilistically.
  • Figure 4: Fair if all wires are of equal length.
  • Figure 5: Tommy achieves fairer sequencing than TrueTime. Size of the marker (and color intensity) is proportional to the inter-messages gap across clients.

Theorems & Definitions (2)

  • Definition 1: Fair Sequencing
  • proposition 1