Safe Mixed-Consistency Local-First Software with Invariants

Read full text
Authors: Mirko Köhler, George Zakhour, Pascal Weisenburger, Guido Salvaneschi
Cited by: 0

Abstract

Local-first software embraces data replication as a means to achieve scalability and offline availability. A crucial ingredient of local-first software are mergeable data types, like conflict-free replicated data types (CRDTs), which feature eventual consistency by enabling processes to access data locally and later merge it with other replicas in an asynchronous manner. Notably, the merging process needs to adhere to application constraints for correctness. Ensuring such application-level invariants poses a challenge, as developers must reason about the replicated program state and resort to manual synchronization of specific application components to enforce the invariant. This abstract presents ConLoc (Consistent Local-First Software), a novel system designed to automatically enforce safety and maintain invariants in local-first applications. ConLoc effectively addresses the issue of preserving invariants in the execution of programs with replicated data types, including CRDTs. Our approach is able to verify the correctness of many CRDTs examined in the literature and in implementations, such as the ones used in the Riak database. ConLoc ensures that applications are automatically synchronized correctly, resulting in substantial latency and throughput improvements when compared to sequential execution, while upholding the same set of invariants.

Fields of Study & Subjects

Distributed systems and fault tolerance Advanced Database Systems and Queries Logic programming and type systems

Publication details

Journal / source
Gesellschaft für Informatik (GI)
Publication date
1 January 2026
Language
EN