Document Version Control
From the previous post, we know Call-by-Reference is great for online access. Then how do we handle conflicts? This problem is actually everywhere. The scenario is: user A reads a document at t1; user B reads the same document at t2; user B modifies the document and saves it; user A modifies the document, saves it and thus overwrites user B's changes.
The solution seems to be a best practice that many have adopted (Hibernate, Confluence): use a version number. User A saves the document saying these are the changes on top of version 1. But the current version is already version 2 (with user B's changes). So user A either fails or is prompted with differences (as is the behavior of Confluence) to merge.
What does this mean for us?
The solution seems to be a best practice that many have adopted (Hibernate, Confluence): use a version number. User A saves the document saying these are the changes on top of version 1. But the current version is already version 2 (with user B's changes). So user A either fails or is prompted with differences (as is the behavior of Confluence) to merge.
What does this mean for us?
- We want to keep the unit of documents small to reduce chance of conflict.
- We want to implement a structural diff that can show visually the differences, not just diff tool's textual differences.
- Our approach of model changes works perfectly well here: any new document is created by applying model changes to its previous version.
0 Comments:
Post a Comment
<< Home