DEV Community

Discussion on: Quasar Framework - a SSR+PWA app with dynamic data.

Collapse
 
yul profile image
Yuri Lopukhov

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.

Thread Thread
 
tobymosque profile image
Tobias Mesquita

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.