Distributed Locking as a Data Type
Abstract: Mixed-consistency programming models assist programmers in designing applications that provide high availability while still ensuring application-specific safety invariants. However, existing models often make specific system assumptions, such as building on a particular database system or having baked-in coordination strategies. This makes it difficult to apply these strategies in diverse settings, ranging from client/server to ad-hoc peer-to-peer networks. This work proposes a new strategy for building programmable coordination mechanisms based on the algebraic replicated data types (ARDTs) approach. ARDTs allow for simple and composable implementations of various protocols, while making minimal assumptions about the network environment. As a case study, two different locking protocols are presented, both implemented as ARDTs. In addition, we elaborate on our ongoing efforts to integrate the approach into the LoRe mixed-consistency programming language.
- Blazes: Coordination Analysis for Distributed Programs. In 2014 IEEE 30th International Conference on Data Engineering. IEEE, 52--63. https://doi.org/10.1109/ICDE.2014.6816639
- The Potential Dangers of Causal Consistency and an Explicit Solution. In Proceedings of the Third ACM Symposium on Cloud Computing (SoCC ’12). Association for Computing Machinery, New York, NY, USA, 1--7. https://doi.org/10.1145/2391229.2391251
- IPA: Invariant-Preserving Applications for Weakly Consistent Replicated Databases. Proceedings of the VLDB Endowment 12, 4 (Dec. 2018), 404--418. https://doi.org/10.14778/3297753.3297760
- Putting Consistency Back into Eventual Consistency. Proceedings of the Tenth European Conference on Computer Systems - EuroSys ’15 (2015), 1--16. https://doi.org/10.1145/2741948.2741972
- ECROs: Building Global Scale Systems from Sequential Code. Proceedings of the ACM on Programming Languages 5, OOPSLA (Oct. 2021), 107:1--107:30. https://doi.org/10.1145/3485484
- Sound Sequentialization for Concurrent Program Verification. In Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2022). Association for Computing Machinery, New York, NY, USA, 506--521. https://doi.org/10.1145/3519939.3523727
- ’Cause I’m Strong Enough: Reasoning About Consistency Choices in Distributed Systems. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, New York, NY, USA, 371--384. https://doi.org/10.1145/2837614.2837625
- LoRe: A Programming Model for Verifiably Safe Local-first Software. ACM Transactions on Programming Languages and Systems 46, 1 (Jan. 2024), 2:1--2:26. https://doi.org/10.1145/3633769
- Adore: Atomic Distributed Objects with Certified Reconfiguration. In Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2022). Association for Computing Machinery, New York, NY, USA, 379--394. https://doi.org/10.1145/3519939.3523444
- Farzin Houshmand and Mohsen Lesani. 2019. Hamsaz: Replication Coordination Analysis and Synthesis. Proceedings of the ACM on Programming Languages 3, POPL (Jan. 2019), 74:1--74:32. https://doi.org/10.1145/3290387
- ZooKeeper: Wait-free Coordination for Internet-scale Systems. In 2010 USENIX Annual Technical Conference (USENIX ATC 10). https://www.usenix.org/conference/usenix-atc-10/zookeeper-wait-free-coordination-internet-scale-systems
- Local-First Software: You Own Your Data, in Spite of the Cloud. In Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward! 2019). Association for Computing Machinery, New York, NY, USA, 154--178. https://doi.org/10.1145/3359591.3359737
- Rethinking Safe Consistency in Distributed Object-Oriented Programming. Proceedings of the ACM on Programming Languages 4, OOPSLA (2020), 188:1--188:30. https://doi.org/10.1145/3428256
- MDCC: Multi-Data Center Consistency. In Proceedings of the 8th ACM European Conference on Computer Systems (EuroSys ’13). Association for Computing Machinery, New York, NY, USA, 113--126. https://doi.org/10.1145/2465351.2465363
- Algebraic Replicated Data Types: Programming Secure Local-First Software. In 37th European Conference on Object-Oriented Programming (ECOOP 2023) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 263). Schloss Dagstuhl -- Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 14:1--14:33. https://doi.org/10.4230/LIPIcs.ECOOP.2023.14
- Leslie Lamport. 1998. The Part-Time Parliament. ACM Transactions on Computer Systems 16, 2 (May 1998), 133--169. https://doi.org/10.1145/279227.279229
- Leslie Lamport. 2005. Generalized Consensus and Paxos. Technical Report. https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-2005-33.pdf
- Nicholas V Lewchenko and Gowtham Kaki. 2023. Distributed Consensus Algorithms as Replicated State Applications. In Proceedings of the 10th Workshop on Principles and Practice of Consistency for Distributed Data (PaPoC ’23).
- Sequential Programming for Replicated Data Stores. Proceedings of the ACM on Programming Languages 3, ICFP (July 2019), 106:1--106:28. https://doi.org/10.1145/3341710
- Making Geo-Replicated Systems Fast as Possible, Consistent When Necessary. OSDI’12 Proceedings of the 10th USENIX conference on Operating Systems Design and Implementation (2012), 265--278.
- A Tour of Gallifrey, a Language for Geodistributed Programming. In 3rd Summit on Advances in Programming Languages (SNAPL 2019), Vol. 136. Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 11:1--11:19. https://doi.org/10.4230/LIPIcs.SNAPL.2019.11
- Diego Ongaro and John Ousterhout. 2014. In Search of an Understandable Consensus Algorithm. In 2014 USENIX Annual Technical Conference (USENIX ATC 14). USENIX Association, Philadelphia, PA, 305--319. https://www.usenix.org/conference/atc14/technical-sessions/presentation/ongaro
- Pretend Synchrony: Synchronous Verification of Asynchronous Distributed Programs. Proceedings of the ACM on Programming Languages 3, POPL (Jan. 2019), 59:1--59:30. https://doi.org/10.1145/3290372
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.