r/sqlite • u/SuccessfulReality315 • Sep 21 '25
Another distributed SQLite
https://github.com/litesql/haHighly available leaderless SQLite cluster powered by embedded NATS JetStream server.
Connect using PostgreSQL wire Protocol or HTTP
43
Upvotes
1
u/wuteverman Sep 21 '25 edited Sep 21 '25
Basically you can see events replayed, so you don’t have consistency. One example:
insert row 1
delete row 1
Row 1 gets replayed
The row is back forever.
—-
There’s a few scenarios where you might see this behavior
The producer sent the message, Jetstream recorded the message, but could not ack for $REASONS. The producer should retry until it gets an acknowledgment
The consumer failed to ack a message, after it committed it locally, perhaps because the process was interrupted before it could ack, or because the network is unreliable.
Your consumer needs logic to drop old updates it shouldn’t apply, and that logic needs to be persisted atomically.
Some workloads simply write the raw events and resolve the correct value at read time. Because you’re using SQLite, you probably want to include some sort of version number either for each row or for the entire table, and only apply writes greater than the version number.
Edit: clarity and formatting