tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Edwards <mike.edwards.inglen...@gmail.com>
Subject Re: Improving support for running in OSGi
Date Thu, 01 May 2008 10:25:25 GMT
Simon Laws wrote:
> On Thu, May 1, 2008 at 10:03 AM, Rajini Sivaram <
> rajinisivaram@googlemail.com> wrote:
> 
>> On 5/1/08, Jean-Sebastien Delfino <jsdelfino@apache.org> wrote:
>>> My 2c:
>>>
>>> +1 to promote OSGi to a first class Tuscany runtime environment
>>>
>>> +1 for an OSGi continuum build (thinking about a build profile that'll
>> run
>>> the Tuscany itest suite in an OSGi environment, similar to the profiles
>> we
>>> have for Web containers for example)
>>>
>>> Here's what I imagined we'd do:
>>> 1. add OSGi entries to each of our JAR manifests
>>> 2. have developers maintain them and pay attention to imports/exports
>>> 3. use the OSGi build to detect API and SPI import/export violations
>>> 4. find the best way to OSGi-enable 3rd party dependency JARs
>>>
>>> I realize that my suggestion [1] is not very popular and most people on
>>> this list would prefer to come up with bigger bundles grouping several
>> of
>>> our JARs/modules. I don't think that the 'bigger aggregate bundle'
>> approach
>>> will work, but I'll be happy to watch people try it :) if they  want to.
>>>
>>> With respect to [4] I find rather funny to see many projects out there
>>> claim OSGi enablement without having OSGified their 3rd party
>> dependencies.
>>> I wonder how that works, can an OSGi-enabled project really leverage the
>>> OSGi classloader isolation and versioning capabilities when 99% of the
>> JARs
>>> it requires are not OSGi bundles? I must be missing something... and I
>> hope
>>> we can do better in Tuscany with a real end-to-end OSGi enablement story
>> :)
>>> --
>>> Jean-Sebastien
>>>
>>
>> I agree with Sebastien's suggestions1-4. But I would like to suggest a
>> slight variation to the first suggestion.
>>
>>
>>   1. Use maven-bundle-plugin to introduce OSGi manifest entries into all
>>   the Tuscany modules, with auto-generated import/export statements.
>> Modify
>>   itest/osgi-tuscany to run these modules under OSGi, with all 3rd party
>> jars
>>   installed into OSGi using virtual bundles created on the fly.
>>
>> This step will provide a version of osgi-tuscany tests that is less prone
>> to
>> breakage than the one we have today. It will also help fix any remaining
>> classloading issues that we have left in Tuscany (and hopefully help
>> in maintaining the classloader isolation). This is not a big piece of work
>> since this is just bringing together the different pieces that we already
>> have. I will be happy to contribute the code towards this first step, so
>> others can concentrate on what we really want to achieve in terms of
>> modularity, distribution etc. We can also use this step to explore
>> versioning - in particular about having multiple extensions referring to
>> different versions of 3rd party libraries. This will be very useful for 4.
>>
>> Suggestions 2-3 are not requirements for OSGi, but these are clearly cases
>> where OSGi technology can help Tuscany improve modularity. If we want to
>> have explicitly hard-coded import/export statements in the modules to
>> enforce modularity, that can be introduced in step 2.
>>
>> And I would expect that there will be more work in terms of building the
>> distributions suitable for OSGi as well as non-OSGi after 1-4.
>>
>>
>>
>>
>> Thank you...
>>
>> Regards,
>>
>> Rajini
>>
> 
> Re. modularity, it strikes me that there is lack of consensus about whether
> big bundles or small bundles, relative to our maven modules,  are preferable
> but that there is consensus about using OSGi bundles to help us test and
> refine out modularity story.
> 
> So maybe we should agree to disregard the question about how big OSGi
> bundles should be relative to our maven modules and concentrate on the
> question about whether our maven modules are correctly factored. Using OSGi
> as a tool to help us with this of course.
> 
> Simon
> 
I support both Rajini's and Simon's points.  We can get the mechanics 
going first with the bundles following the existing grain of the modules 
- and we can discuss and tinker with the modules as we please later to 
find the best arrangements.

I suspect that the differing opinions about module size reflect 
different usecases.  Lots of small modules can promote great flexibility 
in the construction of runtimes, but at the expense of making it much 
harder for users to make sense of the options.  Larger modules cut down 
the options but make things easier for end users.


Yours,  Mike.

Mime
View raw message