aspose file tools*
The moose likes Other Application Frameworks and the fly likes Few questions on OSGi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Few questions on OSGi" Watch "Few questions on OSGi" New topic
Author

Few questions on OSGi

Raymond Tong
Ranch Hand

Joined: Aug 15, 2010
Posts: 230
    
    2

Hi,

I have some questions regarding OSGi.

For the book OSGi in Depth
1) Would there be case study on application adopting OSGi that made a difference?
2) Any downside of OSGi? (e.g. performance overhead)?

For OSGi in general
1) Other JVM languages are getting more popular, how do you see a mix of OSGi with others (e.g. Scala, Groovy)?
2) Does Java version matter? (e.g. works better on Java 7)

Thanks
Alexandre Castro Alves
author
Greenhorn

Joined: Aug 22, 2011
Posts: 7
Hi,

Regarding your questions:

| 1) Would there be case study on application adopting OSGi that made a difference?

Yes, in the book we follow through an 'auction application' case-study showing how moving to OSGi (a) makes the application more flexible and therefore easier to add features to it, (b) makes it more robust and thus avoids having us to change large parts of the application even though new features have been added.

In a nutshell though, the larger value is that OSGi makes it easier for you to create applications that act as frameworks in the sense that they are flexible and modular from the very beginning.

| (2) Any downside of OSGi? (e.g. performance overhead)?

I don't particularly address downsides, but rather point to pitfalls, one of which is the initial complexity of designing modular applications.

| 3) Other JVM languages are getting more popular, how do you see a mix of OSGi with others (e.g. Scala, Groovy)?

Due to the fact that the OSGi framework and its services are modular, factoring in other languages is not a problem. For example, OSGi is in the process of 'defining' a command-line shell for its own management which is based upon a dynamic language as opposed to plain Java.

| 4) Does Java version matter? (e.g. works better on Java 7)

Not particularly, the only caveat is regarding the usage of generics.
OSGi v4.2 does not rely on generics, however v4.3 does use it.



OSGi in Depth
A World of Events
Sujoy Choudhury
Ranch Hand

Joined: Sep 17, 2008
Posts: 136

4) Does Java version matter? (e.g. works better on Java 7)

Not particularly, the only caveat is regarding the usage of generics.
OSGi v4.2 does not rely on generics, however v4.3 does use it.


Does that mean it internally uses Java libraries?


Thanks and Regards,
~Sujoy
Raymond Tong
Ranch Hand

Joined: Aug 15, 2010
Posts: 230
    
    2

Hi Alexandre,

Thanks for you answer.

OSGi seems not easier to learn but is interesting.
Raja Pal
Ranch Hand

Joined: Jul 12, 2004
Posts: 92
Hi Alexandre,

Any particular reason why you mentioned Java v4.3 here in your answer to Raymond? Also I did not understand how being a modular framework itself and borrowing from several dynamic programming platforms, OSGi makes modular design difficult. Colud you please elaborate/illustrate? (I am a designer/architect but new to OSGi).


Java Pal - Your friend in technology and innovation...India.
Alexandre Castro Alves
author
Greenhorn

Joined: Aug 22, 2011
Posts: 7
Sujoy,

The point I wanted to make was that OSGi v4.3 uses generics in its interface (i.e. OSGi framework API), therefore if you are planning on using this version, it is advisable to use a Java version that likewise supports generics. If you are planning on using OSGi v4.2, then you can use an older version of the Java SDK without any loss.

Hi Raja,

Sorry for not being clear, but I meant OSGi v4.3 and not the Java SDK version.

| Also I did not understand how being a modular framework itself and borrowing from several dynamic programming platforms, OSGi makes modular design difficult.

Again, what I meant is that offhand spending time properly designing for modularity demands a higher upfront cost; this is true for any technology, and not specifically related to OSGi. In fact, I would say OSGi as a tool makes it easier to design for modularity as it makes you think about it and enforces it from the very beginning.

Hope this helps,
Alex

 
Consider Paul's rocket mass heater.
 
subject: Few questions on OSGi