[Zope-dev] PHP vs Zope cost benefit

Leonardo Rochael Almeida leo@hiper.com.br
24 Apr 2002 16:55:57 -0300


On Tue, 2002-04-23 at 21:36, Jason Spisak wrote:
> [...]
> 
> 5.  The transactional nature of Zope (although they didn't 
> believe me when it came to rolling back multiple dbs) impressed 
> them and if it really can mange a rollback from from a DB and 
> transaction safety for inventory,etc...(which I know it can) 
> then its a huge win.

Yes, of course it can, IF you use a properly trascationed DB and
adapter. Psycopg fits the bill nicely, as do DCOracle2.

As for multiple DB rollback, yes, that works as advertised, and is
actually really easy to believe if you explain them how it works. Truth
is, Two-Phase-Commit was INVENTED (a long time ago, and not in Zope) to
make it possible to commit or rollback multiple transactional entities
at the same time. Zope is just an implementation of a TPC coordinator (I
think, and I hope I got the vocabulary right).

In the course of a Zope transaction, any object that is invoked and
wants to be notified of the tpc phases registers itself in the
transaction machinery. Most of them inherit from Shared.DC.ZRDB.TM.TM.
When a transaction is aborted or commited, the Transaction machinery
notifies all registered objects. Each registered object then calls the
respective actions in their backend drivers or whatever.

Cheers, Leo

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.