[Zope3-dev] zope.app.wsgi + zope.app.server.main

Phillip J. Eby pje at telecommunity.com
Sun Nov 14 15:40:14 EST 2004


At 02:54 PM 11/14/04 -0500, Jim Fulton wrote:
>Phillip J. Eby wrote:
>>Indeed, looking some more at zope.app.server.main, it seems that the 
>>'debug()' function is actually what's needed.  IOW, it seems that instead of:
>>     db = setup(load_options(args))
>>the correct thing to do would be:
>>     db = debug(args)
>>If I may suggest a change, perhaps the 'debug' function might be renamed 
>>(or aliased) as 'serverless_startup' or something similar, since telling 
>>people to use 'debug' might be a bit weird.
>
>That is weird.  This looks like some kind of decoy.  It's not
>used AFAICT.  I'd like to ask Fred is he knows what this is about.
>
>Whatever, something like this should probably be available in appsetup.

It looks like there would need to be two configuration variables, then: the 
site config, and the database, and then one would do:

     from zope.app.appsetup import config.database

     config(SITE_CONFIG)
     db = database(DATABASE)

but it's not immediately clear to me that this addresses all of Zope's 
startup requirements.  For example, what about logging 
configuration?  Presumably an access log isn't needed, but are there other 
logs configured from the server-level configuration?

Also, might developers rely on things like the process startup 
events?  This could get really hairy if people rely on things that might 
not be relevant to a given WSGI server.  (I'm assuming here that some 
component might be registered for such an event via the site ZCML files.)

Anyway, it seems there needs to be a definition of how you define a Zope 
application instance, and what its initial configuration is, and it needs 
to be distinct from Zope-the-webserver.



More information about the Zope3-dev mailing list