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 get used
for all Zope 3 instances?


zope.app.server.main

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 [1], 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"

+1

- refactor so that as much code as possbile is shared between zope.app.twisted.main and zope.app.server.main

+1

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

+1

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).


[1] http://mail.zope.org/pipermail/zope3-dev/2007-January/021627.html
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to