Notifications of changes between ECs

Sébastien Bigaret <[email protected]> Mon, 17 Apr 2006 14:11:45 +0200
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
    Hi Paul and all,

Paul Mylchreest wrote:
> On 13-Mar-06, at 03:32 , S=E9bastien Bigaret wrote:
>>> The only thing missing is notification of
>>> changes between EC's and was wondering if you have had any requests f=
or
>>> this?
>>
>> No, not yet; do you think you could have some time testing the feature
>> if we go for it?
>>
>
> Yes.

Ok, so I've updated and verified patch 911567, so that it can be applied
to release 0.9. You'll find it at:
https://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D911567&grou=
p_id=3D58935&atid=3D489337

With this patch, every changes made in an EC is propagated to other ECs
after these changes have been successfully committed into the database.

The process is the following:

- the EC that has committed changes to the db broadcasts the changes to
the other ECs,
  Ex: object 'Person' p1 has been saved with a new value for p1.nickname

- every EC receiving the notification examines the changes.
  - for every updated object, it merges the changes:
       1. determine the uncommitted changes locally made to that object
          (Ex.: same object 'Person' p1.age has a new value)
       2. apply the committed changes
          (Ex.: p1.nickname is updated)
       3. make sure that local uncommitted changes are re-applied, if
necessary
          (Ex.: p1.age should have the same value as in step 1.,
whatever changes were committed to the db)

Please note that deleted objects are not yet handled.
You can also have a look at the supplied unittests for more details.


-- S=E9bastien.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642