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

Eckart Hertzler eckart at hertzler.de
Mon Nov 15 04:46:53 EST 2004


The reason for using zope.app.main.setup in README was to be able 
to additionally startup a zope ftp server if I wanted.

Surely this should be possible, even if zope is used as a WSGI application ?


On Sunday 14 November 2004 21:40, Phillip J. Eby is believed to have said:
> 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?
> 
I think the ftp server also uses the accesslog
The eventlog should also be enabled, I think.

> 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.)
> 
As far as I can see, in addition to the DatabaseOpened event there is also
the ProcessStarted event, which seems to be used only by zope.app.module.


> 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.
> 
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub: http://mail.zope.org/mailman/options/zope3-dev/eckart%40hertzler.de
> 
> 


More information about the Zope3-dev mailing list