On 2 Feb 2007, at 11:08 , Chris Withers wrote:
Philipp von Weitershausen wrote:
Chris Withers wrote:
Stephan Richter wrote:
On Thursday 01 February 2007 02:42, Chris Withers wrote:
Is there a non-twisted main.py of does zope.app.twisted.main
for all Zope 3 instances?
How do you switch between the two?
mkzopeinstance creates a twisted instance
mkzopeinstance --zserver creates a zope.server instance
Surely this should be an option in zope.conf, not hard-wired into
the runzope script?
As Jim pointed out in an earlier discussion , we would rather like
to separate server configuration from the application definition
(ZODB, logs, etc.).
Would anyone object if I did some experimental work on a branch to:
- make twisted/zserver interchangeable through a zope.conf setting
Like Jim, I would rather like to see (at least the HTTP) server
definition thru something that's more general, such as paste.deploy.
- making zodb "optional"
- refactor so that as much code as possbile is shared between
zope.app.twisted.main and zope.app.server.main
I'd say that this should result in a general main() program that
*can* (but doesn't have to) read the application definition from a
zope.conf file, and does server setup (at least HTTP) through a
general framework like paste.deploy. I would assume that this also
results in a separate configuration file for paste.
- explore ways of seperating some of the publication concerns
For one, I suggest factoring the whole root object issue out of the
publication (e.g. introduce an IRootObjectFactory utility that, when
called, will return the root object; the main() program, if it has a
zodb configuration, would register such a factory that would talk to
the DB; others could do SQL or whatever).
Zope3-dev mailing list