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.
