For my front-end work I am experimenting with optimistic updates https://github.com/replikativ/datahike/pull/822. For all folks interested in Datahike with low latency in the frontend (or backend) in the distributed setup, I am curious what your requirements are and what you think about this.
Did a bunch of work on the optimistic overlay today and it is now merged as an experimental feature https://github.com/replikativ/datahike/blob/main/doc/optimistic-overlay.md
Hi Christian, if I've understood correctly... Datahike doesn't (yet) support browser:left_right_arrow:server eventual sync where the comms is intermittent and where the browser gets restarted during an offline period ...? For that I'd need to use (the "lower-level") Replikativ (+Konserve+Kabel) ...? Thanks.
Hey Ash. Yes, currently this is correct. I have been thinking about persisting the messages at system boundaries though, a simple approach is to do this directly in local storage in datahike's optimistic layer, but we could also do this in konserve's pub-sub system itself, ideally ensuring idempotence/exactly once delivery. What is your use case?
Hi Christian, ...I’m building a small proof-of-concept, “offline-first”, single-page-app where the app should eventually (when there is connectivity) sync it’s local (IndexedDB backed) database with a server. I’m considering building it using PouchDB. But your Replikativ work has caught my eye, initially because of use of Clojure and Datalog concepts. Although I’ve only a shallow understanding of parts of it, it’s obvious that a lot of engineering thought has gone into it. To me, it seems like more of a sophisticated toolkit than PouchDb’s easy, off-the-shelf solution. I will keep a watch on your Datahike work for IndexedDB backed persistence. Thanks.
Cool, I am happy to discuss PouchDB or any specifics you need. I think being able to deal with intermittent failures and browser refreshes is good. I think being offline long-term brings its problems in apps, where even the code can get out of sync and it gets much more complicated.
...yeah, offline for too long isn't ideal. The context I'm dealing with is a remote region with very poor internet where having to work offline for a day is likely (as is device re-starts). Time for work on the initial PoC is very limited so I'll probably build it using the looks-easy PouchDB-CouchDB sync-ing. But if we get a follow-on phase then I'll absolutely keep Datahike in mind.
(Good luck for your London Clojurians talk)