Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
Sidnei da Silva wrote: What I think is that the Zope ZConfig schema should have something just like 'package-includes' is for ZCML. A place where you can drop a snippet of ZConfig schema and it will get picked up at boot time. Try having a play with MailingLogger in Zope 2. Both the .conf and schema files have import commands... All you really need is a generic multisection that you can implement when you need to. I've wished Zope 2 had this on several occassions... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
Dieter Maurer wrote: Stephan Richter wrote at 2006-1-26 10:16 -0500: but ZCML meta directives and schemas are so easy to use. I do not yet know ZCML... In my experience it is indeed fairly easy to extend ZCML; it's a pretty nice system that way. When I have read your book I was scared away from ZCML by the amount of namespaces and directives -- In practice I find myself using about 2 namespaces even large applications -- zope and browser. Five adds a third namespace, 'five'. There are indeed too many directives. in addition that I do not like the XML hype (that part that seems to imply that as soon as something is XML it is also easy and well understood). I don't think anyone in the Zope 3 world is claiming this about ZCML, right? I think the current world with XML is somewhat better than what was there before, which was (more or less) complete chaos in ways to spell formats. The current world is far from perfect though. :) XML is definitely not automatically going to make something easy or well understood, though. Regards, Martijn ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
Jim Fulton wrote: Also, on a related note, I've been somewhat impressed lately with the way people have been able to twist ConfigParser beyond its apparent capabilities in both Paste Deploy and in our prototype buildout system. In particular, we've been able to create hierarchical sections by introducing the equivalent of path separators in section names. Interestingly a proposal has been made on python-dev to replace/supplement ConfigParser with ConfigObject. The message summarizes its features and benefits: http://mail.python.org/pipermail/python-dev/2006-January/060138.html. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
Sidnei da Silva wrote: On Wed, Jan 25, 2006 at 05:28:14PM -0500, Jim Fulton wrote: | There are a bunch of issues to be resolved, like the fact that it's | not possible to access the initial ZConfig options object because it's | thrown away, so, in order of priority: | | 1. It's not possible to find where the INSTANCE_HOME is. | | Why is this necessary? So the config file for paste.deploy can be in INSTANCE_HOME/etc/paste.ini Hm. I don't have the time to think hard about this right now, but I suspect the model you are following isn't quite right. Rather than implicitly looking for a paste file in a magic location, I suspect that you should name the paste file in your ZConfig file or possibly extend the ZConfig schema with components that reproduce what's normally found in a paste config file (app definitions, server definitions, etc.). Of course, either of these options requires updating the ZConfig schema which is a real pain, so I can understand why you wouldn't want to do that. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
On Thu, Jan 26, 2006 at 06:30:02AM -0500, Jim Fulton wrote: | Sidnei da Silva wrote: | On Wed, Jan 25, 2006 at 05:28:14PM -0500, Jim Fulton wrote: | | There are a bunch of issues to be resolved, like the fact that it's | | not possible to access the initial ZConfig options object because it's | | thrown away, so, in order of priority: | | | | 1. It's not possible to find where the INSTANCE_HOME is. | | | | Why is this necessary? | | So the config file for paste.deploy can be in INSTANCE_HOME/etc/paste.ini | | Hm. I don't have the time to think hard about this right now, | but I suspect the model you are following isn't quite right. Rather than | implicitly looking for a paste file in a magic location, I suspect that you | should name the paste file in your ZConfig file or possibly extend the | ZConfig | schema with components that reproduce what's normally found in a paste | config | file (app definitions, server definitions, etc.). Of course, either of | these | options requires updating the ZConfig schema which is a real pain, so I can | understand why you wouldn't want to do that. And you're right to the point. My original intention was to put the config file location in the ZConfig schema, but that's *wy* too painful right now. OTOH, it does seem to work pretty reasonably right now to serve as a prototype. I have other concerns than if the config file location is magic or not at the moment. I mean, it's probably better that it's hardcoded to 'INSTANCE/etc/paste.ini' than configurable at this point. I don't think one would need *more than one* paste.deploy configuration file anyway, so changing it's name would be pretty pointless. I think we can slowly progress from here, solving the ZConfig problem, then the server-type-always-takes-db-argument and eventually end up with zope.paste in the main tree and having the default wsgi server be configured using paste.deploy. BTW, I've updated the README.txt to include a more extensive description of how to use it right now: http://svn.zope.org/zope.paste/trunk/README.txt?rev=41449view=markup Thoughts? -- Sidnei da Silva Enfold Systems, LLC. http://enfoldsystems.com ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
Stephan Richter wrote at 2006-1-26 10:16 -0500: On Thursday 26 January 2006 10:04, Jim Fulton wrote: Every change I've ever been involved with has been extremely painful. I can't even explain well what made it painful because I didn't really understand what was going on and needed help from Fred. Maybe someone would make the same comment about ZCML, although I've had a lot of positive feedback on the ZCML extension mechanisms. shrug/ Extending ZConfig is tough Chris and me find it easy... but ZCML meta directives and schemas are so easy to use. I do not yet know ZCML... When I have read your book I was scared away from ZCML by the amount of namespaces and directives -- in addition that I do not like the XML hype (that part that seems to imply that as soon as something is XML it is also easy and well understood). -- Dieter ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
Jim Fulton wrote: [snip] I think that the way the server and app are integrated needs to be rethought. I think we need to look at how to leverage Paste Deploy in Zope. I hate to mention this with all of the discussion about ZConfig, but we should probably consider using PasteDeploy as an alternative to ZConfig. (Jim ducks.) Alternative, we should redo the Zope 3 ZConfig schema to work with the Paste Deploy APIs. Obviously, if we do the later, I'd prefer to do so after we've decided how we're going to reimplement ZConfig. In the short term, you might try teasing out the app and server from Zope and see if you could wire them up with Paste Deploy. Just dropping in randomly to add a +1 on investigating Paste Deploy for Zope 3. Granted, it still mystifies me, but I'm starting to sense a common system for deploying web applications in there, and it might be yet another piece of the web application puzzle that Zope doesn't need to be concerned with anymore in the future, or at least it will be a piece of the puzzle that can be shared with other projects. Regards, Martijn ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
Martijn Faassen wrote: Jim Fulton wrote: [snip] I think that the way the server and app are integrated needs to be rethought. I think we need to look at how to leverage Paste Deploy in Zope. I hate to mention this with all of the discussion about ZConfig, but we should probably consider using PasteDeploy as an alternative to ZConfig. (Jim ducks.) Alternative, we should redo the Zope 3 ZConfig schema to work with the Paste Deploy APIs. Obviously, if we do the later, I'd prefer to do so after we've decided how we're going to reimplement ZConfig. In the short term, you might try teasing out the app and server from Zope and see if you could wire them up with Paste Deploy. Just dropping in randomly to add a +1 on investigating Paste Deploy for Zope 3. Granted, it still mystifies me, but I'm starting to sense a common system for deploying web applications in there, and it might be yet another piece of the web application puzzle that Zope doesn't need to be concerned with anymore in the future, or at least it will be a piece of the puzzle that can be shared with other projects. Yup. I'll note: - Paste deploy is still pretty young - It certainly isn't powerful enough to deal with everything we currently deal with in ZConfig. Fir example, it only deals with HTTP servers, because that's all WSGI deals with. Nevertheless, it is something we should work with. At a minimum, Zope should work with Paste Deploy and apps designed to work with Paste Deploy should work with Zope. Also, on a related note, I've been somewhat impressed lately with the way people have been able to twist ConfigParser beyond its apparent capabilities in both Paste Deploy and in our prototype buildout system. In particular, we've been able to create hierarchical sections by introducing the equivalent of path separators in section names. Another interesting contrast between ConfigParser and both ZCML and ZConfig is that in ZCML and ZConfig, much processing is perfomed as the file is parsed. This means that the meta configuration (or ZConfig schema or components) has to be able to handle everything in an input file. In ConfigParser processing is typically performed when data are pulled from the file. This makes it easier for a file to contain information for multiple applications and have an application extract just the information it needs. This was an unrealized goal of ZConfig. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
On Tue, Jan 24, 2006 at 05:15:43PM -0500, Jim Fulton wrote: | Any thoughts? | | I think that the way the server and app are integrated needs to be | rethought. | | I think we need to look at how to leverage Paste Deploy in Zope. | | I hate to mention this with all of the discussion about ZConfig, but we | should | probably consider using PasteDeploy as an alternative to ZConfig. (Jim | ducks.) | Alternative, we should redo the Zope 3 ZConfig schema to work with the | Paste Deploy | APIs. Obviously, if we do the later, I'd prefer to do so after we've | decided how | we're going to reimplement ZConfig. | | In the short term, you might try teasing out the app and server from Zope | and see if you could wire them up with Paste Deploy. Alright, I had a first stab at it, and managed to get Zope 3's WSGIPublisherApplication wired as a WSGI application using Paste Deploy. The result of this has been imported into: http://svn.zope.org/zope.paste/trunk/ There are a bunch of issues to be resolved, like the fact that it's not possible to access the initial ZConfig options object because it's thrown away, so, in order of priority: 1. It's not possible to find where the INSTANCE_HOME is. 2. It's not possible to access the configured root database, I've worked around this by using a event subscriber and some sort of monkeypatching. 3. Zope's servers assume that all 'IServerType' utilities accept a 'db' argument. It should be optional. Other than that, I will be experimenting with hooking additional filters to be applied, for example: http://www.decafbad.com/2005/07/xmlwiki/lib/xmlwiki/xslfilter.py -- Sidnei da Silva Enfold Systems, LLC. http://enfoldsystems.com ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
On Wed, Jan 25, 2006 at 05:28:14PM -0500, Jim Fulton wrote: | There are a bunch of issues to be resolved, like the fact that it's | not possible to access the initial ZConfig options object because it's | thrown away, so, in order of priority: | | 1. It's not possible to find where the INSTANCE_HOME is. | | Why is this necessary? So the config file for paste.deploy can be in INSTANCE_HOME/etc/paste.ini | 2. It's not possible to access the configured root database, I've |worked around this by using a event subscriber and some sort of |monkeypatching. | | In a normal Zope install, the defined databases are registered as utilities. Humm.. couldn't find that. Will try looking harder. | | 3. Zope's servers assume that all 'IServerType' utilities accept a |'db' argument. It should be optional. | | This whole mechanism needs to be rethought in light of WSGI and Paste | Deploy. I believe you :) | Other than that, I will be experimenting with hooking additional | filters to be applied, for example: | http://www.decafbad.com/2005/07/xmlwiki/lib/xmlwiki/xslfilter.py | | Cool. Oh, btw. I've got that to work. It's neat. -- Sidnei da Silva Enfold Systems, LLC. http://enfoldsystems.com ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+
Sidnei da Silva wrote: Hello, I'm refactoring a application developed for Zope 3.0, and in the proccess of doing that, one of the things I wanted to do is to remove some hardcoded xslt pipeline and instead use a WSGI 'middleware' or 'filter'. Cool So.. I was planning to use paste.deploy to put this together. However it seems like currently I would have to define a different IServerType utility just to hook up a different WSGI application up to Zope 3. Has anyone put some thought about how to do this? A little. Ideally, I would like to see the WSGI application to be used to be given as a parameter to the server directive of zope.conf, maybe that does deserve a new wsgi-server directive. Any thoughts? I think that the way the server and app are integrated needs to be rethought. I think we need to look at how to leverage Paste Deploy in Zope. I hate to mention this with all of the discussion about ZConfig, but we should probably consider using PasteDeploy as an alternative to ZConfig. (Jim ducks.) Alternative, we should redo the Zope 3 ZConfig schema to work with the Paste Deploy APIs. Obviously, if we do the later, I'd prefer to do so after we've decided how we're going to reimplement ZConfig. In the short term, you might try teasing out the app and server from Zope and see if you could wire them up with Paste Deploy. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com