When a Wikifeat system is backed by multiple instances of CouchDB, the possibility of conflicting document versions exist. CouchDB "resolves" this upon replication by storing both versions on each node, and just 'picking' a winner to present in response to a read request (supposedly this is a deterministic process so the same winner is consistently returned on all nodes).
Need to allow users (those with write access to a particular wiki, anyway) to participate in resolving conflicts (i.e., merging the conflicting versions into a 'new' one). CouchDB does allow you to query for conflicting document versions on a read, which will be helpful.
The solution should go something like this:
- In the UI, place an 'alert' box at the top of a document if an unresolved conflict exists (Possibly limit this to users with 'write' access) along with a clickable 'resolve now' link.
- When clicked, the UI presents a 'merge' view containing a side-by-side diff of the two versions (similar to the merge tools in many SCM GUI tools).
- The user merges the two documents and saves the result
- The old versions are added to the history, with the new 'merged' version becoming the current document revision.
- User rejoices.
When a Wikifeat system is backed by multiple instances of CouchDB, the possibility of conflicting document versions exist. CouchDB "resolves" this upon replication by storing both versions on each node, and just 'picking' a winner to present in response to a read request (supposedly this is a deterministic process so the same winner is consistently returned on all nodes).
Need to allow users (those with write access to a particular wiki, anyway) to participate in resolving conflicts (i.e., merging the conflicting versions into a 'new' one). CouchDB does allow you to query for conflicting document versions on a read, which will be helpful.
The solution should go something like this: