Product installation (implicit vs. explicit)
I'm looking for opinions here.. The next major Zope 2 release and perhaps the next major Zope 3 release will support the loading of packages and (for Zope 2) Products from Python "Egg" files. See http://peak.telecommunity.com/ DevCenter/PythonEggs for an overview. This provides the following benefits: - A packaging pattern that includes standardized metadata which extends existing distutils patterns. - A mechanism to find "certain kinds" of packages (via egg "entry points"). This is important for Zope 2 because it means we can make the use of the Products package namespace optional.. Products needn't be installed into "Products" IOW. - Simpler installation (more than one product can exist in a single egg file). - Dependencies between "distributions" (different egg files) may exist within the standard metadata, and the egg loading machinery can detect whether a dependency is missing. - Egg products can be registered with online catalogs like Cheese Shop, etc very simply. A "spike solution" for egg support in Zope 2 in the form of a product named "Basket" (http://www.plope.com/software/Basket/Basket) already exists. By doing this, we know a lot more about what it will take to put egg support "in to the core". Currently, the Basket product makes the following important assumptions: - There should be no explicit installation step for eggs other than placing the egg on somewhere on Zope's PYTHONPATH. - Packagers can mark their distributions as "non-zip-safe", which causes Basket to automatically unpack the egg file into disk files in a cache directory when Zope starts. This is important for existing products that expect some of their data files to be on disk and not in the egg zipfile. The progenitor of Eggs (Phillip Eby) suggests that this is too implicit. He suggests instead that people who install packages should use a program which implicitly installs packages. The major difference between this and what happens in Basket currently is that packages would be that non-zip-safe packages would be "exploded" at installation time rather than at Zope startup time. The question is this: do you think there should be an explicit "install" step for egg packages/Products or do you think it should be possible to just put eggs on your PYTHONPATH (and perhaps adjust a config file with "requirements")?
Chris McDonough wrote:
I'm looking for opinions here..
The progenitor of Eggs (Phillip Eby) suggests that this is too implicit. He suggests instead that people who install packages should use a program which implicitly installs packages. The major difference between this and what happens in Basket currently is that packages would be that non-zip-safe packages would be "exploded" at installation time rather than at Zope startup time.
The question is this: do you think there should be an explicit "install" step for egg packages/Products or do you think it should be possible to just put eggs on your PYTHONPATH (and perhaps adjust a config file with "requirements")?
As you know, I have created an egg for CPS recently (http://blogs.nuxeo.com/sections/blogs/fermigier/2005_12_16_cps-lays-big-egg) The egg is big (12.3M) and exploding the egg at Zope on startup takes quite a long time (1 minute IIRC). But from a administration POW, I would prefer the implicit approach. Regarding the startup time problem, I would vote for a timestamping system (I don't even know if it's not the case already). S. -- Stéfane Fermigier, Tel: +33 (0)6 63 04 12 77 (mobile). Nuxeo Collaborative Portal Server: http://www.nuxeo.com/cps Gestion de contenu web / portail collaboratif / groupware / open source!
On Dec 22, 2005, at 9:16 AM, Stefane Fermigier wrote:
Chris McDonough wrote:
I'm looking for opinions here..
The progenitor of Eggs (Phillip Eby) suggests that this is too implicit. He suggests instead that people who install packages should use a program which implicitly installs packages. The major difference between this and what happens in Basket currently is that packages would be that non-zip-safe packages would be "exploded" at installation time rather than at Zope startup time.
The question is this: do you think there should be an explicit "install" step for egg packages/Products or do you think it should be possible to just put eggs on your PYTHONPATH (and perhaps adjust a config file with "requirements")?
As you know, I have created an egg for CPS recently (http://blogs.nuxeo.com/sections/blogs/fermigier/2005_12_16_cps- lays-big-egg)
Yes, this is cool! ;-)
The egg is big (12.3M) and exploding the egg at Zope on startup takes quite a long time (1 minute IIRC).
That's not too surprising. I guess we could make that faster by using an external zip program (not one written in Python). That said, if the package was "zip safe" it wouldn't need to be blasted apart of course.
But from a administration POW, I would prefer the implicit approach.
Regarding the startup time problem, I would vote for a timestamping system (I don't even know if it's not the case already).
There's one in there now as of Basket 0.2... - C
--On 22. Dezember 2005 09:09:02 -0500 Chris McDonough <chrism@plope.com> wrote:
The question is this: do you think there should be an explicit "install" step for egg packages/Products or do you think it should be possible to just put eggs on your PYTHONPATH (and perhaps adjust a config file with "requirements")?
I think the installation should be explicit. In Zope 3 you have to configure package/products through ZCML, in CMF/Plone you need to use the quickinstaller tool....so as Guido tought us: explicit is better than implicit :-) -aj
On Dec 22, 2005, at 9:20 AM, Andreas Jung wrote:
--On 22. Dezember 2005 09:09:02 -0500 Chris McDonough <chrism@plope.com> wrote:
The question is this: do you think there should be an explicit "install" step for egg packages/Products or do you think it should be possible to just put eggs on your PYTHONPATH (and perhaps adjust a config file with "requirements")?
I think the installation should be explicit. In Zope 3 you have to configure package/products through ZCML, in CMF/Plone you need to use the quickinstaller tool....so as Guido tought us: explicit is better than implicit :-)
I did forget to mention one thing... currently you can specify *which* products you want to activate at startup via a listing of "requirements" in a configuration file. This is another vector of explicitness unrelated to how the program got installed. - C
Chris McDonough wrote:
The question is this: do you think there should be an explicit "install" step for egg packages/Products or do you think it should be possible to just put eggs on your PYTHONPATH (and perhaps adjust a config file with "requirements")?
To be honest, the explicit'ness of an external egg install process irks me but I cannot really give a reason why (perhaps its just because I'm used to having Zope2 products "just work"). Also, with having to "install" eggs, how would this work with eggs that are actually directories (that are formed like egg zip files) and dealing with eggs from a development standpoint. Does this mean they would get copied some place? Or just that something would be registered into the zodb registering those eggs, etc... - Rocky -- Rocky Burt ServerZen Software -- http://www.serverzen.com ServerZen Hosting -- http://www.serverzenhosting.net News About The Server -- http://www.serverzen.net
On Dec 22, 2005, at 10:17 AM, Rocky Burt wrote:
Chris McDonough wrote:
The question is this: do you think there should be an explicit "install" step for egg packages/Products or do you think it should be possible to just put eggs on your PYTHONPATH (and perhaps adjust a config file with "requirements")?
To be honest, the explicit'ness of an external egg install process irks me but I cannot really give a reason why (perhaps its just because I'm used to having Zope2 products "just work").
What do Java people expect from jar files (I ask as a Java dope)? Do they have a more limited scope (no dependencies, for example?)
Also, with having to "install" eggs, how would this work with eggs that are actually directories (that are formed like egg zip files) and dealing with eggs from a development standpoint. Does this mean they would get copied some place? Or just that something would be registered into the zodb registering those eggs, etc...
I doubt anything would go into the ZODB; other than that I'm not sure. Whatever got created would almost certainly be based on Phillip's "easy_install" program which is documented at http:// peak.telecommunity.com/DevCenter/EasyInstall . - C
--On 22. Dezember 2005 10:46:42 -0500 Chris McDonough <chrism@plope.com> wrote:
What do Java people expect from jar files (I ask as a Java dope)? Do they have a more limited scope (no dependencies, for example?)
Jar files have no dependencies. -aj
On 12/22/05, Andreas Jung <lists@andreas-jung.com> wrote:
Jar files have no dependencies.
Well, I know you know what you mean here, but I'll elaborate since the kids haven't started fighting yet this morning. :-) Jar files don't have dependency metadata. They're pretty much equivalent to zipped Python libraries. Python Eggs take the next step by adding the dependency information and other interesting bits in the support infrastructure. I'm sure there's a Java equivalent (or several), but I've not heard of it. -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> "There is no wealth but life." --John Ruskin
Fred Drake wrote:
On 12/22/05, Andreas Jung <lists@andreas-jung.com> wrote:
Jar files have no dependencies.
Well, I know you know what you mean here, but I'll elaborate since the kids haven't started fighting yet this morning. :-)
Jar files don't have dependency metadata. They're pretty much equivalent to zipped Python libraries. Python Eggs take the next step by adding the dependency information and other interesting bits in the support infrastructure. I'm sure there's a Java equivalent (or several), but I've not heard of it.
There is one, and it is a very powerful and mature. Or so I have been told by my good friend and coworker Eric Barroca. It's called OSGi (http://www.osgi.org/) It is used for set top boxes applications provisionning, as well as for assembling components in the Eclipse platform (including Eclipse RCP) which, according to another good friend and coworker (Julien Anguenot) shares some similarities with the Zope 3 component architecture. http://www.research.ibm.com/journal/sj/442/gruber.pdf http://www.eclipse.org/org/press-release/20051011osgi.htm S. -- Stéfane Fermigier, Tel: +33 (0)6 63 04 12 77 (mobile). Nuxeo Collaborative Portal Server: http://www.nuxeo.com/cps Gestion de contenu web / portail collaboratif / groupware / open source!
Chris McDonough wrote:
What do Java people expect from jar files (I ask as a Java dope)? Do they have a more limited scope (no dependencies, for example?)
Coming from a heavy java/j2ee background I can say that people in java-land expect to place jar's on the java classpath (equivalent of pythonpath) and they "just work" with regard to showing up on the classpath. Taking this one step further, a Zope2 product egg would be closer to a J2EE ear (Enterprise ARchive) file rather than a Java jar file. An ear file is basically a jar file with extra metadata stating that it follows the appropriate conventions for j2ee deployment (basically instructions on which parts of the ear file are for ejb management, more for web file management, etc). Now the best question is, do ear files get automatically configured and installed by a j2ee server? Answer: It depends. This is comppletely up to the j2ee server implementation. Orion and JBoss for example (full j2ee implementations) have a special directory where you can simply drop ear files and they get automatically get picked up by the server and deployed as applications/components. But, having said that, I know for a fact that the "preferred" manner to configure an ear file with Orion is to do it explicitly in Orion's xml configuration files. Hopefully that sheds some light. Regarding dependencies, no, jar/war/ear files (java's zip file types) do not have dependency configuration although they do have the ability to use something else if it exists (you can specify a Class-Path argument in the manifest file). - Rocky -- Rocky Burt ServerZen Software -- http://www.serverzen.com ServerZen Hosting -- http://www.serverzenhosting.net News About The Server -- http://www.serverzen.net
participants (5)
-
Andreas Jung -
Chris McDonough -
Fred Drake -
Rocky Burt -
Stefane Fermigier