libsql
libsql copied to clipboard
Provide replication hooks for distributing data
Historically (e.g. https://sqlite-users.sqlite.narkive.com/FsbiDRYS/sqlite-dqlite-sqlite-replication-and-failover-library) sqlite requires a few patches in order to facilitate replicating the data via Raft or another consensus protocol.
This umbrella issue is here to discuss what kinds of hooks are necessary to enable replication (be it WAL-based, statement-based, or any other type). It would be great to use https://github.com/chiselstrike/chiselstore for validating the ideas, by implementing the replication layer on top of modified sqlite.
Regarding this topic, there are two things we need to think carefully about:
- distributed transactions: we rely heavily on transactions in chiselstrike.
- If want multi-write in a distributed setup, then distributed concurrent transactions, http://cs.yale.edu/homes/thomson/publications/calvin-sigmod12.pdf has some answers