[Zope-DB] How to do analysis? (was Re: Saga continues...)
dieter at handshake.de
Thu Oct 23 12:22:31 EDT 2003
Chris Withers wrote at 2003-10-22 22:42 +0100:
> Dieter Maurer wrote:
> > I am quite happy with the current architecture (apart from the
> > automatic connection in "__setstate__" which I have removed in our
> > Zope version).
> Hmm, so if one of your DA objects gets removed from the ZODB cache, how does the
> connection get re-opened?
The standard way is to get the connection via "DA()".
This call can create the connection when there is currently none.
I had to patch a few places in ZPsycopgDA (the only DA we
have in widespread use) such that they get the connection
via "DA()" rather than use it directly. But, it was at most
> > The only bad thing I can see is that a few more connections
> > are opened than are strictly necessary.
> > This is only a problem when you have lots of DA instances
> > lying around (while you need only one per database).
> What if you're accessing LOTS of different databases?
If you access hundreds of different databases, this
can become a problem. But, in this case, you will
have a tough time even with a different architecture
(as file descriptors become the bottleneck).
> These extra connections are something I'm really looking to get rid of...
When you like...
More information about the Zope-DB