Is this true regarding Python's limitation?

Erno Kuusela erno-news at erno.iki.fi
Thu Sep 21 14:48:49 EDT 2000


>>>>> "vbMark" == vbMark  <vbmark at my-deja.com> writes:

    vbMark> Someone told me that the reason Java is better than Python
    vbMark> for server- side CGI is because where Java uses one
    vbMark> process and creates threads for each user's access, Python
    vbMark> creates sperate processes for each user's CGI access. 

that would depend on what you mean with CGI. in the strict sense,
CGI means exactly that, starting a program to answer to a HTTP
request. You can see the CGI spec at <URL:http://hoohoo.ncsa.uiuc.edu/cgi/>.
so in this case it is not possible, by definition, to use
one long-running process in any implementation language.

however, if you mean running programs server-side in the general sense,
as in java servlets for java or mod_python/fastcgi/zope for python,
then yes, it is possbile with python just like java.

    vbMark> So using Python would greatly limit and perhaps crash a
    vbMark> server.

using CGI is actually the other way around; because in CGI each request
gets its own process, it is much harder to cause the web server
to crash. think of it like a operating system with weak/no memory
protection (eg. ms-dos, win9x, amigados) versus operating systems
with memory protection (unix, vms, winnt, etc).

CGI is slower though, so it dos limit you in the number of HTTP
requests you can handle in a given time :)

  -- erno



More information about the Python-list mailing list