skip to main content
research-article
Open access

MixT: a language for mixing consistency in geodistributed transactions

Published: 11 June 2018 Publication History

Abstract

Programming concurrent, distributed systems is hard—especially when these systems mutate shared, persistent state replicated at geographic scale. To enable high availability and scalability, a new class of weakly consistent data stores has become popular. However, some data needs strong consistency. To manipulate both weakly and strongly consistent data in a single transaction, we introduce a new abstraction: mixed-consistency transactions, embodied in a new embedded language, MixT. Programmers explicitly associate consistency models with remote storage sites; each atomic, isolated transaction can access a mixture of data with different consistency models. Compile-time information-flow checking, applied to consistency models, ensures that these models are mixed safely and enables the compiler to automatically partition transactions. New run-time mechanisms ensure that consistency models can also be mixed safely, even when the data used by a transaction resides on separate, mutually unaware stores. Performance measurements show that despite their stronger guarantees, mixed-consistency transactions retain much of the speed of weak consistency, significantly outperforming traditional serializable transactions.

Supplementary Material

WEBM File (p226-milano.webm)

References

[1]
Masoud Saeida Ardekani, Pierre Sutra, and Marc Shapiro. 2013. Non-Monotonic Snapshot Isolation: Scalable and Strong Consistency for Geo-Replicated Transactional Systems. In Reliable Distributed Systems (SRDS), 2013 IEEE 32nd International Symposium on. IEEE, 163-172.
[2]
Peter Bailis, Ali Ghodsi, Joseph M. Hellerstein, and Ion Stoica. 2013. Bolt-On Causal Consistency. In ACM SIGMOD International Conference on Management of Data (SIGMOD). 761-772.
[3]
H. Berenson, P. Bernstein, J. Gray, J. Melton, E. O'Neil, and P. O'Neil. 1995. A Critique of ANSI SQL Isolation Levels. In ACM SIGMOD International Conference on Management of Data (SIGMOD). 1-10.
[4]
K. J. Biba. 1977. Integrity Considerations for Secure Computer Systems. Technical Report ESD-TR-76-372. USAF Electronic Systems Division, Bedford, MA. (Also available through National Technical Information Service, Springfield Va., NTIS AD-A039324.).
[5]
Eric Brewer. 2010. A Certain Freedom: Thoughts on the CAP Theorem. In Proceedings of the 29th ACMSIGACT-SIGOPS symposium on Principles of distributed computing. ACM, 335-335.
[6]
Jane Brown. 2017. Personal communication. (Nov. 2017). Google, Inc.
[7]
Lucas Brutschy, Dimitar Dimitrov, Peter Müller, and Martin T. Vechev. 2017. Serializability for Eventual Consistency: Criterion, Analysis, and Applications. In 44th ACM Symp. on Principles of Programming Languages (POPL). 458-472.
[8]
Josiah L. Carlson. 2013. Redis in Action. Manning Publications Co., Greenwich, CT, USA.
[9]
Shankha Chatterjee and Wojciech Golab. 2017. Self-Tuning Eventually-Consistent Data Stores. In International Symposium on Stabilization, Safety, and Security of Distributed Systems. Springer, 78-92.
[10]
Alvin Cheung, Samuel Madden, Owen Arden, and Andrew C. Myers. 2012. Automatic Partitioning of Database Applications. PVLDB 5, 11 (Aug. 2012), 1471-1482.
[11]
Brian F Cooper, Raghu Ramakrishnan, Utkarsh Srivastava, Adam Silberstein, Philip Bohannon, Hans-Arno Jacobsen, Nick Puz, Daniel Weaver, and Ramana Yerneni. 2008. PNUTS: Yahoo!'s hosted data serving platform. Proceedings of the VLDB Endowment 1, 2 (2008), 1277-1288.
[12]
James C Corbett, Jeffrey Dean, Michael Epstein, Andrew Fikes, Christopher Frost, Jeffrey John Furman, Sanjay Ghemawat, Andrey Gubarev, Christopher Heiser, Peter Hochschild, et al. 2013. Spanner: Google's globally distributed database. ACM Transactions on Computer Systems (TOCS) 31, 3 (2013), 8.
[13]
Natacha Crooks, Youer Pu, Nancy Estrada, Trinabh Gupta, Lorenzo Alvisi, and Allen Clement. 2016. TARDiS: A Branch-and-Merge Approach To Weak Consistency. In ACM SIGMOD International Conference on Management of Data (SIGMOD). 1615-1628.
[14]
Giuseppe DeCandia, Deniz Hastorun, Madan Jampani, Gunavardhan Kakulapati, Avinash Lakshman, Alex Pilchin, Swaminathan Sivasubramanian, Peter Vosshall, and Werner Vogels. 2007. Dynamo: Amazon's Highly Available Key-Value Store. In 21st ACM Symp. on Operating System Principles (SOSP). 205-220.
[15]
Brijesh Dongol, Radha Jagadeesan, and James Riely. 2018. Transactions in Relaxed Memory Architectures. In 45th ACM Symp. on Principles of Programming Languages (POPL). 18:1-18:29.
[16]
Jiaqing Du, Calin Iorgulescu, Amitabha Roy, and Willy Zwaenepoel. 2014. Gentlerain: Cheap and Scalable Causal Consistency with Physical Clocks. In Proceedings of the ACM Symposium on Cloud Computing. ACM, 1-13.
[17]
Ayush Dubey, Greg D. Hill, Robert Escriva, and Emin Gün Sirer. 2016. Weaver: A High-Performance, Transactional Graph Database Based on Refinable Timestamps. Proceedings of the VLDB Endowment 9, 11 (2016), 852-863.
[18]
Jennie Duggan, Aaron J Elmore, Michael Stonebraker, Magda Balazinska, Bill Howe, Jeremy Kepner, Sam Madden, David Maier, Tim Mattson, and Stan Zdonik. 2015. The BigDAWG Polystore System. ACM SIGMOD Record 44, 2 (2015), 11-16.
[19]
Lei Gao, Mike Dahlin, Amol Nayate, Jiandan Zheng, and Arun Iyengar. 2003. Application-Specific Data Replication for Edge Services. In Proceedings of the 12th international conference on World Wide Web. ACM, 449-460.
[20]
Mimi Gentz, Aravind Krishna R, Luis Bosquez, Mark McGee, Tyson Nevil, Kris Crider, Yaron Y. Goland, Andy Pasic, and Ji Huang Carol Zeumault. 2017. Welcome to Azure Cosmos DB. https://docs.microsoft.com/en-us/azure/cosmos-db/introduction. (2017).
[21]
Joseph A. Goguen and Jose Meseguer. 1982. Security Policies and Security Models. In IEEE Symp. on Security and Privacy. 11-20.
[22]
Alexey Gotsman, Hongseok Yang, Carla Ferreira, Mahsa Najafzadeh, and Marc Shapiro. 2016. 'Cause I'm Strong Enough: Reasoning About Consistency Choices in Distributed Systems. In 43rd ACM Symp. on Principles of Programming Languages (POPL). 371-384.
[23]
Rachid Guerraoui, Matej Pavlovic, and Dragos-Adrian Seredinschi. 2016. Incremental Consistency Guarantees for Replicated Objects. In Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI'16). 169-184.
[24]
M. Herlihy. 1991. Wait-Free Synchronization. ACM Transactions on Programming Languages 1, 13 (Jan 1991), 124-149.
[25]
M. Herlihy and J. Wing. 1988. Linearizability: A Correctness Condition for Concurrent Objects. Technical Report CMU-CS-88-120. Carnegie Mellon University, Pittsburgh, Pa.
[26]
Brandon Holt, James Bornholt, Irene Zhang, Dan Ports, Mark Oskin, and Luis Ceze. 2016. Disciplined Inconsistency with Consistency Types. In Proceedings of the Seventh ACM Symposium on Cloud Computing. ACM, 279-293.
[27]
Brandon Holt, Irene Zhang, Dan Ports, Mark Oskin, and Luis Ceze. 2015. Claret: Using Data Types for Highly Concurrent Distributed Transactions. In 1st Workshop on Principles and Practice of Consistency for Distributed Data (PaPoC). Article 4, 4:1-4:4 pages.
[28]
Ta-Yuan Hsu and Ajay D. Kshemkalyani. 2018. Value the Recent Past: Approximate Causal Consistency for Partially Replicated Systems. IEEE Transactions on Parallel and Distributed Systems 29, 1 (2018), 212- 225.
[29]
Gowtham Kaki, Kartik Nagar, Mahsa Nazafzadeh, and Suresh Jagannathan. 2017. Alone Together: Compositional Reasoning and Inference for Weak Isolation. arXiv preprint arXiv:1710.09844 (2017).
[30]
Robert Kallman, Hideaki Kimura, Jonathan Natkins, Andrew Pavlo, Alexander Rasin, Stanley Zdonik, Evan P. C. Jones, Samuel Madden, Michael Stonebraker, Yang Zhang, John Hugg, and Daniel J. Abadi. 2008. H-Store: A High-Performance, Distributed Main Memory Transaction Processing System. PVLDB 1, 2 (Aug. 2008), 1496-1499.
[31]
Rusty Klophaus. 2010. Riak Core: Building Distributed Applications Without Shared State. In ACM SIGPLAN Commercial Users of Functional Programming (CUFP '10). ACM, New York, NY, USA, Article 14, 1 pages.
[32]
Tim Kraska, Martin Hentschel, Gustavo Alonso, and Donald Kossmann. 2009. Consistency Rationing in the Cloud: Pay Only When it Matters. Proceedings of the VLDB Endowment 2, 1 (2009), 253-264.
[33]
Tim Kraska, Gene Pang, Michael J Franklin, Samuel Madden, and Alan Fekete. 2013. MDCC: Multi-Data Center Consistency. In Proc. 8th ACM European Conference on Computer Systems. ACM, 113-126.
[34]
H. T. Kung and J. T. Robinson. 1981. On Optimistic Methods for Concurrency Control. ACM Trans. on Database Systems 6, 2 (June 1981), 213-226.
[35]
Avinash Lakshman and Prashant Malik. 2010. Cassandra: a decentralized structured storage system. ACM SIGOPS Operating Systems Review 44, 2 (2010), 35-40.
[36]
Cheng Li, Joao Leitao, Allen Clement, Nuno Preguiça, Rodrigo Rodrigues, and Viktor Vafeiadis. 2014. Automating the Choice of Consistency Levels in Replicated Systems. In USENIX Annual Technical Conference.
[37]
Cheng Li, Daniel Porto, Allen Clement, Johannes Gehrke, Nuno Preguiça, and Rodrigo Rodrigues. 2012. Making Geo-Replicated Systems Fast as Possible, Consistent when Necessary. In 10th USENIX Symp. on Operating Systems Design and Implementation (OSDI).
[38]
Jed Liu and Andrew C. Myers. 2014. Defining and Enforcing Referential Security. In 3rd Conf. on Principles of Security and Trust (POST). 199- 219.
[39]
Wyatt Lloyd, Michael J. Freedman, Michael Kaminsky, and David G. Andersen. 2011. Don't settle for eventual: scalable causal consistency for wide-area storage with COPS. In 23rd ACM Symp. on Operating System Principles (SOSP). 401-416.
[40]
Wyatt Lloyd, Michael J Freedman, Michael Kaminsky, and David G Andersen. 2013. Stronger Semantics for Low-Latency Geo-Replicated Storage. In 10th USENIX Symp. on Networked Systems Design and Implementation (NSDI). 313-328.
[41]
Daryl McCullough. 1987. Specifications for Multi-Level Security and a Hook-up Property. In IEEE Symp. on Security and Privacy. IEEE Press, 161-161.
[42]
Syed Akbar Mehdi, Cody Littley, Natacha Crooks, Lorenzo Alvisi, Nathan Bronson, and Wyatt Lloyd. 2017. I Can't Believe It's Not Causal! Scalable Causal Consistency with No Slowdown Cascades. In NSDI. 453-468.
[43]
Scott Meyers. 2014. Effective Modern C++: 42 Specific Ways to Improve Your Use of C++ 11 and C++ 14. O'Reilly Media, Inc.
[44]
Mae Milano and Andrew Myers. 2017. MixT: A Language for Mixing Consistency in Geodistributed Transactions: Technical Report. (2017).
[45]
C. H. Papadimitriou. 1979. The Serializability of Concurrent Database Updates. J. ACM 26, 4 (Oct. 1979), 631-653.
[46]
Eelco Plugge, Peter Membrey, and Tim Hawkins. 2010. The Definitive Guide to MongoDB: The noSQL Database for Cloud and Desktop Computing. Apress.
[47]
Andrei Sabelfeld and Andrew C. Myers. 2003. Language-Based Information-Flow Security. IEEE Journal on Selected Areas in Communications 21, 1 (Jan. 2003), 5-19.
[48]
Amr Sabry and Matthias Felleisen. 1993. Reasoning About Programs in Continuation-Passing Style. Lisp and Symbolic Computation 6, 3-4 (Nov. 1993), 289-360.
[49]
Dennis Shasha, Francois Llirbat, Eric Simon, and Patrick Valduriez. 1995. Transaction Chopping: Algorithms and Performance Studies. ACM Trans. on Database Systems 20, 3 (Sept. 1995), 325-363.
[50]
Kazuyuki Shudo and Takashi Yaguchi. 2017. Causal Consistency for Data Stores and Applications as They are. Journal of Information Processing 25 (2017), 775-782.
[51]
K. C. Sivaramakrishnan, Gowtham Kaki, and Suresh Jagannathan. 2015. Declarative Programming over Eventually Consistent Data Stores. In 36th ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI). 413-424.
[52]
Geoffrey Smith and Dennis Volpano. 1998. Secure Information Flow in a Multi-Threaded Imperative Language. In 25th ACM Symp. on Principles of Programming Languages (POPL). 355-364.
[53]
Michael Stonebraker and Ariel Weisberg. 2013. The VoltDB Main Memory DBMS. IEEE Data Eng. Bull. 36, 2 (2013), 21-27.
[54]
Douglas B. Terry, Vijayan Prabhakaran, Ramakrishna Kotla, Mahesh Balakrishnan, Marcos K. Aguilera, and Hussam Abu-Libdeh. 2013. Consistency-based service level agreements for cloud storage. In 24th ACM Symp. on Operating System Principles (SOSP). 309-324.
[55]
Douglas B. Terry, Marvin M. Theimer, Karin Petersen, Alan J. Demers, and Mike J. Spreitzer. 1995. Managing Update Conflicts in Bayou, a Weakly Connected Replicated Storage System. In 15th ACM Symp. on Operating System Principles (SOSP). 172-183.
[56]
Chao Xie, Chunzhi Su, Manos Kapritsos, Yang Wang, Navid Yaghmazadeh, Lorenzo Alvisi, and Prince Mahajan. 2014. Salt: Combining ACID and BASE in a distributed database. In 11th USENIX Symp. on Operating Systems Design and Implementation (OSDI), Vol. 14. 495-509.
[57]
Chao Xie, Chunzhi Su, Cody Littley, Lorenzo Alvisi, Manos Kapritsos, and Yang Wang. 2015. High-Performance ACID via Modular Concurrency Control. In Proceedings of the 25th Symposium on Operating Systems Principles (SOSP '15). ACM, New York, NY, USA, 279-294.
[58]
Yingyi Yang, Yi You, and Bochuan Gu. 2017. A Hierarchical Framework with Consistency Trade-off Strategies for Big Data Management. In Computational Science and Engineering (CSE) and Embedded and Ubiquitous Computing (EUC), 2017 IEEE International Conference on, Vol. 1. IEEE, 183-190.
[59]
Haifeng Yu and Amin Vahdat. 2000. Design and Evaluation of a Continuous Consistency Model for Replicated Services. In 4th USENIX Symp. on Operating Systems Design and Implementation (OSDI). Article 21, 14 pages.
[60]
Steve Zdancewic and Andrew C. Myers. 2003. Observational Determinism for Concurrent Program Security. In 16th IEEE Computer Security Foundations Workshop (CSFW). 29-43.
[61]
Steve Zdancewic, Lantian Zheng, Nathaniel Nystrom, and Andrew C. Myers. 2002. Secure Program Partitioning. ACM Trans. on Computer Systems 20, 3 (Aug. 2002), 283-328.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 53, Issue 4
PLDI '18
April 2018
834 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/3296979
Issue’s Table of Contents
  • cover image ACM Conferences
    PLDI 2018: Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation
    June 2018
    825 pages
    ISBN:9781450356985
    DOI:10.1145/3192366
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 June 2018
Published in SIGPLAN Volume 53, Issue 4

Check for updates

Author Tags

  1. Consistency
  2. Information Flow
  3. Transactions

Qualifiers

  • Research-article

Funding Sources

  • Department of Defence, Air Force office of Scientific Research, National Defense Science and Engineering Graduate (NDSEG) Fellowship
  • National Science Foundation

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)511
  • Downloads (Last 6 weeks)41
Reflects downloads up to 14 Sep 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media