Hacker News new | ask | show | jobs
by guyromm 1772 days ago
i wonder if it's possible to plug any kind of streaming replication onto this. i don't have much sqlite experience, but maybe someone here has an idea if it would be possible to run litestream or something of the sort, as both master and slave - in the browser.

that would solve the safari indexeddb 7 day ttl issue to start with.

and if replication could be made to work on top of something like webrtc we're looking at a great foundation to start building distributed, decentralized browser apps.

1 comments

There’s also CouchDB/PouchDB made for this use case.
that one i did take for a spin.

i must say that the experience is quite horrible - that torture of having to write map/reduce functions, added with some erratic behavior in regards to data integrity (inserted entries silently discarded, sync to the remote couchdb instance working somewhat whimsically). as soon as your dataset is sizable in any regard (tens of thousands of records in a collection, if i recall the terminology) it begins to just break apart.

was writing a browser extension, and used pouch with the hope of keeping its persistence local and avoid needing a server. seeing that it leaks tried to trade it for a couchdb server. seeing how bad sync is, and that couch is not very comfortable to work with either ended up throwing the thing in favor of a postgresql+postgrest backend.