RE: [Zope-dev] PyGreSQL DA: help testing
Ross:
I stuck my neck out on the postgres-hackers list late last week, and said I'd take a look at whiping the postgres DA into shape to work with Zope2. This involved modifying the PyGreSQL pgmodule source (wrapping calls to the backend with Py_START_ALLOW_THREADS and PY_END_ALLOW_THREADS macros), as well as the DB class inside ZPyGreSQLDA.
Well, I think I've at least got it limping along, at Level 2, using <SNIP>
Wow! This is great news! Congrats. I'm very hopeful that another postgres user can assist on testing!! --Rob
On Mon, Aug 02, 1999 at 06:26:46AM -0400, Rob Page wrote:
Ross:
Well, I think I've at least got it limping along, at Level 2, using
<SNIP>
Wow! This is great news! Congrats. I'm very hopeful that another postgres user can assist on testing!!
Thanks for the ataboy, Rob. I want to reiterate that this is not the end-all be-all for using threads w/ the PostgreSQL DA - In fact, I think Chris was a little generous in calling THUNKED_TM DA's level 2: I'd call them 1.5, perhaps. Although, I guess Zope installs that access more than one db backend are probably rare, so the 'serialize in the TM' isn't as bad as it sounds, at first. Even so, as described in the DA map, Level 2 is not for DB's that do heavy lifting. I'm looking for help at a couple of levels: what I did to the PyGreSQL module is, I beleive, make it possible to use it in one thread of a multi-threaded Python script, without starving the other threads. It's not multi-threaded itself. A simple script to test this would be nice. (This is where my Python newbie status is a problem) The next level is testing the transactional integration with Zope. My understanding is that Zope's transactional boundries are essentially one user interaction: i.e. one rendered output (usually one DTML page including all its calls). So, if I write a test page that calls some ZSQL methods at the top, then does a <!--#raise type='test error'-->This is a test error <!--#/raise--> that should rollback the methods, right? Hmm, that sounds easy enough to test, I think I'll go do so ... ;-)
--Rob
-- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005
participants (2)
-
Rob Page -
Ross J. Reedstrom