5 ms·
Syncing complex data from offline storage to a hosted backend is hard, especially if the data can change in both places at once. If this solves that problem, i
by tectonic 14y ago
Syncing complex data from offline storage to a hosted backend is hard, especially if the data can change in both places at once. If this solves that problem, it could be very useful.
- daleharvey 14y agoPouchDB uses the exact same replication API as CouchDB, its fairly simple (although not so much to implement) Conflicts (when the data has been modified on both sides independantly) are simple dealt with by storing both versions of the document, the app author can then choose one, or merge to create a new document to fix the conflict. http://guide.couchdb.org/draft/conflicts.html http://guide.couchdb.org/draft/conflicts.html - has some more information It is a hard problem, you have to deal with offline edits + conflicts, minimizing the amount of changes that are transferred, Hopefully this is useful for people dealing with those problems so they dont need to start from scratch
- damncabbage 14y agoI looked into this a month ago, and it didn't appear to be there yet: https://github.com/daleharvey/pouchdb/issues/25 https://github.com/daleharvey/pouchdb/issues/25 (The issue is currently open, but it looks as if it may land shortly.)
- daleharvey 14y agoThe data syncing is there, that bug is related to a particular issue of communicating with external hosts If your app and your CouchDB instance are on the same host (either with a proxy or couchapps) then there is no issue, if the CouchDB instance you want to sync with is on a seperate host then you need to add CORS headers to data served from couch, this is a few lines change in nginx, I run a local proxy for development because its just more convenient