does python have a generic object pool like commons-pool in Java
John Nagle
nagle at animats.com
Thu Jul 16 01:05:01 EDT 2009
alex23 wrote:
> On Jul 16, 2:03 pm, John Nagle <na... at animats.com> wrote:
>> "fcgi" is an option for this sort of thing. With "mod_fcgi" installed
>> in Apache, and "fcgi.py" used to manage the Python side of the problem, you
>> can have semi-persistent programs started up and shut down for you on the
>> server side.
>
> Hey John,
>
> The environments in which I've been asked to develop webs apps using
> Python have all utilised mod_wsgi. Do you have any experience with
> mod_wsgi vs mod_fcgi, and if so, can you comment on any relevant
> performance / capability / ease-of-use differences?
>
> Cheers,
> alex23
FCGI seems to be somewhat out of favor, perhaps because it isn't
complicated enough. It's a mature technology and works reasonably
well. It's been a puzzle to me that FCGI was taken out of the
main Apache code base, because it gives production-level performance
with CGI-type simplicity.
WSGI has a mode for running Python inside the Apache process,
which is less secure and doesn't allow multiple Python processes.
That complicates mod_wsgi considerably, and ties it very closely
to specific versions of Python and Python modules. As a result,
the WSGI developers are patching at a great rate. I think the
thing has too many "l33t features".
I'd avoid "embedded mode". "Daemon mode" is the way to go if you use WSGI.
I haven't tried WSGI; I don't need the grief of a package under
heavy development.
John Nagle
More information about the Python-list
mailing list