[PEAK] peak web
Phillip J. Eby
pje at telecommunity.com
Fri Jan 30 11:46:48 EST 2004
At 10:24 AM 1/30/04 -0600, wayne at larsen.st wrote:
> >> In light of the recent peak-webware thread i took a quick look at peak
> >> web. Am i correct in understanding that peak.web is CGI only. i.e. no
> >> server?
> >
> > No, there is FastCGI support, either "simple" or with a sophisticated
> > preforking multiprocess FastCGI supervisor system. We use this in
> > production fronted by Apache, and it's pretty nifty. This itself has a
> > couple different modes...
>
>Do you mean to say you use peak.web in production? Or do you mean you use
>just FastCGI?
There is an interface, 'running.IRerunnableCGI' that is used for all of our
"containers". This interface is based on CGI, so it's easy to run it under
FastCGI, or inside a web server. In fact, it's the basis for a pre-PEP
being discussed on the Python Web-SIG, for a simple "web server gateway
interface" to allow different kinds of applications and frameworks to run
under different kinds of server environments.
The interface is flexible enough to run simplistic CGI applications, or
systems built with either Zope 2 or Zope X3. The production systems Ty
alluded to are built on Zope 2's ZPublisher. We use a simple wrapper
object that supports the 'IRerunnableCGI' interface and calls down to Zope
2's ZPublisher, in a way similar to the examples we showed here for
adapting Webware 'Application' objects to 'IRerunnableCGI'.
Once you have an object that implements 'IRerunnableCGI', you can run it in
any of the PEAK "web containers", including plain CGI, FastCGI, WSGIServer
(a BaseHTTPServer derivative), and the various "supervisor"
(peak.tools.supervisor package) modes. This means that right now we have
multiple ways we can run Zope 2, X3, CGI, and peak.web apps. These things
are all independent of 'peak.web' itself, which is just *one* application
framework that can be used in our "web containers".
The proposal I'm pushing on the Web-SIG is to create a PEP-ified version of
'IRerunnableCGI' as a DBAPI-like standard, so that other framework
developers can offer either their containers or their apps as components to
work with other folks' containers or apps.
More information about the PEAK
mailing list