Skip to main content

Automated Validation of State-Based Client-Centric Isolation with TLA\(^+\)

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12524))

Abstract

Clear consistency guarantees on data are paramount for the design and implementation of distributed systems. When implementing distributed applications, developers require approaches to verify the data consistency guarantees of an implementation choice. Crooks et al. define a state-based and client-centric model of database isolation. This paper formalizes this state-based model in , reproduces their examples and shows how to model check runtime traces and algorithms with this formalization. The formalized model in enables semi-automatic model checking for different implementation alternatives for transactional operations and allows checking of conformance to isolation levels. We reproduce examples of the original paper and confirm the isolation guarantees of the combination of the well-known 2-phase locking and 2-phase commit algorithms. Using model checking this formalization can also help finding bugs in incorrect specifications. This improves feasibility of automated checking of isolation guarantees in synthesized synchronization implementations and it provides an environment for experimenting with new designs.

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

Buying options

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 EPUB and 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

Learn about institutional subscriptions

References

  1. Adya, A.: Weak consistency: a generalized theory and optimistic implementations for distributed transactions. Ph.D. thesis, Massachusetts Institute of Technology, Department of Electrical Engineering and Computer Science (1999)

    Google Scholar 

  2. Bailis, P., Davidson, A., Fekete, A., Ghodsi, A., Hellerstein, J.M., Stoica, I.: Highly available transactions - virtues and limitations. Proc. VLDB Endow. 7(3), 181–192 (2013). https://doi.org/10.14778/2732232.2732237

    Article  Google Scholar 

  3. Bengtsson, J., Larsen, K., Larsson, F., Pettersson, P., Yi, W.: UPPAAL—a tool suite for automatic verification of real-time systems. In: Alur, R., Henzinger, T.A., Sontag, E.D. (eds.) HS 1995. LNCS, vol. 1066, pp. 232–243. Springer, Heidelberg (1996). https://doi.org/10.1007/BFb0020949

    Chapter  Google Scholar 

  4. Blom, S., van de Pol, J., Weber, M.: LTSmin: distributed and symbolic reachability. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 354–359. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14295-6_31

    Chapter  Google Scholar 

  5. Brooker, M., Chen, T., Ping, F.: Millions of tiny databases. In: Bhagwan, R., Porter, G. (eds.) 17th USENIX Symposium on Networked Systems Design and Implementation, NSDI 2020, Santa Clara, CA, USA, 25–27 February 2020, pp. 463–478. USENIX Association (2020)

    Google Scholar 

  6. Crooks, N., Pu, Y., Alvisi, L., Clement, A.: Seeing is believing. In: Proceedings of the ACM Symposium on Principles of Distributed Computing, pp. 73–82. ACM, July 2017. https://doi.org/10.1145/3087801.3087802

  7. Fekete, A., Liarokapis, D., O’Neil, E.J., O’Neil, P.E., Shasha, D.E.: Making snapshot isolation serializable. ACM Trans. Database Syst. 30(2), 492–528 (2005). https://doi.org/10.1145/1071610.1071615

    Article  Google Scholar 

  8. Gomes, V.B., Kleppmann, M., Mulligan, D.P., Beresford, A.R.: Verifying strong eventual consistency in distributed systems. Proc. ACM Program. Lang. 1(OOPSLA), 1–28 (2017). https://doi.org/10.1145/3133933

    Article  Google Scholar 

  9. Gray, J., Lamport, L.: Consensus on transaction commit. ACM Trans. Database Syst. 31(1), 133–160 (2006). https://doi.org/10.1145/1132863.1132867

    Article  Google Scholar 

  10. Groote, J.F., Mousavi, M.R.: Modeling and Analysis of Communicating Systems. MIT Press, Cambridge (2014)

    Book  Google Scholar 

  11. Gustafson, J., Wang, G.: Hardening Kafka replication (2020). https://github.com/hachikuji/kafka-specification

  12. Holzmann, G.J.: The SPIN Model Checker - Primer and Reference Manual. Addison-Wesley, Boston (2004)

    Google Scholar 

  13. Jackson, D.: Software Abstractions - Logic, Language, and Analysis. MIT Press, Cambridge (2006)

    Google Scholar 

  14. Kingsbury, K., Alvaro, P.: Elle: inferring isolation anomalies from experimental observations. CoRR abs/2003.10554 (2020)

    Google Scholar 

  15. Kinsbury, K.: Jepsen: distributed systems safety research (2020). http://jepsen.io/

  16. Kinsbury, K.: Knossos (2020). https://github.com/jepsen-io/knossos

  17. Kleppmann, M.: Designing Data-Intensive Applications: The Big Ideas behindReliable, Scalable, and Maintainable Systems. O’Reilly, Sebastopol (2016)

    Google Scholar 

  18. Kleppmann, M.: Hermitage: testing transaction isolation levels (2020). https://github.com/ept/hermitage

  19. Lamport, L.: The PlusCal Algorithm Language - Microsoft Research. https://www.microsoft.com/en-us/research/publication/pluscal-algorithm-language/

  20. Lamport, L.: Specifying Systems, the TLA+ Language and Tools for Hardwareand Software Engineers. Addison-Wesley, Boston (2002)

    Google Scholar 

  21. Microsoft: High-level TLA+ specifications for the five consistency levels offered by Azure Cosmos DB (2020). https://github.com/Azure/azure-cosmos-tla

  22. Newcombe, C., Rath, T., Zhang, F., Munteanu, B., Brooker, M., Deardeuff, M.: How amazon web services uses formal methods. Commun. ACM 58(4), 66–73 (2015). https://doi.org/10.1145/2699417

    Article  Google Scholar 

  23. Preguiça, N.M., Baquero, C., Shapiro, M.: Conflict-free replicated data types CRDTs. In: Sakr, S., Zomaya, A.Y. (eds.) Encyclopedia of Big Data Technologies. Springer, Cham (2019). https://doi.org/10.1007/978-3-319-77525-8_185

    Chapter  Google Scholar 

  24. Soethout, T.: TimSoethout/tla-ci: TLA+ specifications used in “Automated Validation of State-Based Client- Centric Isolation with TLA+". Zenodo (2020). https://doi.org/10.5281/zenodo.3961617

  25. Soethout, T., van der Storm, T., Vinju, J.: Path-sensitive atomic commit. Programming 5(1) (2020). https://doi.org/10.22152/programming-journal.org/2021/5/3

  26. Soethout, T., van der Storm, T., Vinju, J.J.: Static local coordination avoidance for distributed objects. In: Proceedings of the 9th ACM SIGPLAN International Workshop on Programming Based on Actors, Agents, and Decentralized Control - AGERE 2019, pp. 21–30. ACM Press, Athens (2019). https://doi.org/10.1145/3358499.3361222

  27. Stoel, J., van der Storm, T., Vinju, J., Bosman, J.: Solving the bank with Rebel: on the design of the Rebel specification language and its application inside a bank. In: Proceedings of the 1st Industry Track on Software Language Engineering - ITSLE 2016, pp. 13–20. ACM Press (2016). https://doi.org/10.1145/2998407.2998413

  28. Tanenbaum, A.S., van Steen, M.: Distributed Systems - Principles and Paradigms, 2nd edn. Pearson Education, Upper Saddle River (2007)

    MATH  Google Scholar 

  29. Weikum, G.: Principles and realization strategies of multilevel transaction management. ACM Trans. Database Syst. 16(1), 132–180 (1991). https://doi.org/10.1145/103140.103145

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tim Soethout .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Soethout, T., van der Storm, T., Vinju, J.J. (2021). Automated Validation of State-Based Client-Centric Isolation with TLA\(^+\). In: Cleophas, L., Massink, M. (eds) Software Engineering and Formal Methods. SEFM 2020 Collocated Workshops. SEFM 2020. Lecture Notes in Computer Science(), vol 12524. Springer, Cham. https://doi.org/10.1007/978-3-030-67220-1_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-67220-1_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-67219-5

  • Online ISBN: 978-3-030-67220-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics