Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Conflict Resolution #506
In Couchbase Mobile 1.x, conflict resolution was handled as follows. When concurrent writes to an individual record occurred, each individual write was stored in the system as separate conflicting documents and the conflicts would be resolved asynchronously by custom code running on the client or server. This approach proved to be challenging in a number of ways. The first challenge, was around storage requirements - each conflicting document revision stored in the system has a incremental effect on the storage requirements of the system which is impactful in medium and large scale systems. The second challenge, is around resolving the conflicts once they are in the system - this requires advanced knowledge in distributed systems to write the additional code to resolve conflicts with routines that are efficient, convergent, and deterministic.
Reduce the challenges associated with managing conflicts.
In Couchbase Mobile 2.0, we have taken our 1st step in reduce the challenges associated with managing conflicts - we now have automatic conflict resolution. When concurrent writes to an individual record occur, the conflict is automatically resolved and only one non-conflicting document is stored in the system. This approach, eliminates the additional storage requirements for storing conflicting revisions and eliminates the need for advanced knowledge in distributed systems to resolve conflicts.
This approach to conflict resolution is efficient, convergent, and deterministic, and it's behavior can be generally compared to Last-Write-Wins from a logical clock perspective. Our current expectation is that this will work for the majority of use cases where the fidelity of conflict resolution at a document level is desired and/or acceptable.
For use-cases where this fidelity of conflict resolution is not a good fit, we are exploring more granular mechanisms like 2-way merge, 3-way merge, and CRDTs.
How you can help
We've created this issue for our customers and users to share their use-cases, functional requirements, and anything else that will help us understand what is needed in this area. Please join in the conversation and help us decide how we will progress this area of Couchbase Mobile.
If you're new to this conversation, a great way to start is to provide the following: