Re: [Zope] Bi-directional update of Data.fs
Bill Anderson wrote:
Since the Data.fs is appended to, and that your disconnected version is canonical, why couldn't you basically look for the last common transaction, and append all transactions in the canonocial to the main one?
Hwo would that handle the situation where an object has been modified in data.fs? Not too well I'd guess... :(
(thinking this might need to be moved to dev ...)
And so it was ;-) cheers, Chris
chrisw wrote:
Bill Anderson wrote:
Since the Data.fs is appended to, and that your disconnected version is canonical, why couldn't you basically look for the last common transaction, and append all transactions in the canonocial to the main one?
Hwo would that handle the situation where an object has been modified in data.fs? Not too well I'd guess... :(
Don't see why not. When an object is changed, the new object is just appended to the end of Data.fs. Unless you use undo, or you pack the Data.fs. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
Steve Alexander wrote:
Don't see why not. When an object is changed, the new object is just appended to the end of Data.fs. Unless you use undo, or you pack the Data.fs.
You missed the problem ;-) Technically, there is no problem... Logically, what happens if one user updates and object on one machien and another user on another machines, after which you merge the data.fs's? I'm thinkthing of the things which result in Notes Replication/Save conflicts... cheers, Chris
Chris Withers wrote:
Steve Alexander wrote:
Don't see why not. When an object is changed, the new object is just appended to the end of Data.fs. Unless you use undo, or you pack the Data.fs.
You missed the problem ;-)
Technically, there is no problem...
Logically, what happens if one user updates and object on one machien and another user on another machines, after which you merge the data.fs's?
I'm thinkthing of the things which result in Notes Replication/Save conflicts...
What does Lotus Notes offer to do if you get such a conflict? I'm probably talking rubbish in what follows, because I don't have much of an idea how these things really work... ---- The server has a data.original. You take a copy of this, called data.chris. You use this for a while, and data gets appended to data.chris. Someone else is using the server, and data.original gets appended to. Later, you want to recombine the changes, so you do as follows: Create a data.original.before_fork that is the data.original just before you took the copy data.chris. (You can work this out by looking at the modified data.original and data.chris). Create a list of the combined transactions (in order of time, I guess) that happened on the server, and to data.chris. Within one monsterous transaction, apply the list of combined transactions using the usual under-the-hood ZODB machinery. Use Jim's new conflict resolution algorithm to try to settle conflicts. If a conflict can't be settled, ask interactively, or apply some sort of policy (like "chris always wins" for example) and log the lost changes. ---- -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
Steve Alexander wrote:
What does Lotus Notes offer to do if you get such a conflict?
Save both versions and ask the user to delete the one which isn't needed, or merge the changes...
Use Jim's new conflict resolution algorithm to try to settle conflicts.
Urm? First I heard of this and it sounds like just the right sort of thing... Where can I find out more?
If a conflict can't be settled, ask interactively, or apply some sort of policy (like "chris always wins" for example) and log the lost changes.
Heh... I like the sound of that ;-) cheers, Chris
Chris Withers wrote:
Use Jim's new conflict resolution algorithm to try to settle conflicts.
Urm? First I heard of this and it sounds like just the right sort of thing...
Where can I find out more?
http://www.zope.org/Members/jim/ZODB/ApplicationLevelConflictResolution See also: http://www.zope.org/Members/jim/ZODB/ReverseDiffVersioning -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
Chris Withers wrote:
Steve Alexander wrote:
Don't see why not. When an object is changed, the new object is just appended to the end of Data.fs. Unless you use undo, or you pack the Data.fs.
You missed the problem ;-)
Technically, there is no problem...
Logically, what happens if one user updates and object on one machien and another user on another machines, after which you merge the data.fs's?
That's what the 'your version is canonical' qualifier handles :-) -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password.
participants (4)
-
Bill Anderson -
Chris Withers -
chrisw -
Steve Alexander