skip to main content
research-article
Open Access

Rethinking safe consistency in distributed object-oriented programming

Published:13 November 2020Publication History
Skip Abstract Section

Abstract

Large scale distributed systems require to embrace the trade off between consistency and availability, accepting lower levels of consistency to guarantee higher availability. Existing programming languages are, however, agnostic to this compromise, resulting in consistency guarantees that are the same for the whole application and are implicitly adopted from the middleware or hardcoded in configuration files. In this paper, we propose to integrate availability in the design of an object-oriented language, allowing developers to specify different consistency and isolation constraints in the same application at the granularity of single objects. We investigate how availability levels interact with object structure and define a type system that preserves correct program behavior. Our evaluation shows that our solution performs efficiently and improves the design of distributed applications.

Skip Supplemental Material Section

Supplemental Material

Auxiliary Presentation Video

This is the presentation for our paper "Rethinking Safe Consistency in Distributed Object-Oriented Programming" in the research track. In this paper, we propose to integrate availability in the design of an object-oriented language, allowing developers to specify different consistency and isolation constraints in the same application at the granularity of single objects. We investigate how availability levels interact with object structure and define a type system that preserves correct program behavior.

References

  1. A. Adya, B. Liskov, and P. O'Neil. 2000. Generalized isolation level definitions. In Proceedings of 16th International Conference on Data Engineering (Cat. No.00CB37073). 67-78. https://doi.org/10.1109/ICDE. 2000.839388 Google ScholarGoogle ScholarCross RefCross Ref
  2. Akka. 2009. Akka toolkit for Java and Scala. Retrieved 2019-04-06 from https://akka.ioGoogle ScholarGoogle Scholar
  3. Deepthi Devaki Akkoorath and Annette Bieniusa. 2016. Antidote: the highly-available geo-replicated database with strongest guarantees. SyncFree Technology White Paper ( 2016 ).Google ScholarGoogle Scholar
  4. Paulo Sérgio Almeida, Ali Shoker, and Carlos Baquero. 2018. Delta state replicated data types. J. Parallel and Distrib. Comput. 111 ( 2018 ), 162-173. https://doi.org/10.1016/j.jpdc. 2017. 08.003 Google ScholarGoogle ScholarCross RefCross Ref
  5. Peter Bailis, Aaron Davidson, Alan Fekete, Ali Ghodsi, Joseph M. Hellerstein, and Ion Stoica. 2013. Highly Available Transactions: Virtues and Limitations. Proceedings of the VLDB Endowment 7, 3 (Nov. 2013 ), 181-192. https://doi.org/10. 14778/2732232.2732237 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Valter Balegas, Sérgio Duarte, Carla Ferreira, Rodrigo Rodrigues, Nuno Preguiça, Mahsa Najafzadeh, and Marc Shapiro. 2015. Putting Consistency Back into Eventual Consistency. In Proceedings of the Tenth European Conference on Computer Systems (EuroSys '15). ACM, New York, NY, USA, Article 6, 16 pages. https://doi.org/10.1145/2741948.2741972 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Philip A. Bernstein, Sebastian Burckhardt, Sergey Bykov, Natacha Crooks, Jose M. Faleiro, Gabriel Kliot, Alok Kumbhare, Muntasir Raihan Rahman, Vivek Shah, Adriana Szekeres, and Jorgen Thelin. 2017. Geo-distribution of Actor-based Services. Proc. ACM Program. Lang. 1, OOPSLA, Article 107 (Oct. 2017 ), 26 pages. https://doi.org/10.1145/3133931 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Lucas Brutschy, Dimitar Dimitrov, Peter Müller, and Martin Vechev. 2017. Serializability for eventual consistency: criterion, analysis, and applications. ACM SIGPLAN Notices 52, 1 ( 2017 ), 458-472. https://doi.org/10.1145/3093333.3009895 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Sebastian Burckhardt, Manuel Fähndrich, Daan Leijen, and Benjamin P. Wood. 2012. Cloud Types for Eventual Consistency. In Proceedings of the 26th European Conference on Object-Oriented Programming (ECOOP'12). Springer-Verlag, Berlin, Heidelberg, 283-307. https://doi.org/10.1007/978-3-642-31057-7_14 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Sebastian Burckhardt, Alexey Gotsman, Hongseok Yang, and Marek Zawirski. 2014. Replicated Data Types: Specification, Verification, Optimality. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '14). ACM, New York, NY, USA, 271-284. https://doi.org/10.1145/2535838.2535848 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Sergey Bykov, Alan Geller, Gabriel Kliot, James R. Larus, Ravi Pandya, and Jorgen Thelin. 2011. Orleans: Cloud Computing for Everyone. In Proceedings of the 2nd ACM Symposium on Cloud Computing (SOCC '11). ACM, New York, NY, USA, Article 16, 14 pages. https://doi.org/10.1145/2038916.2038932 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Raphaël Collet et al. 2007. The limits of network transparency in a distributed programming language. Ph.D. Dissertation.Google ScholarGoogle Scholar
  13. James C. Corbett, Jefrey Dean, Michael Epstein, Andrew Fikes, Christopher Frost, J. J. Furman, Sanjay Ghemawat, Andrey Gubarev, Christopher Heiser, Peter Hochschild, Wilson Hsieh, Sebastian Kanthak, Eugene Kogan, Hongyi Li, Alexander Lloyd, Sergey Melnik, David Mwaura, David Nagle, Sean Quinlan, Rajesh Rao, Lindsay Rolig, Yasushi Saito, Michal Szymaniak, Christopher Taylor, Ruth Wang, and Dale Woodford. 2013. Spanner: Google's Globally Distributed Database. ACM Transactions on Computer Systems 31, 3, Article 8 ( Aug. 2013 ), 22 pages. https://doi.org/10.1145/2491245 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Kevin De Porre, Florian Myter, Christophe Scholliers, and Elisa Gonzalez Boix. 2020. CScript: A Distributed Programming Language for Building Mixed-Consistency Applications. J. Parallel and Distrib. Comput. 144 ( 2020 ), 109-123. https: //doi.org/10.1016/j.jpdc. 2020. 05.010 Google ScholarGoogle ScholarCross RefCross Ref
  15. Dorothy E. Denning. 1976. A Lattice Model of Secure Information Flow. Commun. ACM 19, 5 (May 1976 ), 236-243. https://doi.org/10.1145/360051.360056 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Julian Dolby, Christian Hammer, Daniel Marino, Frank Tip, Mandana Vaziri, and Jan Vitek. 2012. A Data-centric Approach to Synchronization. ACM Trans. Program. Lang. Syst. 34, 1 (May 2012 ), 4 : 1-4 : 48. https://doi.org/10.1145/2160910.2160913 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. K. P. Eswaran, J. N. Gray, R. A. Lorie, and I. L. Traiger. 1976. The Notions of Consistency and Predicate Locks in a Database System. Commun. ACM 19, 11 (Nov. 1976 ), 624-633. https://doi.org/10.1145/360363.360369 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Rachid Guerraoui, Matej Pavlovic, and Dragos-Adrian Seredinschi. 2016. Incremental Consistency Guarantees for Replicated Objects. In 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16). USENIX Association, Savannah, GA, 169-184.Google ScholarGoogle Scholar
  19. Boniface Hicks, Dave King, Patrick McDaniel, and Michael Hicks. 2006. Trusted declassification: High-level policy for a security-typed language. Proceedings of the 2006 workshop on Programming languages and analysis for security-PLAS '06 ( 2006 ), 65. https://doi.org/10.1145/1134744.1134757 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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-SoCC '16. ACM Press, New York, New York, USA, 279-293. https://doi.org/10.1145/2987550.2987559 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Farzin Houshmand and Mohsen Lesani. 2019. Hamsaz: Replication Coordination Analysis and Synthesis. Proc. ACM Program. Lang. 3, POPL, Article 74 ( Jan. 2019 ), 32 pages. https://doi.org/10.1145/3290387 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. 2001. Featherweight Java: A Minimal Core Calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23, 3 (May 2001 ), 396-450. https://doi.org/10.1145/503502.503505 Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Gowtham Kaki, Kartik Nagar, Mahsa Najafzadeh, and Suresh Jagannathan. 2017. Alone Together: Compositional Reasoning and Inference for Weak Isolation. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL 2017 ). Association for Computing Machinery, New York, NY, USA, 34. https://doi.org/10.1145/3158115 Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Leslie Lamport. 1978. Time, Clocks, and the Ordering of Events in a Distributed System. Commun. ACM 21, 7 ( July 1978 ), 558-565. https://doi.org/10.1145/359545.359563 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Leslie Lamport et al. 2001. Paxos made simple. ACM Sigact News 32, 4 ( 2001 ), 18-25.Google ScholarGoogle Scholar
  26. Niel Lebeck, Jonathan Goldstein, and Irene Zhang. 2019. Hercules: A Multi-View Cache for Real-Time Interactive Apps. Technical Report.Google ScholarGoogle Scholar
  27. Cheng Li, João Leitão, Allen Clement, Nuno Preguiça, Rodrigo Rodrigues, and Viktor Vafeiadis. 2014. Automating the Choice of Consistency Levels in Replicated Systems. In Proceedings of the 2014 USENIX Conference on USENIX Annual Technical Conference (USENIX ATC'14). USENIX Association, Berkeley, CA, USA, 281-292. http://dl.acm.org/citation. cfm?id= 2643634. 2643664Google ScholarGoogle Scholar
  28. Cheng Li, Daniel Porto, Allen Clement, Johannes Gehrke, Nuno Preguiça, and Rodrigo Rodrigues. 2012. Making Georeplicated Systems Fast As Possible, Consistent when Necessary. In Proceedings of the 10th USENIX Conference on Operating Systems Design and Implementation (OSDI'12). USENIX Association, Berkeley, CA, USA, 265-278. http://dl.acm.org/citation.cfm?id= 2387880. 2387906Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Cheng Li, Nuno Preguiça, and Rodrigo Rodrigues. 2018. Fine-grained consistency for geo-replicated systems. In 2018 USENIX Annual Technical Conference (USENIX ATC 18). USENIX Association, Boston, MA, 359-372. https://www.usenix.org/ conference/atc18/presentation/li-chengGoogle ScholarGoogle Scholar
  30. Pedro S. Lopes. 2018. Antidote SQL: SQL for Weakly Consistent Databases. http://hdl.handle. net/10362/68859Google ScholarGoogle Scholar
  31. Tom Magrino, Jed Liu, Nate Foster, Johannes Gehrke, and Andrew C. Myers. 2019. Eficient, Consistent Distributed Computation with Predictive Treaties. In Proceedings of the Fourteenth EuroSys Conference 2019 ( EuroSys '19). ACM, New York, NY, USA, Article 36, 16 pages. https://doi.org/10.1145/3302424.3303987 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Matthew Milano and Andrew C. Myers. 2018. MixT: A Language for Mixing Consistency in Geodistributed Transactions. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2018 ). ACM, New York, NY, USA, 226-241. https://doi.org/10.1145/3192366.3192375 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Florian Myter, Christophe Scholliers, and Wolfgang De Meuter. 2018. A CAPable Distributed Programming Model. In Proceedings of the 2018 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward! 2018 ). ACM, New York, NY, USA, 88-98. https://doi.org/10.1145/3276954.3276957 Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Sreeja S. Nair, Gustavo Petri, and Marc Shapiro. 2020. Proving the Safety of Highly-Available Distributed Objects. In Programming Languages and Systems, Peter Müller (Ed.). Springer International Publishing, Cham, 544-571.Google ScholarGoogle Scholar
  35. Matthew M. Papi, Mahmood Ali, Telmo Luis Correa, Jr., Jef H. Perkins, and Michael D. Ernst. 2008. Practical Pluggable Types for Java. In Proceedings of the 2008 International Symposium on Software Testing and Analysis (ISSTA '08). ACM, New York, NY, USA, 201-212. https://doi.org/10.1145/1390630.1390656 Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Vivek Shah and Marcos Antonio Vaz Salles. 2018. Reactors: A Case for Predictable, Virtualized Actor Database Systems. In Proceedings of the 2018 International Conference on Management of Data (SIGMOD '18). ACM, 259-274.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Marc Shapiro, Nuno Preguiça, Carlos Baquero, and Marek Zawirski. 2011. A comprehensive study of Convergent and Commutative Replicated Data Types. Research Report RR-7506. Inria-Centre Paris-Rocquencourt ; INRIA. 50 pages. https://hal.inria.fr/inria-00555588Google ScholarGoogle Scholar
  38. KC Sivaramakrishnan, Gowtham Kaki, and Suresh Jagannathan. 2015. Declarative programming over eventually consistent data stores. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation-PLDI 2015, Vol. 50. ACM Press, New York, New York, USA, 413-424. https://doi.org/10.1145/2737924.2737981 Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Michael Stonebraker, Samuel Madden, Daniel J. Abadi, Stavros Harizopoulos, Nabil Hachem, and Pat Helland. 2007. The End of an Architectural Era: (It's Time for a Complete Rewrite). In Proceedings of the International Conference on Very Large Data Bases (VLDB '07). VLDB Endowment, 1150-1160.Google ScholarGoogle Scholar
  40. Douglas B. Terry, Vijayan Prabhakaran, Ramakrishna Kotla, Mahesh Balakrishnan, Marcos K. Aguilera, and Hussam AbuLibdeh. 2013. Consistency-Based Service Level Agreements for Cloud Storage. In Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles (SOSP '13). Association for Computing Machinery, New York, NY, USA, 309-324. https://doi.org/10.1145/2517349.2522731 Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Alexander Thomson, Thaddeus Diamond, Shu-Chun Weng, Kun Ren, Philip Shao, and Daniel J. Abadi. 2012. Calvin: Fast Distributed Transactions for Partitioned Database Systems. In Proceedings of the 2012 ACM SIGMOD International Conference on Management of Data (SIGMOD '12). ACM, New York, NY, USA, 1-12. https://doi.org/10.1145/2213836. 2213838 Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Paolo Viotti and Marko Vukolić. 2015. Consistency in Non-Transactional Distributed Storage Systems. Comput. Surveys 49, 1 (jun 2015 ), 1-34. https://doi.org/10.1145/2926965 arXiv: 1512. 00168 Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Werner Vogels. 2009. Eventually Consistent. Commun. ACM 52, 1 ( 2009 ), 40-44.Google ScholarGoogle Scholar
  44. A.K. Wright and M. Felleisen. 1994. A Syntactic Approach to Type Soundness. Information and Computation 115, 1 ( 1994 ).Google ScholarGoogle Scholar
  45. Haifeng Yu and Amin Vahdat. 2001. The Costs and Limits of Availability for Replicated Services. In Proceedings of the Eighteenth ACM Symposium on Operating Systems Principles (SOSP '01). ACM, New York, NY, USA, 29-42. https: //doi.org/10.1145/502034.502038 Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Nosheen Zaza and Nathaniel Nystrom. 2016. Data-centric Consistency Policies: A Programming Model for Distributed Applications with Tunable Consistency. First Workshop on Programming Models and Languages for Distributed Computing on-PMLDC '16 ( 2016 ), 2-5. https://doi.org/10.1145/2957319.2957377 Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Xin Zhao and Philipp Haller. 2018. Observable Atomic Consistency for CvRDTs. In Proceedings of the 8th ACM SIGPLAN International Workshop on Programming Based on Actors, Agents, and Decentralized Control (AGERE 2018 ). ACM, New York, NY, USA, 23-32. https://doi.org/10.1145/3281366.3281372 Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Xin Zhao and Philipp Haller. 2021. Consistency types for replicated data in a higher-order distributed programming language. In The Art, Science, and Engineering of Programming, Vol. 5.Google ScholarGoogle Scholar

Index Terms

  1. Rethinking safe consistency in distributed object-oriented programming

      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 Proceedings of the ACM on Programming Languages
        Proceedings of the ACM on Programming Languages  Volume 4, Issue OOPSLA
        November 2020
        3108 pages
        EISSN:2475-1421
        DOI:10.1145/3436718
        Issue’s Table of Contents

        Copyright © 2020 Owner/Author

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 13 November 2020
        Published in pacmpl Volume 4, Issue OOPSLA

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-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!