• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

OSGi In Action - Questions

 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Authors,

I have not heard of OSGi so far. Had been browsing the threads here and somehow could get that OSGI is a platform for addressing the modularity issues in Java based applications.

1. Is that modularity in terms of packaging alone? or anything else?

2. Conceptually, how does the OSGi work?

3. Would there be any issues with scalability of my Java application? If so how do I address them?

Thanks,
Raghavan alias Saravanan M
 
author
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Raghavan Muthu wrote:
I have not heard of OSGi so far. Had been browsing the threads here and somehow could get that OSGI is a platform for addressing the modularity issues in Java based applications.

1. Is that modularity in terms of packaging alone? or anything else?



There is physical modularity in the sense that OSGi defines a packaging format (just a JAR file with some extra info inside) that is used for deployment. Logical modularity is created through another level of encapsulation where the visibility/exposure of code is completely controlled by the module itself. Dynamic module lifecycle management is supported (i.e., install, update, uninstall, etc). Lastly, an interface-based programming model (i.e., services) is promoted for loosely coupled collaboration among modules.

Raghavan Muthu wrote:
2. Conceptually, how does the OSGi work?



It uses a class loader per module to create and enforce modularity.

Raghavan Muthu wrote:
3. Would there be any issues with scalability of my Java application? If so how do I address them?



Depends on what sort of scalability. There isn't too much overhead associated with OSGi at execution time, so it should be an issue there. The biggest issue probably relates to the number of modules in a system, but I think most OSGi frameworks could easily handle 100s if not 1000s of modules without too much difficulty.
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Richard for the answers. It is clear now!
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Richard S. Hall wrote:

Raghavan Muthu wrote:

Raghavan Muthu wrote:
3. Would there be any issues with scalability of my Java application? If so how do I address them?



Depends on what sort of scalability. There isn't too much overhead associated with OSGi at execution time, so it should be an issue there. The biggest issue probably relates to the number of modules in a system, but I think most OSGi frameworks could easily handle 100s if not 1000s of modules without too much difficulty.



Currently I use Felix, Karaf, and Camel to manage a system that processes millions of files of data a day. In that real-world application, I found it necessary to break out the major functional pieces of the system and run them in seperate OSGi instances, communicating via JMS. While the issues of scalability were created by our java code, breaking the pieces into seperate VM's works well to handle scalability issues. Oh, and we're running ~170 bundles in each OSGi instance.

Again, Felix + Karaf + Camel (2.5.0+) is a great way to go for back-end processing applications.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic