tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
10.04k stars 262 forks source link

Provide replication hooks for distributing data #6

Closed psarna closed 3 months ago

psarna commented 2 years ago

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.

MarinPostma commented 2 years ago

Regarding this topic, there are two things we need to think carefully about:

penberg commented 3 months ago

We support replication via WAL hooks since forever.