[mod_python] server shutdown

Nic James Ferrier nferrier at tapsellferrier.co.uk
Fri Aug 18 14:38:14 EDT 2006

David Bear <David.Bear at asu.edu> writes:

> 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.

Check out sqlrelay:


it is based on exactly this idea.

> As a side, is there any difference in communicating via a socket and a
> unix pipe?

Sockets are more expensive to establish.

But after that it's just writes and reads.

Of course, latency on a unix socket is lower because there is no
protocol encoding/decoding.

Nic Ferrier
http://www.tapsellferrier.co.uk   for all your tapsell ferrier needs

More information about the Mod_python mailing list