Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSGi and application servers

I'm having trouble undrstanding the difference about both platforms? Both seem to offer an environment for deploying and managing applications. First I thought app servers use OSGi under the hood, I don't think so now but I see large AS (jboss, glassfish, websphere, etc) use OSGi. What's the big picture?

Thank you

like image 908
John Streets Avatar asked Sep 25 '12 12:09

John Streets


People also ask

What is an OSGi application?

The OSGi (Open Service Gateway Initiative) specification is a Java framework for developing and deploying modular software programs and libraries. The framework was originally managed by the OSGi Alliance, an open standards organization.

What is the point of OSGi?

What is OSGi? OSGi is meant to solve common class loading issues that are seen in traditional Java EE environments; it is a set of specifications that are used in the creation of jars with extra manifest information to define dependencies and class loading behavior.

What is OSGi in simple terms?

Simply said, OSGi is a dynamic module system for Java. It defines means to install, uninstall, update, start and stop modules. Those modules are called bundles, but are, in their simplest form, actually Java jar files with a special Manifest.

Is OSGi a Microservice?

OSGI is an application architecture, while microservices is a distributed systems concept. In my experience, microservices offer a number of benefits: Individual microservices are easy to deploy, test, and maintain. Microservices are language agnostic.


1 Answers

There is (to some extend) an overload of the term "application".

OSGi is a runtime environment (and development model) for modular Java applications. The term "application" in this case can be really, really low level. For example, an application server can be considered such an "application".

Application servers are also a runtime environment (and development model) for Java applications. However, the term "application" in this case typically refers to a higher level application type (eg., web applications). Application servers typically include a rich set of higher functionality and programming APIs for building web applications (Servlets), persisting data into databases (JPA) and clustering capabilities. Most application servers these days are composed of modules (eg., core, servlet engine, EJB container, etc.). Some application servers use OSGi under the covers. Others have their own modular runtime environment which also offers OSGi capabilities.

But it's also possible to develop higher level applications (such as web applications) directly using only OSGi runtime environment. However, an OSGi framework itself does not include any of the additional functionality. It has to be assembled yourself. There are some "distributions" that include a framework and several modules.

like image 106
Gunnar Avatar answered Oct 22 '22 21:10

Gunnar