cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: Java components in blocks
Date Fri, 22 Apr 2005 13:34:48 GMT
Glen Ezkovich wrote:

> On Apr 18, 2005, at 12:07 PM, Daniel Fagerstrom wrote:
>
>> Glen Ezkovich wrote:
>>
>>> On Apr 18, 2005, at 7:05 AM, Daniel Fagerstrom wrote:
>>
<snip/>

>>> The issue here is one of deployment, where to locate the class and 
>>> which ClassLoader will load the class. It seems to me that if we 
>>> have two component deployment levels, global and sitemap, we can 
>>> pretty much accomplish the same thing as exposing or not exposing 
>>> components.
>>
>>
>> If all jars from all blocks are put in a global sitemap it just don't 
>> scale. It is hard enough to keep jars in different blocks in synch 
>> whithin the Cocoon SVN. When external developers start to develop and 
>> distribute their own blocks it will stop working.
>
>
> Agreed. Certain jars should be available cocoon wide and others not. 
> Unfortunately, this must be left up to the blocks developer to decide 
> how a particular jar gets deployed. Just as it is now.

One of the points with real blocks is to scale the community by make it 
possible for people to develop Cocoon blocks independent of ASF and the 
current set of committers and without central control. If these external 
block developers can put jars in an common unshielded area in Cocoon we 
will get the situation where they put different vesrions of the same jar 
in this common area. Sy that you have a system that depends on block A 
and block B developed by different external organizations. When you 
update Cocoon or block A or block B you suddenly realized that the last 
version have started to export a jar that it didn't exported before and 
that allready was exported from one of the other blocks in another version.

Pier allready have problems with this, that is one reason for his 
interest in this area. I have also have had problems with it from time 
to time.

So, I don't want to left it as a desicion to the blocks developers as it 
just don't scale. What Pier and I have suggested might be somewhat less 
powerfull, (but that is left to see), but it does scale. I don't want us 
to start with a contract with blocks developers that we have to restrict 
later, it is better to do it the other way around.

>> Because of that classloader isolation is needed so that a block only 
>> is exposed to the classes it actually depend on from its parent 
>> classloader. And that is complicated stuff, if you don't think so you 
>> can take a look at kernel in whiteboard.
>
> I know so. I didn't say it would be easy.

And I have no personal interest in solving that problem right now. If 
someone else has, just go ahead, as long as you don't introduce concepts 
that we allready know that they doesn't scale.

>> Things get more complicated and creates IMO unnecessary dependencies 
>> between blocks when you combine it with sitemap functionallity.
>
>
> How so? What is the alternative? Have blocks that have no component 
> dependencies? If a block depends on a component it depends on a 
> component. If a sitemap uses a component it uses a component.

Of course a block should be allowed to depend on and contain components, 
no one have said anything else. The discussion is about if a block 
should be able to expose any type of component to other blocks.

>> Because of that complexity Pier and I prefer to separate the problems.
>
>
> If you separate the problems thats fine with me, but to consider this 
> a complete solution to the total problem which is to have real blocks 
> is a mistake. When I deploy an app, I usually have a custom component 
> or two and a bunch of POJOs. If I want to package an app as a block I 
> would need to package the sitemap and associated files as a block and 
> package the jars as a bundle. A block at the very least should include 
> the bundle. As an app developer I want to have a single deployment 
> solution.  As a sys admin, I want to ensure that I don't have 30 
> copies of identical jars hanging around.

Packaging is a separate concern. Of course we want it as convenient as 
possible. Large units has the benefit that you get everything at once 
and the drawback that different complete packages might overlap and be 
redundant. But if we have automatic deployment it is probably more 
practicalt to have fine grained packaging. As long as the block you 
happen to be intersted in has a list of it dependencies the block 
deployer will take care of the work anyway.

> I understand that this is a complex problem and breaking it up into 
> smaller pieces is a wise thing to do. My basic points are that to have 
> real blocks you need a single deployment and that there are two levels 
> to deploy Java components, global and sitemap, parent sitemaps included.

I understand that you want two deployment levels. I don't want a global 
unshielded level as I'm certain that it doesn't scale.

> Initially, to have the choice of deploying Cocoon wide or sitemap wide 
> solves some basic issues. The ultimate solution is much more difficult 
> because of the multiple dependencies a block may have. It may be that 
> it is impossible to solve all possible scenarios. I don't know.

I think it would be possible to solve, but personally I don't find it 
worthwhile right now.

/Daniel


Mime
View raw message