Table Of Contents
1 Introduction
2 CouchDb
3 Quasar Project
4 Preparing
4.1 Utility Belt App Extension
4.2 Installing dependencies
4...
For further actions, you may consider blocking this person and/or reporting abuse
Thank you for this article!
Is there a need for extra replication lines in Database.configure?
Documentation for pouchdb claims that
is equivalent to
Or it doesn't work correct in some cases?
you're right, but that isn't what we're doing here.:
is equivalent to:
In that case, both initial/start replications aren't running in parralel, instead of that, we're running the replication from
server
tolocal
firstly. The reason behide that is, we're assuming, in the case of conflict, the server would win. So when we run the replication fromlocal
toserver
, the chance to appear conflicts will be very small.So, if everything goes well, every conflict will be resolved and everything will be in sync before we start the 2-way live replication, where the conflicts probably will be resolved as soon than appear.
If you think I'm being too cautious, I'm really open to suggestions.
Hmm, I think possibility of conflicts does not depend on the order of replication, if a user tries to update an outdated record, conflict is inevitable. But perhaps how conflicts are resolved does depend on this order, I will need to test my cases to figure this out I think.
TL;DR, I'm avoiding 409 responses.
All depends on your conflict resolution strategy. I usually prioritize the server for two reasons.
The first is that the documents may have been replicated to other devices, so the unique affected device is the current one.
secondly it's cheaper to solve locally, pouchdb will not throw a 409 and force you to send other web request. at this point, you can easily ignore/delete the local document or compare both.
Thank you for a great article!
Database sync is working fine.
db.save is also working in seed.js
but db.rel.get('person') in pouchdb/index.js in boot folder gives following error
Cannot read property 'get' of undefined
I am using latest quasar
rel
related methods belongs to a plug-in (relational pouch
), pls, be sure u installed and configured this plug-in.relational pouch
in installed and configuredI fixed the issue it was due to a typo
db.rel.get('person')
in the screenshot of code of boot file where it should bedb.local.rel.get('person')
know I am getting the issue that in the part 10.3 Listening for Changes as the listener isn't being called and when I
console.log(this.listener)
the listener its undefinedThanks in advance
Incredibly smart and concise article. Thank you so much for this writing and code. I'm currently learning vuex-orm, which is extremely nice api for vuex management (there is excellent Luke Diebold tutorial on YouTube to get into vuex-orm quicly: youtube.com/playlist?list=PLFZAa7E...). I would like to connect vuex store to pouchdb (which is in sync with couchdb) but still use vuex-orm on the client. That way I could use all relational stuff on the client (vuex-orm.github.io/vuex-orm/guide/...). Maybe that way whole codebase could be even smaller and simple to use, because vuex-orm makes all vuex mutations under the hood. What do you think about this route?
I really don't know, since i never used
vuex-orm
, and my first impression aboutvuex-orm
is that it was a little over-architectured for my needs. (as any first impression, that can be very biassed).But if you're already familiarized with them, and you think would be easy to keep the module's state synced with the pouchdb, so go ahead.
Just a heads up:
Is now:
Very nice article!
I will definitely use this knowledge for my life!
Incredible, Tobias a great professional, active and very talented!
Congratulations!