7 comments

[ 0.20 ms ] story [ 12.1 ms ] thread
[flagged]
The write side on the client can't be transparent, can it?

Otherwise either write persistence is best-effort, writes don't work offline at all, or there is some kind of custom conflict resolution layer that guarantees that all writes will be accepted, like CRDTs

Right, it isn’t transparent. Unlike a CRDT, not every write is guaranteed to be accepted. Every write is applied locally at once, durably queued, and sent to PostgreSQL when online. The guarantee is that no write is lost, and each one ends with an explicit verdict: accepted, or refused with the reason and rolled back locally.
Is this like ElectricSQL which was acquired recently?
[flagged]
How do you handle syncing? Due to not many good options I resorted to putting a CRDT in my database on client and server side and then running their sync functions on every change but I wish Postgres had integrated CRDTs.