Skip to main content

Foundations of Consistency Types for a Higher-Order Distributed Language

  • Conference paper
  • First Online:
Languages and Compilers for Parallel Computing (LCPC 2019)

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

  • 314 Accesses

Abstract

Distributed systems address the increasing demand for fast access to resources and fault tolerance for data. However, due to scalability requirements, software developers need to trade consistency for performance. For certain data, consistency guarantees may be weakened if application correctness is unaffected. In contrast, data flow from data with weak consistency to data with strong consistency requirements is problematic, since application correctness may be broken.

In this paper, we propose LCD, a higher-order static consistency-typed language with replicated data types. The type system of LCD statically enforces noninterference between data types with weak consistency and data types with strong consistency. This means that updates of weakly-consistent data can never affect strongly-consistent data. Finally, our main theorem guarantees sequential consistency for so-called con operations in our language.

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

Institutional subscriptions

References

  1. Burckhardt, S.: Principles of eventual consistency. Found. Trends Program. Lang. 1(1–2), 1–150 (2014)

    Google Scholar 

  2. Burckhardt, S., Fähndrich, M., Leijen, D., Wood, B.P.: Cloud types for eventual consistency. In: Noble, J. (ed.) ECOOP 2012. LNCS, vol. 7313, pp. 283–307. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31057-7_14

    Chapter  Google Scholar 

  3. Burckhardt, S., Gotsman, A., Yang, H.: Understanding eventual consistency. Technical report MSR-TR-2013-39, Microsoft Research (2013)

    Google Scholar 

  4. Burckhardt, S., Leijen, D., Protzenko, J., Fähndrich, M.: Global sequence protocol: a robust abstraction for replicated shared state. In: ECOOP, pp. 568–590 (2015)

    Google Scholar 

  5. De Porre, K., Myter, F., Scholliers, C., Boix, E.G.: CScript: a distributed programming language for building mixed-consistency applications. J. Parallel Distrib. Comput. 144, 109–123 (2020)

    Article  Google Scholar 

  6. Fennell, L., Thiemann, P.: LJGS: gradual security types for object-oriented languages. In: ECOOP, pp. 9:1–9:26 (2016)

    Google Scholar 

  7. Gilbert, S., Lynch, N.A.: Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. SIGACT News 33(2), 51–59 (2002)

    Article  Google Scholar 

  8. Heintze, N., Riecke, J.G.: The SLam calculus: Programming with secrecy and integrity. In: POPL,pp. 365–377 (1998)

    Google Scholar 

  9. Holt, B., Bornholt, J., Zhang, I., Ports, D.R.K., Oskin, M., Ceze, L.: Disciplined inconsistency with consistency types. In: SoCC, pp. 279–293 (2016)

    Google Scholar 

  10. Ladin, R., Liskov, B., Ghemawat, S.: Providing high availability using lazy replication. ACM Trans. Comput. Syst. 10(4), 360–391 (1992)

    Article  Google Scholar 

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

    Article  Google Scholar 

  12. Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. C 28(9), 690 (1979)

    Article  Google Scholar 

  13. Lamport, L.: The part-time parliament. ACM Trans. Comput. Syst 16(2), 133–169 (1998)

    Article  Google Scholar 

  14. Li, C., Porto, D., Clement, A., Gehrke, J., Preguiça, N.M., Rodrigues, R.: Making geo-replicated systems fast as possible, consistent when necessary. In: OSDI. pp. 265–278 (2012)

    Google Scholar 

  15. Li, J., Krohn, M.N., Mazieres, D., Shasha, D.: Secure untrusted data repository (SUNDR). In: OSDI, pp. 121–136, December 2004

    Google Scholar 

  16. Lu, H., et al.: Existential consistency: measuring and understanding consistency at Facebook. In: SOSP, pp. 295–310 (2015)

    Google Scholar 

  17. Mantel, H., Perner, M., Sauer, J.: Noninterference under weak memory models. In: CSF, pp. 80–94 (2014)

    Google Scholar 

  18. Margara, A., Salvaneschi, G.: Consistency types for safe and efficient distributed programming. In: FTfJP, pp. 8:1–8:2 (2017)

    Google Scholar 

  19. Mazieres, S.: Building secure file systems out of byzantine storage. In: PODC, pp. 108–117 (2002)

    Google Scholar 

  20. Milano, M., Myers, A.C.: 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, Philadelphia, PA, USA, 18–22 June 2018, pp. 226–241. ACM (2018)

    Google Scholar 

  21. Ongaro, D., Ousterhout, J.K.: In search of an understandable consensus algorithm. In: USENIX ATC, pp. 305–319 (2014)

    Google Scholar 

  22. Sampson, A., Dietl, W., Fortuna, E., Gnanapragasam, D., Ceze, L., Grossman, D.: EnerJ: approximate data types for safe and general low-power computation. In: PLDI, pp. 164–174 (2011)

    Google Scholar 

  23. Shapiro, M., Preguiça, N., Baquero, C., Zawirski, M.: Conflict-free replicated data types. In: Défago, X., Petit, F., Villain, V. (eds.) SSS 2011. LNCS, vol. 6976, pp. 386–400. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24550-3_29

    Chapter  MATH  Google Scholar 

  24. Toro, M., Garcia, R., Tanter, É.: Type-driven gradual security with references. ACM Trans. Program. Lang. Syst 40(4), 161–1655 (2018)

    Article  Google Scholar 

  25. Tse, S., Zdancewic, S.: A design for a security-typed language with certificate-based declassification. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 279–294. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-31987-0_20

    Chapter  Google Scholar 

  26. Vaughan, J.A., Millstein, T.D.: Secure information flow for concurrent programs under total store order. In: CSF, pp. 19–29 (2012)

    Google Scholar 

  27. Zhao, X., Haller, P.: On consistency types for lattice-based distributed programming languages. CoRR abs/1907.00822 (2019). http://arxiv.org/abs/1907.00822

Download references

Acknowledgments

This work is supported by the China Scholarship Council 201600160040, and by the Tianhe Supercomputer Project 2018YFB0204301.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xin Zhao .

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

Zhao, X., Haller, P. (2021). Foundations of Consistency Types for a Higher-Order Distributed Language. In: Pande, S., Sarkar, V. (eds) Languages and Compilers for Parallel Computing. LCPC 2019. Lecture Notes in Computer Science(), vol 11998. Springer, Cham. https://doi.org/10.1007/978-3-030-72789-5_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-72789-5_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-72788-8

  • Online ISBN: 978-3-030-72789-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics