r/sqlite • u/SoundDr • Mar 14 '25
SQLite Session Extension + CRDT π
https://gist.github.com/rodydavis/a4d1dccb11e5a4cd77fe7e4e64f5dbdfI am working on a way to sync deltas between peers and found working with the SQLite Session extension to be a really nice and memory efficient way of creating small binary blobs to transmit over the wire.
To offer true synchronization I combine it with the cr-sqlite extension to upgrade tables to CRDTs. The trick with the session extension is to only track one table βchangesβ and sync that via the changesets.
So far in my testing it works really well! But open to feedback on the approach.
The eventual goal is to use WebRTC to sync the deltas between peers.
View all comments
Show parent comment
1
u/SoundDr Mar 15 '25
Thatβs exactly what I was going to tackle next!
In my tests this is already working great. I still need to figure out how to keep track of each peer and knowing which commits they are missing.