[Zope-DB] Orace Saga again (Re: Saga continues)

Chris Withers chrisw at simplistix.co.uk
Wed Oct 29 06:01:51 EST 2003


Bo M. Maryniuck wrote:

> It does not matter. I may have two, may have five, may have ten. Just making 
> more threads seems make Zope a bit faster to answer.

*shrugs* also uses a lot more memory and Oracle connections ;-)

> But having stuff outside Zope is a pain a bit. To get all that gotchas you 
> need do a lot. What is the first suggestion, is to commit nothing and 
> rollback nothing untill Zope ask you.

Well, yeah, that's what I want to do. Remember, I'm happy with a one to one 
mapping between Zope transactions and Oracle transactions :-)

> To get when Zope ask you do this, you 
> should make a callback class by subclassing Shared/DC/ZRDB/TM.py I think and 
> your callback should react on _abort()/_finish() stuff...

Well, what's wrong with the current DB objects from db.py?

> Sort of. The only thing that your base target could be 
> Shared/DC/ZRDB/Connection.py to let other adapters subclass it and have... 
> erm... trouble, since they use _v_ attributes. Hm... Good question how to 
> rework all this mess. 

I'm not interested is sorting out Zope's entire RDB architecture ;-)
I reckon most of the stuff I want to do can be done in DCOracle's DB.py, but I 
guess I'll have to wait and see...

> First, what I found to suggest, _v_database_connection 
> might be a _pointer_ to a real connection somewhere in the module-level 
> attribute.

Yup, that's my plan...

> Problems: when you have such stuff outside the Zope, it is quite difficult to 
> make it not fragile. But I didn't say "impossible". Possible, but difficult.

Yeah, parallel computing can be a bitch, but a few big locks can make all the 
difference :-)

> Weakness: What if Zope decrease threads? 

When does that happen?

> Why we need so much connections all 
> the time, espesially if they might be payed? 

The paid thing was a red herring, people have indicated that Oracle don't 
license like that.
With the connection pool model, you only get as many connections as you actually 
need. If you have a DA object, that gets used by ZSQL methods that are heavily 
used, you may want all the Zope threads to have their own connection...

cheers,

Chris




More information about the Zope-DB mailing list