[PEAK] Does a PEAK-ized webware esist ?

wayne at larsen.st wayne at larsen.st
Thu Jan 29 17:38:08 EST 2004


PEAK/Webware integration could be done in several ways -- however, this
proposal is not what I was thinking.  You appear to be proposing a way to
run webware from within the peak framework (ie as a CGI).  This was
opposite to my thinking, of wanting to embed peak components within
webware.

Let me ramble a bit and lay out my requirements and analysis, and maybe
Ian and Philip can set me straight.

I have a couple of existing web apps that are running under the Webware
framework right now (I am also using MiddleKit, FormKit, and Cheetah).  As
I was developing a third, I ran into a number of issues related to
component flexibility, reuse, and configuration -- at the same time, I
came across PEAK.  It's certainly a mind shift in thinking, and I am still
grasping at comprehension, but I do believe that there is a lot of
potential for improvement by integrating PEAK into my applications.  Going
through PEAK also led me to relook at ZopeX3, leaving me with three
potential options for moving forward:
1. Switch to Zope3
2. Work with peak.web
3. Integrate PEAK into Webware

So, backing up, what would I see as the perfect framework:
 - Webware style app server, with the mod_webkit adapter, so that the app
server can be run behind Apache for dynamic content
 - Utilize the PEAK config and component frameworks for allowing flexible
configuration of servlets.  Servlets in a directory tree should allow for
dynamic discovery and configuration, so that subdirectories can override
settings as required.
 - Handle all the default web services, such as session management,
cookies, log files, headers, already provided via Webware.
 - Enable reuse of my existing components, and enable pythonic development

So, while ZopeX3 looks to be a marked improvement over Zope2, and I would
like to understand it better, for now, let's ignore it and look at the two
other options - peak.web and Webware/PEAK integration.  It would be great
to see a non trivial application running within peak.web, as there are a
lot of things I do not understand about it.  I could not get the trivial
examples to  run right now with Zope3 CVS - however, even if I had that
running, as far as I can understand, there are a lot of things yet to be
decided and implemented.

Thus, I started looking at integrating PEAK and Webware.  To me, this
means doing the following:
1. - Convert the configuration system to use peak.config
2. - Make some of the main classes components
3. - Convert the UrlParser and ServletFactory components to launch the
servlets with the appropriate configuration root.

This last step is where I'm at right now - I would like to enable a
structure like:

ServletRoot/main.ini
ServletRoot/Site1/
ServletRoot/Site1/site.ini
ServletRoot/Site1/index.py
ServletRoot/Site1/page1.py
ServletRoot/Site1/subdir/resource.ini
ServletRoot/Site1/subdir/page2.py
ServletRoot/Site2/
ServletRoot/Site2/site.ini
ServletRoot/Site2/index.py
...

Looking at peak.ini, it appears that there is support for this style of
configuration file / path setup, but I have no idea how that would be
used.

A lot of open issues for me -- any comments?

Thanks,
Wayne





More information about the PEAK mailing list