[gme-users] Mirroring Transactions
Kevin Smyth
ksmyth at isis.vanderbilt.edu
Tue Dec 6 17:44:12 CST 2011
If you’re not interested in the conflict detection/resolution problem, you can store all the ObjectEvent changes in GME A, then transfer them to B when GME A notifies your plugin of a committed transaction via GlobalEvent. Combined with explicit undo/redo handling in GlobalEvent, your transactions could contain the same set of changes.
Kevin
From: gme-users-bounces at list.isis.vanderbilt.edu [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Jae Young Bang
Sent: Monday, December 05, 2011 6:18 PM
To: gme-users
Subject: [gme-users] Mirroring Transactions
Hello,
I am building a system that has multiple instances of GME (I'm using 9.12.15) on different machines and mirrors the actions made by the users on each others' machines.
For example, if there were two users A and B, B would see what A does on A's machine such as creating new objects, updating attributes and registries, and removing objects. A and B would eventually have the same model in their local GME instance.
I first tried to listen to ObjectEvents, transfer them over, and replay the events by developing a plugin that captures ObjectEvents and modifies the MGA model according to the captured ObjectEvents. It works, but it ruins the undo/redo architecture because it does not consider the transaction architecture.
I figured what I'd ultimately like to do is to grab a transaction when it's completed, transfer it over, and execute the transaction on the other side by putting it in the transactions list.
What I wonder is how to implement it. It seems like a plugin cannot manipulate transactions as nested transactions are not allowed. When objectEventPerformed is invoked, the plugin is in the middle of a transaction, and the transaction ends after the objectEventPerformed returns.
Would it be possible to do this with a plugin, or would it not be possible to do this with a plugin?
Thank you very much for your help!
--
Jae young Bang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20111206/f74b5b3e/attachment.html
More information about the gme-users
mailing list