Python and Zope

Tim Hammerquist tim at vegeta.ath.cx
Sun Sep 9 16:31:32 EDT 2001


Me parece que Oleg Broytmann <phd at phd.pp.ru> dijo:
> On Sun, Sep 09, 2001 at 07:28:27AM +0000, Tim Hammerquist wrote:
> > >    Benefits of Zope vs mod_*:
> > > 
> > > 1. It is a server, not a CGI - it is always in memory, it does not forks
> > > for ervery request (speed).
> > 
> > How does this differ from mod_*?  mod_* are not servers in themselves,
> > but they are compiled into the server, so they are not CGI.  They do not
> > fork for URIs handled by a mod_* handler.  Apache retains all CGI
> > capability at the same time.
> 
>    Apache modules are just CGIs.

http://www.w3c.org/CGI/

http://hoohoo.ncsa.uiuc.edu/cgi/intro.html

Make sure you know what CGI is.  CGI is _not_ anything that spawns
another process.

Zope can ride on top of an Apache server using mod_pcgi, described at
the URL below.  Does this mean that each request to the Zope server is a
separate process: no.
    http://www.zope.org/Documentation/Guides/ZAG-HTML/ZAG.4.html

> Apache forks off a child at random, and at
> random kills children.

Random.  Hmm.  Mine creates 10 children at startup and never has any
less than 8.  Each child process is killed after 100 requests to keep
potential memory leaks under control.  Each child process has access to
any mod_* module compiled/linked in because, well, they are servers.
Each is just as capable as its parent except that children run as a
separate user (usually "nobody") for security purposes. Zope does the
same, at least on *nix systems.

This doesn't look random.  Nor are these children that Apache "randomly"
kills the Apache modules.

> On the other hand, web-application server is always in memory. This
> allows for the server to create persistence connection to a DB.  
> How can you implement persistence connection in Apache module? Those
> "solutions" that are in mod_perl and mod_python are (in my not so humble
> opinion) just unstable hacks.

This sounds like the cry of the PHP man circa a few years ago.

I don't doubt that Zope make a very nice environment for web site dev,
but as a "web-application server," it is doing the same job that ASP and
ColdFusion did...they just chose a better language.  I had no problem
with ASP...once Perl and Python put out their ActiveX engines; and
ColdFusion lacked in elegance anything it gained in power.

I risk a flame war with this, but there are too many buzzwords being
thrown around in this thread to just generalize an entire server
architecture as "CGI" or "random."  Zope may very well be the best at
what it does, but let's just make sure we _know_ what it does.

-- 
The two surviving chocolate people copulate desperately, losing
themselves in a melting frenzy of lust, spending the last of their
brief, borrowed lives in a spasm of raspberry cream and fear.
    -- Narrator, The Sandman



More information about the Python-list mailing list