logoalt Hacker News

andaiyesterday at 6:52 PM2 repliesview on HN

So if it needs to work offline, but it syncs with a server, then you use both? (And the schema becomes some kind of lowest common denominator?)


Replies

preg_matchyesterday at 8:27 PM

I would probably do an event-source architecture, where you record events on the client and then push them to the server when you're reconnected. It has a lot of benefits, for instance, trivial auditing and free serialization.

theultdevtoday at 7:29 AM

yeah essentially, see electricsql

though they also have "pglite" running in wasm.

same concept though, sync slices to an embedded db.