3 ms·
I've seen people use a few hundred lines of javascript to create full blown distributed systems that are offline and end to end encrypted and backed by sqlite.
by pookha 3y ago
I've seen people use a few hundred lines of javascript to create full blown distributed systems that are offline and end to end encrypted and backed by sqlite. They only use the server as a glorified caching system to sync to\from. It's esoteric (logical clocks, conflict free replicated data types), but that's a hell of a lot more distributed than a client-server architecture and it's backed entirely with sqlite.
- beoberha 3y agoI mean this is kinda what I’m trying to get at. You need to build all this bespoke infra in order to fit SQLite into the round role where a database with native replication is a far more proven and battle tested solution.
- pookha 3y agoWhen I say a few hundred lines of javascript (and I'm no fan of javascript) I literally mean a few hundred lines of javascript. No frameworks. No complicated server logic. Just CRDTs and a hybrid logical clock (written in fifty or so lines of JS) and a server running a little message bus...I once heard JLong talk about this and demo'd the capability to a military contractor in an office in old town alexandria and they thought it was hilarious. In just a couple crappy javascript files I was syncing data offline between twenty five different clients regardless of internal system clock speeds (I used a laptop that was running hot and had a fast system clock) or other bullshit. It was magical. And all of that was ran through SQLite. I even used some SQlite PostGIS-like extension during the demo. So yes, sqlite can be distributed in the purest sense of the word.