Beyond TrueTime : Using AugmentedTime for Improving Spanner

Spanner [1] is Google’s scalable, multi-version, globally-distributed, and synchronously-replicated database. In order to support distributed transactions at global scale, Spanner leverages on a novel TrueTime (TT) API that exposes clock uncertainty. In this paper, we discuss how Spanner’s TT-based approach relates to the concepts of causality and consistent cuts in the distributed systems literature. Then, armed with a better understanding of the tradeoffs made by the TT-based approach, we discuss how to eliminate its shortcomings. We consider two main issues with Spanner’s TT-based approach. First, it requires access to special hardware for maintaining tightly-synchronized clocks and minimizing uncertainty in TT. And second, transactions in Spanner are still delayed at commit time to compensate for the remaining TT uncertainty. To eliminate these shortcomings, we propose the use of AugmentedTime (AT), which combines the best of TT-based wallclock ordering with causality-based ordering in asynchronous distributed systems. We show that the size of AT can be kept small and AT can be added to Spanner in a backward-compatible fashion, and as such, AT can be used in lieu of (or in addition to) TT in Spanner for timestamping and querying data efficiently.