Abstract
There is a gap between the theory and practice of distributed systems in terms of the use of time. The theory of distributed systems shunned the notion of time, and introduced “causality tracking” as a clean abstraction to reason about concurrency. The practical systems employed physical time (NTP) information but in a best effort manner due to the difficulty of achieving tight clock synchronization. In an effort to bridge this gap and reconcile the theory and practice of distributed systems on the topic of time, we propose a hybrid logical clock, HLC, that combines the best of logical clocks and physical clocks. HLC captures the causality relationship like logical clocks, and enables easy identification of consistent snapshots in distributed systems. Dually, HLC can be used in lieu of physical/NTP clocks since it maintains its logical clock to be always close to the NTP clock. Moreover HLC fits in to 64 bits NTP timestamp format, and is masking tolerant to NTP kinks and uncertainties.We show that HLC has many benefits for wait-free transaction ordering and performing snapshot reads in multiversion globally distributed databases.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bhatia, K., Marzullo, K., Alvisi, L.: Scalable causal message logging for wide-area environments. Concurrency and Computation: Practice and Experience 15(10), 873–889 (2003)
Corbett, J., Dean, J., et al.: Spanner: Google’s globally-distributed database. In: Proceedings of OSDI (2012)
Demirbas, M., Kulkarni, S.: Beyond truetime: Using augmentedtime for improving google spanner. In: Workshop on Large-Scale Distributed Systems and Middleware (LADIS) (2013)
Dijkstra, E.W.: Self-stabilizing systems in spite of distributed control. Communications of the ACM 17(11) (1974)
Du, J., Elnikety, S., Roy, A., Zwaenepoel, W.: Orbe: Scalable causal consistency using dependency matrices and physical clocks. In: Proceedings of the 4th Annual Symposium on Cloud Computing, SOCC 2013, pp. 11:1–11:14. ACM, New York (2013), http://doi.acm.org/10.1145/2523616.2523628
Du, J., Elnikety, S., Zwaenepoel, W.: Clock-SI: Snapshot isolation for partitioned data stores using loosely synchronized clocks. In: IEEE Symposium on Reliable Distributed Systems (SRDS), pp. 173–184 (2013)
Escriva, R., Dubey, A., Wong, B., Sirer, E.: Kronos: The design and implementation of an event ordering service. In: EuroSys (2014)
Fan, R., Lynch, N.: Gradient clock synchronization. In: PODC, pp. 320–327 (2004)
Fidge, J.: Timestamps in message-passing systems that preserve the partial ordering. In: Proceedings of the 11th Australian Computer Science Conference, vol. 10(1), pp. 56–66 (1988)
Kingsbury, K.: The trouble with timestamps, http://aphyr.com/posts/299-the-trouble-with-timestamps
Kotla, R., Alvisi, L., Dahlin, M., Clement, A., Wong, E.: Zyzzyva: Speculative byzantine fault tolerance. SIGOPS Oper. Syst. Rev. 41(6), 45–58 (2007)
Kulkarni, S., Demirbas, M., Madeppa, D., Avva, B., Leone, M.: Logical physical clocks and consistent snapshots in globally distributed databases. Tech. Rep. 2014-04, SUNY Buffalo (May 2014)
Kulkarni, S., Ravikant: Stabilizing causal deterministic merge. J. High Speed Networks 14(2), 155–183 (2005)
Lakshman, A., Malik, P.: Cassandra: Structured storage system on a p2p network. In: Proceedings of the 28th ACM Symposium on Principles of Distributed Computing, PODC 2009, p. 5 (2009)
Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Communications of the ACM 21(7), 558–565 (1978)
The future of leap seconds, http://www.ucolick.org/~sla/leapsecs/onlinebib.html
Another round of leapocalypse, http://www.itworld.com/security/288302/another-round-leapocalypse
Li, C., Porto, D., Clement, A., Gehrke, J., Preguiça, N., Rodrigues, R.: Making geo-replicated systems fast as possible, consistent when necessary. In: Symposium on Operating Systems Design and Implementation (OSDI 2012), pp. 265–278 (2012)
Lloyd, W., Freedman, M., Kaminsky, M., Andersen, D.: Don’t settle for eventual: Scalable causal consistency for wide-area storage with cops. In: SOSP, pp. 401–416 (2011)
Maroti, M., Kusy, B., Simon, G., Ledeczi, A.: The flooding time synchronization protocol. In: SenSys (2004)
Mashtizadeh, A., Bittau, A., Huang, Y., Mazières, D.: Replication, history, and grafting in the ori file system. In: SOSP, pp. 151–166 (2013)
Mattern, F.: Virtual time and global states of distributed systems. In: Parallel and Distributed Algorithms, pp. 215–226 (1989)
Mills, D.: A brief history of ntp time: Memoirs of an internet timekeeper. ACM SIGCOMM Computer Communication Review 33(2), 9–21 (2003)
Patt-Shamir, B., Rajsbaum, S.: A theory of clock synchronization (extended abstract). In: ACM Symposium on Theory of Computing (STOC), pp. 810–819 (1994)
Saito, Y.: Unilateral version vector pruning using loosely synchronized clocks. Tech. rep., HP Labs (2002)
Sigelman, B., Barroso, L., Burrows, M., Stephenson, P., Plakal, M., Beaver, D., Jaspan, S., Shanbhag, C.: Dapper, a large-scale distributed systems tracing infrastructure. Tech. rep., Google, Inc. (2010), http://research.google.com/archive/papers/dapper-2010-1.pdf
Sovran, Y., Power, R., Aguilera, M., Li, J.: Transactional storage for geo-replicated systems. In: SOSP, pp. 385–400 (2011)
Vogels, W.: Eventually consistent. Communications of the ACM 52(1), 40–44 (2009)
Wu, Z., Butkiewicz, M., Perkins, D., Katz-Bassett, E., Madhyastha, H.: Spanstore: Cost-effective geo-replicated storage spanning multiple cloud services. In: SOSP, pp. 292–308 (2013)
Zhang, Y., Power, R., Zhou, S., Sovran, Y., Aguilera, M., Li, J.: Transaction chains: Achieving serializability with low latency in geo-distributed storage systems. In: SOSP, pp. 276–291 (2013)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Kulkarni, S.S., Demirbas, M., Madappa, D., Avva, B., Leone, M. (2014). Logical Physical Clocks. In: Aguilera, M.K., Querzoni, L., Shapiro, M. (eds) Principles of Distributed Systems. OPODIS 2014. Lecture Notes in Computer Science, vol 8878. Springer, Cham. https://doi.org/10.1007/978-3-319-14472-6_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-14472-6_2
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-14471-9
Online ISBN: 978-3-319-14472-6
eBook Packages: Computer ScienceComputer Science (R0)