Re: [Zope-dev] ZPublisher/ZServer interaction (was Re: A modest proposal)

2001-10-13 Thread Phillip J. Eby

At 10:23 AM 10/12/01 -0400, Paul Everitt wrote:

Wow, this is one hell of a thread. :^)

FWIW, Grisha put a Bobo publisher in mod_python a couple of years ago. 
Thus, if you like ZPublisher-style processing, you can do it in Apache via 
mod_python.

Personally, I prefer to keep a process boundary between Apache and my apps, 
for both safety and security.  Usually they're running as different users, 
for one thing.  We've been very pleased with FastCGI performance using 
mod_fcgi, so I don't see a whole lot to be gained by using mod_python.

Another interesting factor that can affect performance is that we usually 
run many pre-forked Apache child processes, but rarely have more than 2 or 
3 application processes.  Using mod_python would probably impact memory 
usage adversely, since there would then be in effect a larger application 
pool.

A somewhat simplistic analysis of memory usage in the different approaches:

O = Fixed application overhead (e.g. Python modules)
D = Application dynamic data
A = size of an Apache process
P = Memory used for a python interpreter (if the OS shares executable 
segments, ignore the code size, as it will be a constant for all approaches 
and thus irrelevant for comparison purposes.  In that case consider P will 
be the interpreter's data size)

n = Number of threads or processes in the app server pool
s = Number of Apache servers


Zope w/Apache frontend = P + O + D*n + A*s
mod_python = (P+O+D)*s   + A*s
ZLite  = (P+O+D)*n   + A*s

Since n is usually smaller than s, the ZLite approach uses considerably 
less memory than the mod_python approach, but can be faster than the 
Zope+Apache combination on multi-processor machines when the Python 
interpreter lock is an issue, at an extra cost of only (P+O)*(n-1).  In our 
situations, that usually amounts to at most 2 or 3 times P+O, which is a 
small price to pay for also being able to ignore all threading issues.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZPublisher/ZServer interaction (was Re: A modest proposal)

2001-10-13 Thread Paul Everitt


I don't know, there were quite a lot of ideas brought up.  It started 
with a discussion of Twisted being swappable for Medusa.  Since Itamar 
is a developer of Twisted, he should champion that effort (he knows a 
lot more Zope than any of us know Twisted).

There was also a discussion about replacing Medusa by embedding in 
Apache. While Michel said we had thought about it, that's about the 
extent: we've thought about it.  It isn't even scheduled for further 
thinking at this point.

I think the best thing is for some people that care deeply about this to 
go off and prototype a little bit and see what's involved.

--Paul

Andy McKay wrote:

 So did we at least get a fishbowl out of it?
 
 Cheers.
 --
   Andy McKay.
 
 
 - Original Message -
 From: Paul Everitt [EMAIL PROTECTED]
 To: Phillip J. Eby [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Friday, October 12, 2001 7:23 AM
 Subject: Re: [Zope-dev] ZPublisher/ZServer interaction (was Re: A modest
 proposal)
 
 
 
Wow, this is one hell of a thread. :^)

FWIW, Grisha put a Bobo publisher in mod_python a couple of years ago.
Thus, if you like ZPublisher-style processing, you can do it in Apache
via mod_python.

I outta contact him and see if he'd consider putting page templates in
mod_python.  Might be good for both page templates and mod_python.

--Paul

Phillip J. Eby wrote:


At 08:00 AM 10/10/01 -0700, kapil thangavelu wrote:


sadly the distinction between zpublisher and zserver is nowhere near as
clean, i spent some time looking at it this morning trying to get my
server
of choice using zope. i thought it would be a mid morning hack, but
the rabit
hole follows the class heirarchy deeper and deeper:).  all i have to
show for
my results is zope's output dumped to the server logs. its a start
though...

hopefully we get some new religion in the publisher, please...


Hmm...   Check out:

http://cvs.eby-sarna.com/pylib/ZLite/

Specifically, the ZPlumbing module, for several examples of ZPublisher
run loops using CGI and two different FastCGI modules.  I don't know
anything about Twisted, so I couldn't tell you how easy it'd be to use
the ZLite framework for this.

ZLite is the beginnings of my work on a Zope Lite distribution.  It's
sort of the Standalone ZODB distribution's evil twin - intended if you
want to use almost anything *but* the ZODB and ZMI parts of Zope.  That
is, when you just want the app server without the IDE and application
framework.  Architecturally, it's intended for multi-process, single
thread setups using Apache as a front-end, with FastCGI.

This shouldn't be considered an announcement or a release, btw.  The
code in CVS is production-hardened by years of service (many millions of
hits served), but is utterly without documentation, nor has everything
I've written been checked into CVS yet.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )


 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] ZPublisher/ZServer interaction (was Re: A modest proposal)

2001-10-10 Thread Phillip J. Eby

At 08:00 AM 10/10/01 -0700, kapil thangavelu wrote:

sadly the distinction between zpublisher and zserver is nowhere near as
clean, i spent some time looking at it this morning trying to get my server
of choice using zope. i thought it would be a mid morning hack, but the rabit
hole follows the class heirarchy deeper and deeper:).  all i have to show for
my results is zope's output dumped to the server logs. its a start though...

hopefully we get some new religion in the publisher, please...

Hmm...   Check out:

http://cvs.eby-sarna.com/pylib/ZLite/

Specifically, the ZPlumbing module, for several examples of ZPublisher run 
loops using CGI and two different FastCGI modules.  I don't know anything 
about Twisted, so I couldn't tell you how easy it'd be to use the ZLite 
framework for this.

ZLite is the beginnings of my work on a Zope Lite distribution.  It's 
sort of the Standalone ZODB distribution's evil twin - intended if you 
want to use almost anything *but* the ZODB and ZMI parts of Zope.  That is, 
when you just want the app server without the IDE and application 
framework.  Architecturally, it's intended for multi-process, single thread 
setups using Apache as a front-end, with FastCGI.

This shouldn't be considered an announcement or a release, btw.  The code 
in CVS is production-hardened by years of service (many millions of hits 
served), but is utterly without documentation, nor has everything I've 
written been checked into CVS yet.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )