[Yanel-dev] Atomic operations in Yarep

Balz Schreier balz.schreier at gmail.com
Fri Jan 14 18:36:53 CET 2011


Hi,

do you agree that there is a potential of data inconsistency when modifying
a Yarep Group from within your application?

Scenario:
- The application itself can add and remove groups to a certain user,
depending on what that user is doing in your application.
- At the same time, a Yanel Administrator modifies memberships via the out
of the box Group Mgmt page via toolbar.

Now, the application can remove a membership like this:

                   group.removeMember(user); // this also removes the group
entry in the user XML and the user object gets saved!

                group.save();

As you can see, there is no possibility that these two steps are done in 1
step (in Java terms: synchronized).
It also does not help if you write a Facade which does these two steps in a
synchronized way because those modifications from the yanel admin page are
still bypassing that facade.

So my suggestion would be to extend Yarep by introducing this mechanism
built-in, so that there is no way that files can get corrupt.

If you agree, we should work once on a patch for Yarep where such operations
are handled atomic.
Cheers
Balz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2011011=
4/5458f202/attachment.htm


More information about the Yanel-development mailing list