2 ms·
The window is pretty small to create a conflict in a well designed CouchDB interface because of the way revisions are used. You should get the latest revision w
by oblib 7y ago
The window is pretty small to create a conflict in a well designed CouchDB interface because of the way revisions are used. You should get the latest revision when you load the data for editing. And it's trivial to set a "locked" flag in a file being edited to prevent others from overwriting it if you have it configured so others can do that.
In this particular use case there really should only be one authorized user who can edit the data file for each precinct so race conditions like you describe just don't exist.
You can also use CouchDB's live sync feature to push the latest revision to everyone viewing the file in close to real time.
So conflicts are really a non-issue here. By design they just don't happen.