3 ms·
So I have a question for you all. But first a little background. I have been playing with PouchDB, an in-the-browser implementation of CouchDB that is mostly co
by mosselman 12y ago
So I have a question for you all. But first a little background. I have been playing with PouchDB, an in-the-browser implementation of CouchDB that is mostly compatible with CouchDB. What I really like is its sync function, this sets up no-brainer practically real-time sync between my local (offline) PouchDB database. It is very cool!
I am very impressed by RethinkDB's cluster management, etc, so I would like to explore it as an option, but is there an easy way to sync my offline (browser based) localstorage-like database to rethink and back again? PouchDB makes this dead easy.
- coffeemug 12y agoThere isn't a good way to do that yet. We've been playing with some ideas, but offline sync like this is a surprisingly challenging problem -- it's easy to make something that works, but dramatically harder to make something that works at scale.
- mosselman 12y agoI can imagine that. I have seen some sync implementations for Backbone.js for instance a while back, but nothing that really worked well. Again, I am very surprised of how well PouchDB performs in this. Additionally, you get all (most) the features of CouchDB in the browser, you can even use the design documents that you create on the server.
- realusername 12y agoExcuse my curiosity unrelated to the current topic but I'm about to deploy a small scale hybrid (desktop & web) application using PouchDB. I have strongly unreliable networks (3G networks with entire days where the app is offline). The nodes are owning their own chunk of data so there is no risk of conflicts whatsoever, the main goal is to sync as soon as they can. PouchDB/CouchDB seemed clearly the best fit for this kind of unusual application. Did you encounter any problem with it ? Or if you can share your opinion on this technology after using it.
- mosselman 12y agoHi. First a disclaimer: I have no production app running this setup yet, but I have been working with PouchDB and recently CouchDB for a few months now. Experimenting with a Phonegap/Web app in Angular (I would recommend React instead I think though, but that is irrelevant to the Pouch&Couch story). I have a similar use cases as you in mind for my PouchDB setup; being offline for a while and then syncing many things at once. So far I have been testing with high performance networks mostly (including good 3g however). I have also tested going into airplane mode on my phone, then making changes and then going online again after a while. All changes came through nicely. So you can do what you ask: sync as soon as there is a connection. Indeed when there are no issues regarding conflicts that you have to resolve it seems that Pouch and Couch are a very very good way to have offline <-> online sync.