generalizing the CGI case was: Re: mod_python confusion
Eric S. Johansson
esj at harvee.org
Sat May 29 19:56:15 EDT 2004
Tuure Laurinolli wrote:
> Converting some simple speed-needing CGI script into something jonpy can
> handle should be trivial - and with FastCGI it really helps the speed
> when the interpreter starting overhead is the biggest cause for slowness.
here's a question that is of immediate interest for myself and possibly
others. How do you generalize the fast CGI type of solution to Python
programs in general? For example, I have a program that runs as a
filter off of emailrelay[1]. The long-term solution is integrating
python but that has its challenges (emailrelay is a threaded c++
application and we would want python applications to be threaded as well).
Since the integration isn't going to happen anytime soon, I am content
to run a persistent process (like fast CGI) with some glue logic handing
data over. The question is, is there a general framework for this. XML
RPC is a possibility but my experience has shown in to be a somewhat
sluggish protocol using the stock XML RPC server in Python.
it would be nice if one could make it a multithreaded server but I must
admit I haven't researched to see if the available XML RPC facilities in
Python can be threaded or at least forked.
I'm sure there are innumerable misunderstandings in my approach to this
problem so I await correction.
---eric
[1] emailrelay is a really nice mini MTA/proxy which lets you filter
messages at a variety of points.
More information about the Python-list
mailing list