Bubba88
Bubba88

Reputation: 1920

When should I use a platform like OSGI and when it must be avoided?

My question is pretty straightforward: What are the features of an application that force the developer to exploit OSGI-like system? What are the cases, when such a utility is unneeded?

Upvotes: 15

Views: 4395

Answers (3)

i000174
i000174

Reputation: 1267

OSGi was designed in the early 2000s to support use cases around embedded devices. With OSGi you can exchange bundles (manifested jars) in a java program without restarting the java process. This simple thing adds lots of flexibility and complexity.

It seems nowadays OSGi has lost its relevance, especially in the enterprise and cloud native world.

Upvotes: 1

Mirko Jahn
Mirko Jahn

Reputation: 1292

I just posted the following link to another question (What does OSGi solve), but I think here it is an even better fit. Hal Hildebrand wrote a blog about why and when he thinks OSGi is helping your development/product.

The core essence of the (pretty long) post is that it helps especially when dealing with long running, complex enterprise projects. In particular in the long run, the benefit of having an enforced structure will pay out, but read for yourselves

EDIT: fixed broken link.

Upvotes: 9

KLE
KLE

Reputation: 24159

Use OSGI if you want some of:

  • a very modular code structure (extreme case : each install has a different set of modules/plugins)
  • to start/stop/upgrade a module without stopping the rest of the application

Upvotes: 3

Related Questions