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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Burckhardt, S.: Principles of eventual consistency. Found. Trends Program. Lang. 1(1–2), 1–150 (2014)
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
Burckhardt, S., Gotsman, A., Yang, H.: Understanding eventual consistency. Technical report MSR-TR-2013-39, Microsoft Research (2013)
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)
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)
Fennell, L., Thiemann, P.: LJGS: gradual security types for object-oriented languages. In: ECOOP, pp. 9:1–9:26 (2016)
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)
Heintze, N., Riecke, J.G.: The SLam calculus: Programming with secrecy and integrity. In: POPL,pp. 365–377 (1998)
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)
Ladin, R., Liskov, B., Ghemawat, S.: Providing high availability using lazy replication. ACM Trans. Comput. Syst. 10(4), 360–391 (1992)
Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Commun. ACM 21(7), 558–565 (1978)
Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. C 28(9), 690 (1979)
Lamport, L.: The part-time parliament. ACM Trans. Comput. Syst 16(2), 133–169 (1998)
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)
Li, J., Krohn, M.N., Mazieres, D., Shasha, D.: Secure untrusted data repository (SUNDR). In: OSDI, pp. 121–136, December 2004
Lu, H., et al.: Existential consistency: measuring and understanding consistency at Facebook. In: SOSP, pp. 295–310 (2015)
Mantel, H., Perner, M., Sauer, J.: Noninterference under weak memory models. In: CSF, pp. 80–94 (2014)
Margara, A., Salvaneschi, G.: Consistency types for safe and efficient distributed programming. In: FTfJP, pp. 8:1–8:2 (2017)
Mazieres, S.: Building secure file systems out of byzantine storage. In: PODC, pp. 108–117 (2002)
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)
Ongaro, D., Ousterhout, J.K.: In search of an understandable consensus algorithm. In: USENIX ATC, pp. 305–319 (2014)
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)
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
Toro, M., Garcia, R., Tanter, É.: Type-driven gradual security with references. ACM Trans. Program. Lang. Syst 40(4), 161–1655 (2018)
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
Vaughan, J.A., Millstein, T.D.: Secure information flow for concurrent programs under total store order. In: CSF, pp. 19–29 (2012)
Zhao, X., Haller, P.: On consistency types for lattice-based distributed programming languages. CoRR abs/1907.00822 (2019). http://arxiv.org/abs/1907.00822
Acknowledgments
This work is supported by the China Scholarship Council 201600160040, and by the Tianhe Supercomputer Project 2018YFB0204301.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
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)