orbitinghail / sqlsync

SQLSync is a collaborative offline-first wrapper around SQLite. It is designed to synchronize web application state between users, devices, and the edge.
https://sqlsync.dev
Apache License 2.0
2.19k stars 28 forks source link

timeline durability #21

Open carlsverre opened 10 months ago

carlsverre commented 10 months ago

Timelines should be durably stored on the client using #15 and also durably stored on the coordinator.

Need to think about what happens if the client loses its timeline state, but still knows its identity. Should it pull down pending mutations from the server, or should it create a new timeline id and act as a new client. Since timeline is durable, this would be correct - although to the client it may appear that data has been temporarily lost until the server incorporates it. On the other hand, this is a pretty rare edge case - and it makes sense that local durability should be treated as all or nothing.