A growing class of applications depends on fair ordering, where events that occur earlier should be processed before later ones. Providing such guarantees is difficult in practice because clock synchronization is inherently imperfect: events generated at different clients within a short time window may carry timestamps that cannot be reliably ordered. Rather than attempting to eliminate synchronization error, we embrace it and establish a probabilistically fair sequencing process. Tommy is a sequencer that uses a statistical model of per-clock synchronization error to compare noisy timestamps probabilistically. Although this enables ordering of two events, the probabilistic comparator is intransitive, making global ordering non-trivial. We address this challenge by mapping the sequencing problem to a classical ranking problem from social choice theory, which offers principled mechanisms for reasoning with intransitive comparisons. Using this formulation, Tommy produces a partial order of events, achieving significantly better fairness than a Spanner TrueTime-based baseline approach.
翻译:日益增长的一类应用依赖于公平排序机制,即较早发生的事件应当比较晚发生的事件优先处理。在实践中提供此类保证十分困难,因为时钟同步本质上是不完美的:在短时间内不同客户端生成的事件可能携带无法可靠排序的时间戳。我们不再试图消除同步误差,而是接受这一现实并建立概率公平的排序流程。Tommy是一个利用单时钟同步误差统计模型对带噪声时间戳进行概率比较的排序器。虽然这种方法能够实现两个事件的排序,但概率比较器不具备传递性,使得全局排序变得复杂。我们通过将排序问题映射为社会选择理论中的经典排名问题来应对这一挑战,该理论为处理非传递性比较提供了原则性机制。基于此框架,Tommy生成事件的部分序,其公平性显著优于基于Spanner TrueTime的基线方法。