How to handle multiple PouchDB instances in the browser that sync with the same db? -
what recommended way of dealing multiple pouchdb instances in browser synchronize simultaneously same remote/local database?
my setup web application in browser synchronizes continuously remote couchdb. web app opened more once (multiple tabs/windows) , create multiple pouchdb instances try sync.
in such case, 1 pouchdb instance report remote changes - other instances produce conflict during live sync:
{ error: true, message: "document update conflict", name: "conflict", result: { doc_write_failures: 0, docs_read: 1, docs_written: 1, end_time: ..., errors: [ custompoucherror ], last_seq: 963, ok: false, start_time: ..., status: "aborting" }, status: 409 }
do need ensure 1 pouchdb instance syncs @ time , pass changes around manually?
pouchdb replication not work in multiple tabs. an open issue, , wants hop in more welcome to. :)
Comments
Post a Comment