skip to main content
article

'Cause I'm strong enough: Reasoning about consistency choices in distributed systems

Published:11 January 2016Publication History
Skip Abstract Section

Abstract

Large-scale distributed systems often rely on replicated databases that allow a programmer to request different data consistency guarantees for different operations, and thereby control their performance. Using such databases is far from trivial: requesting stronger consistency in too many places may hurt performance, and requesting it in too few places may violate correctness. To help programmers in this task, we propose the first proof rule for establishing that a particular choice of consistency guarantees for various operations on a replicated database is enough to ensure the preservation of a given data integrity invariant. Our rule is modular: it allows reasoning about the behaviour of every operation separately under some assumption on the behaviour of other operations. This leads to simple reasoning, which we have automated in an SMT-based tool. We present a nontrivial proof of soundness of our rule and illustrate its use on several examples.

References

  1. https://github.com/Z3Prover/z3.Google ScholarGoogle Scholar
  2. D. Abadi. Consistency tradeoffs in modern distributed database system design: CAP is only part of the story. IEEE Computer, 45(2), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. A. Abdulla, M. F. Atig, and N. T. Phong. The best of both worlds: Trading efficiency and optimality in fence insertion for TSO. In ESOP, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Alglave, D. Kroening, V. Nimal, and D. Poetzl. Don’t sit on the fence - A static analysis approach to automatic fence insertion. In CAV, 2014.Google ScholarGoogle Scholar
  5. J. Alglave, D. Kroening, V. Nimal, and M. Tautschnig. Software verification for weak memory via program transformation. In ESOP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Amazon. Supported operations in DynamoDB. http://docs.aws.amazon.com/amazondynamodb/latest/ developerguide/APISummary.html, 2015.Google ScholarGoogle Scholar
  7. P. Bailis, A. Fekete, M. J. Franklin, A. Ghodsi, J. M. Hellerstein, and I. Stoica. Coordination avoidance in database systems. PVLDB, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Bailis, A. Fekete, A. Ghodsi, J. M. Hellerstein, and I. Stoica. Scalable atomic visibility with RAMP transactions. In SIGMOD, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. V. Balegas, N. Preguic¸a, R. Rodrigues, S. Duarte, C. Ferreira, M. Najafzadeh, and M. Shapiro. Putting the consistency back into eventual consistency. In EuroSys, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Basho Inc. Using strong consistency in Riak. http://docs.basho.com/riak/latest/dev/advanced/strong-consistency/, 2015.Google ScholarGoogle Scholar
  11. M. Batty, S. Owens, S. Sarkar, P. Sewell, and T. Weber. Mathematizing C++ concurrency. In POPL, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. H. Berenson, P. Bernstein, J. Gray, J. Melton, E. O’Neil, and P. O’Neil. A critique of ANSI SQL isolation levels. In SIGMOD, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Bouajjani, E. Derevenetc, and R. Meyer. Checking and enforcing robustness against TSO. In ESOP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Bravo, N. Diegues, J. Zeng, P. Romano, and L. E. T. Rodrigues. On the use of clocks to enforce consistency in the cloud. IEEE Data Eng. Bull., 38(1), 2015.Google ScholarGoogle Scholar
  15. S. Burckhardt, A. Gotsman, H. Yang, and M. Zawirski. Replicated data types: specification, verification, optimality. In POPL, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. Burckhardt, D. Leijen, M. Fähndrich, and M. Sagiv. Eventually consistent transactions. In ESOP, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. A. Cerone, G. Bernardi, and A. Gotsman. A framework for transactional consistency models with atomic visibility. In CONCUR, 2015.Google ScholarGoogle Scholar
  18. A. M. Dan, Y. Meshman, M. T. Vechev, and E. Yahav. Predicate abstraction for relaxed memory models. In SAS, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  19. A. M. Dan, Y. Meshman, M. T. Vechev, and E. Yahav. Effective abstractions for verification under relaxed memory models. In VMCAI, 2015.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. Dinsdale-Young, M. Dodds, P. Gardner, M. J. Parkinson, and V. Vafeiadis. Concurrent abstract predicates. In ECOOP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Dodds, X. Feng, M. Parkinson, and V. Vafeiadis. Deny-guarantee reasoning. In ESOP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A. Fekete. Allocating isolation levels to transactions. In PODS, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Fu, Y. Li, X. Feng, Z. Shao, and Y. Zhang. Reasoning about optimistic concurrency using a program logic for history. In CONCUR, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. Gilbert and N. Lynch. Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. SIGACT News, 33(2), 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Gotsman, N. Rinetzky, and H. Yang. Verifying concurrent memory reclamation algorithms with grace. In ESOP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. C. B. Jones. Specification and design of (parallel) programs. In IFIP Congress. North-Holland, 1983.Google ScholarGoogle Scholar
  27. D. Kim and M. C. Rinard. Verification of semantic commutativity conditions and inverse operations on linked data structures. In PLDI, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput., 28(9), 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. C. Li, J. Leit˜ao, A. Clement, N. Preguic¸a, and R. Rodrigues. Minimizing coordination in replicated systems. In Workshop on Principles and Practice of Consistency for Distributed Data (PaPoC), 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. C. Li, J. Leit˜ao, A. Clement, N. M. Preguic¸a, R. Rodrigues, and V. Vafeiadis. Automating the choice of consistency levels in replicated systems. In USENIX ATC, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. C. Li, D. Porto, A. Clement, R. Rodrigues, N. Preguic¸a, and J. Gehrke. Making geo-replicated systems fast if possible, consistent when necessary. In OSDI, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. W. Lloyd, M. J. Freedman, M. Kaminsky, and D. G. Andersen. Don’t settle for eventual: scalable causal consistency for wide-area storage with COPS. In SOSP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. S. Lu, A. J. Bernstein, and P. M. Lewis. Correct execution of transactions at different isolation levels. IEEE Trans. Knowl. Data Eng., 16(9), 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Microsoft. Consistency levels in DocumentDB. http://azure.microsoft.com/en-us/documentation/articles/ documentdb-consistency-levels/, 2015.Google ScholarGoogle Scholar
  35. P. W. O’Hearn. Resources, concurrency and local reasoning. Theor. Comput. Sci., 375(1-3), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. F. Pedone and A. Schiper. Generic broadcast. In DISC, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Saeida Ardekani, P. Sutra, and M. Shapiro. Non-monotonic snapshot isolation: Scalable and strong consistency for geo-replicated transactional systems. In SRDS, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. M. Shapiro, N. Preguic¸a, C. Baquero, and M. Zawirski. A comprehensive study of Convergent and Commutative Replicated Data Types. Technical Report 7506, INRIA, 2011.Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. M. Shapiro, N. M. Preguic¸a, C. Baquero, and M. Zawirski. Conflictfree replicated data types. In SSS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. K. Sivaramakrishnan, G. Kaki, and S. Jagannathan. Declarative programming over eventually consistent data stores. In PLDI, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Y. Sovran, R. Power, M. K. Aguilera, and J. Li. Transactional storage for geo-replicated systems. In SOSP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. D. Terry. Replicated data consistency explained through baseball. Commun. ACM, 56(12), 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. D. B. Terry, V. Prabhakaran, R. Kotla, M. Balakrishnan, M. K. Aguilera, and H. Abu-Libdeh. Consistency-based service level agreements for cloud storage. In SOSP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. A. Turon, V. Vafeiadis, and D. Dreyer. GPS: Navigating weak memory with ghosts, protocols, and separation. In OOPSLA, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. V. Vafeiadis and C. Narayan. Relaxed separation logic: A program logic for C11 concurrency. In OOPSLA, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. W. Vogels. Eventually consistent. CACM, 52(1), 2009. Introduction Consistency Model, Informally Causal Consistency and Its Implementation Strengthening Consistency Formal Semantics State-based Proof Rule Event-based Proof Rule and Soundness Examples and Automation Auction Service Courseware Parallel Snapshot Isolation Automation Related Work Conclusion and Future Work Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. 'Cause I'm strong enough: Reasoning about consistency choices in distributed systems

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              • Published in

                cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 51, Issue 1
                POPL '16
                January 2016
                815 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/2914770
                • Editor:
                • Andy Gill
                Issue’s Table of Contents
                • cover image ACM Conferences
                  POPL '16: Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
                  January 2016
                  815 pages
                  ISBN:9781450335492
                  DOI:10.1145/2837614

                Copyright © 2016 ACM

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 11 January 2016

                Check for updates

                Qualifiers

                • article

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!