[ZODB-Dev] Ordering before commit hooks

Julien Anguenot ja at nuxeo.com
Mon Aug 29 08:38:28 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Fulton wrote:
> Dieter Maurer wrote:
> 
>> Tim Peters wrote at 2005-8-22 16:48 -0400:
>>
>>> ...
>>> Jim still wonders, and he got me wondering too, whether the `order=`
>>> gimmick
>>> is really needed.
>>
>>
>>
>> But, it is a very easy concept -- both easy to grasp as well as easy
>> to implement.
> 
> 
> This is not sufficient IMO.
> 
>>> For example, you could have gotten to the same end here
>>> with the old method, by registering your actions with an object of
>>> your own
>>> creation, and registering just one commit hook with the transaction,
>>> where
>>> that one hook looked at the actions you registered with your own
>>> object and
>>> ran them in whatever order _it_ determined was best.
>>
>>
>>
>> Now plug and play comes into play:
>>
>>   Assume two packages developped by independent people
>>   which all want to control the order of hook execution.
> 
> 
> Do we have evidence that such applications exist? So far, the
> only example I've seen is one where an application wanted a handler
> to go last. As I've pointed out in a separate note, this is achievable
> without the change.
> 

We have. We are thinking of adding another hook within CPS to maintain
our tree caches. (I'm not going into details on the CPS tree cache here)

We would have these 3 hooks that we will want to see executed in the
following order :

IndexationManager -> TreeCacheManager -> EventManager

If you want more information about this Jim, feel free to ask.

	J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDEwHEGhoG8MxZ/pIRAhvkAJ9QCus9qR17YS5ibcSVlBuVkxcqKQCghv1Z
9xzLDYSyCmtAXFmpxt8QIig=
=Vbfr
-----END PGP SIGNATURE-----


More information about the ZODB-Dev mailing list