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

Jim Fulton wrote:
> Julien Anguenot wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I implemented a pre-commit hook on transaction supporting subscribers
>> within CPS for our indexation use case. (for ZODB-3.2.x on
>> Zope-2.7.x)
> 
> 
> Cool
> 
>> if you're interested to take a look at it :
>>
>> http://lists.nuxeo.com/pipermail/cps-devel/2005-April/001357.html
> 
> 
> I get a traceback from viewcvs when I try to view the patch.
>

this one ? :

http://cvs.nuxeo.org/cgi-bin/viewcvs.cgi/CPS3/CPSCore/PatchZODB.py?rev=1.1&view=auto


>> The difference I can see with your proposal is the abort() hook facility
>> that can be a good thing especially if the subscriber code has to
>> communicate with external programs for rollback purpose.
> 
> 
> I suggest that if you are going to "communicate with external
> programs for rollback purpose", it would be much better to
> participate as a data manager.
>

in ZODB-3.2 ? Can you explain ?

> I would say that the main difference is that with the simple hook
> facility I proposed, you can just register simple callables. You
> don't have to create a class.

ok for this. My idea is to control what people are going to register. So
I'm adding constraints by providing an interface they need to implement
for their own subscribers. That's mostly the point.

> 
> I also don't see any point in making it the responsibility of
> the hook to register itself, 

Hum.. yeah it's probably useless in here... It's calling the
registerBeforeCommitHookSubscriber() method of the transaction anyway.

> or what the queue business is about.
>

It's specific for the indexation manager. All the objects that need to
be reindex during the transaction are stored there with properties
(idxs, security reindexation, etc...) and then this queue is flushed by
the susbcriber called by the hook added just before the commit. commit()
method.

Thanks for your feedbacks Jim.

        J.


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

iD8DBQFCUYymGhoG8MxZ/pIRAjypAKCDDXJGKr9r8uz87dVQs9whFiM5BgCfc21S
R3f6qTXCrIcHzDme5UPhLoQ=
=167/
-----END PGP SIGNATURE-----
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to