Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 1.29 KB

README.md

File metadata and controls

18 lines (13 loc) · 1.29 KB

Synql

A proof of concept of a conflict-free replicated relational database that respects commonly used integrity constraints such as Foreign Keys and Unique Keys.

The current implementation relies on SQLite.

This work was inspired by the research paper Conflict-free replicated relations for multi-synchronous database management at edge by Yu, Weihai and Claudia-Lavinia Ignat.

Synql is written in SQL. It can be used in existing database instances without changing the SQLite engine. To do that, it adds extra tables and triggers that allow generating metadata upon modification of user tables. The metadata allow synchronizing several database replicas and resolving potential conflicts.

In contrast to prior works, Synql identifies every row with a unique labeled timestamp. A labeled timestamp consists of a monotonically increasing timestamp and a replica identifier. Every replica maintains a causal context that maps every replica identifier to the latest seen timestamp generated by the replica. The causal context allows fine-grained synchronization between any pair of replicas. Our approach supports commonly used integrity constraint such as Foreign Keys and Unique Keys.