• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OSGi In Action - Questions

 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Richard S. Hall
author
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • 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: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Richard for the answers. It is clear now!
 
Mike Van
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic