[Zope3-dev] zope.app.wsgi + zope.app.server.main
Phillip J. Eby
pje at telecommunity.com
Sat Nov 13 13:45:48 EST 2004
Just a question here... it seems to me that the approach recommended in
the zope.app.wsgi README for starting a server may be incorrect. It
recommends using zope.app.server.main.setup(), but this creates a
ThreadedTaskDispatcher, as well as possibly creating servers.
This seems wrong for a WSGI application, which is not a web
server. 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.
By the way, there is currently an active discussion on the Web-SIG
regarding deployment configuration for WSGI applications; I hope that we
will soon have a concrete recommendation for how to have a server tell a
WSGI application where to get its configuration file(s) from. This would
allow us to add a bit more code to zope.app.wsgi, and then be able to
deploy Zope applications in deployment-ready WSGI servers without requiring
the user to write a startup script at all.
More information about the Zope3-dev
mailing list