David.Bear at asu.edu
Fri Aug 18 13:45:55 EDT 2006
On Fri, Aug 18, 2006 at 06:19:41PM +0100, Richard Lewis wrote: > On Friday 18 August 2006 19:26, Norman Tindall wrote: > > Don`t know how about publisher and PSP, but in handler > > you always can at the end of processing, just before > > return apache.OK close connection > Yes, but I want to avoid opening and closing the connection to Berkeley DB XML > for /every/ request as its quite slow to connect. Thats why I open it when > the server starts and wanted to be able to close it when the server shuts > down. I've thought about these issues and was wondering if it would be better to pre-create the data base connection, and maybe even the cursor in a completely separate process. Then have modpython communicate to it via a simple local socket. I assume there still is overhead when create a local socket -- but it might be less then a data base connection. It might be tempting to want to layer a whole new light protocol on top of that when sending data to the socket -- but maybe sending a simple python pickle would be enough. As a side, is there any difference in communicating via a socket and a unix pipe? -- David Bear phone: 602-496-0424 fax: 602-496-0955 College of Public Programs/ASU University Center Rm 622 411 N Central Phoenix, AZ 85007-0685 "Beware the IP portfolio, everyone will be suspect of trespassing"