-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SYNC - Collision handling #394
Comments
collision detection has been implemented for the following case : At 12:03:00 Client1 would check the drive and find data +B and overwrite the local data, loosing the changes done for object A. The new routines will now STOP the syncing and launch a dialog to ask for a user decision on which set of data to be used. As already pointed out: as SYNC is neither aware about the data nor its structure, it will not be able to merge or decide on other means how to process the data. As these situations are very rare anyway the effort to implement would not pay at all. |
Google Wave really pushed forward the concept of Operational transformations and that is stuff now used in Google Docs to handle simultaneous edits. I have not checked, but I would not be surprised if such capabilities is available through the API currently used. Though I would not be surprised if it also necessitated some backwards incompatible changes. But, at least if someone is bored, they could look at it. |
SYNC has a general design issue:
let's assume we have two clients.
Every 3 Minutes each client checks, if the file on the drive has changed (SYNC stores a UUID of the client that did the last update in the file). If so it will replace local data of the registered plugin (yes, there is no delta handling).
This is fine if you prepare your data at home and then go out to play and use IITCm (usecase).
The trouble comes, when you use both clients at the same time (within that 3 minutes window):
every time a registered plugin has changed its local data it will trigger SYNC to update the file.
SYNC will simply replace it without prior checking anything.
So if you change one element on first client, then an other element on the second client, the second change will survive.
Many agents have lived with that problem without even noticing it, so we could just ignore it...
IMHO not a good idea, now that we know the issue and the cause.
Should be easy to fix you would guess, but it is not:
Making a professional solution with locks, semaphores, databases, delta handling, checks et.al might be a good practice for a programmer but also create a very complex and expensive (CPU) solution.
The current proposal is:
Step 1: we are able to identify a collision, so we will ask the user "remote, local or abort?"
Step 2: the plugin can provide a collisionHandler-function. As it knows the data structure it would be up to the plugin's author to implement what ever he thinks.
The proposal will keep
SYNC easy, without the need to know anything about the data it handles (transparency).
the responsibility with the user (step 1) or
with the author of the plugin, while providing an alternative (step 2)
The change will not break any 3rd-party plugin, data or structure.
The text was updated successfully, but these errors were encountered: