Skip to main content

Logical Physical Clocks

  • Conference paper
Book cover Principles of Distributed Systems (OPODIS 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8878))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Article  Google Scholar 

  2. Corbett, J., Dean, J., et al.: Spanner: Google’s globally-distributed database. In: Proceedings of OSDI (2012)

    Google Scholar 

  3. Demirbas, M., Kulkarni, S.: Beyond truetime: Using augmentedtime for improving google spanner. In: Workshop on Large-Scale Distributed Systems and Middleware (LADIS) (2013)

    Google Scholar 

  4. Dijkstra, E.W.: Self-stabilizing systems in spite of distributed control. Communications of the ACM 17(11) (1974)

    Google Scholar 

  5. 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

  6. 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)

    Google Scholar 

  7. Escriva, R., Dubey, A., Wong, B., Sirer, E.: Kronos: The design and implementation of an event ordering service. In: EuroSys (2014)

    Google Scholar 

  8. Fan, R., Lynch, N.: Gradient clock synchronization. In: PODC, pp. 320–327 (2004)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. Kingsbury, K.: The trouble with timestamps, http://aphyr.com/posts/299-the-trouble-with-timestamps

  11. Kotla, R., Alvisi, L., Dahlin, M., Clement, A., Wong, E.: Zyzzyva: Speculative byzantine fault tolerance. SIGOPS Oper. Syst. Rev. 41(6), 45–58 (2007)

    Article  Google Scholar 

  12. 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)

    Google Scholar 

  13. Kulkarni, S., Ravikant: Stabilizing causal deterministic merge. J. High Speed Networks 14(2), 155–183 (2005)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Communications of the ACM 21(7), 558–565 (1978)

    Article  MATH  Google Scholar 

  16. The future of leap seconds, http://www.ucolick.org/~sla/leapsecs/onlinebib.html

  17. Another round of leapocalypse, http://www.itworld.com/security/288302/another-round-leapocalypse

  18. 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)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Maroti, M., Kusy, B., Simon, G., Ledeczi, A.: The flooding time synchronization protocol. In: SenSys (2004)

    Google Scholar 

  21. Mashtizadeh, A., Bittau, A., Huang, Y., Mazières, D.: Replication, history, and grafting in the ori file system. In: SOSP, pp. 151–166 (2013)

    Google Scholar 

  22. Mattern, F.: Virtual time and global states of distributed systems. In: Parallel and Distributed Algorithms, pp. 215–226 (1989)

    Google Scholar 

  23. Mills, D.: A brief history of ntp time: Memoirs of an internet timekeeper. ACM SIGCOMM Computer Communication Review 33(2), 9–21 (2003)

    Article  Google Scholar 

  24. Patt-Shamir, B., Rajsbaum, S.: A theory of clock synchronization (extended abstract). In: ACM Symposium on Theory of Computing (STOC), pp. 810–819 (1994)

    Google Scholar 

  25. Saito, Y.: Unilateral version vector pruning using loosely synchronized clocks. Tech. rep., HP Labs (2002)

    Google Scholar 

  26. 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

  27. Sovran, Y., Power, R., Aguilera, M., Li, J.: Transactional storage for geo-replicated systems. In: SOSP, pp. 385–400 (2011)

    Google Scholar 

  28. Vogels, W.: Eventually consistent. Communications of the ACM 52(1), 40–44 (2009)

    Article  Google Scholar 

  29. 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)

    Google Scholar 

  30. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics