I recently had a chance to give a presentation about OSGi on Liferay 7 at the Chicago Liferay User Group as OSGi is proven to help build, package and maintain robust API’s for Java based Enterprise software components running in the Cloud or On Premise. Attenders included architects, BAs and developers from different companies across the Chicago area. Some of the questions asked during my presentation were what are the benefits of using OSGi platform and what are the key problems that OSGi can solve specifically.
Benefits of OSGi for Developers:
OSGi reduces complexity by providing a modular architecture for today’s large-scale distributed systems as well as small, embedded applications. Building systems from in-house and off-the-shelf modules significantly reduces complexity and thus development and maintenance expenses. The OSGi programming model realizes the promise of component-based systems.
Benefits of OSGi for Business:
The OSGi modular and dynamic model reduces operational costs and integrates multiple devices in a networked environment, tackling costly application development, maintenance and remote service management.
In general OSGi address the following key issues which are applicable on any Java Enterprise level application looking to build robust middle tier frameworks for separating backend services from the view layer:-
- Versioning and reuse – Provides package level versioning policy as opposed to bundle level versioning.
- Dynamic updates (Class Loading) – OSGi modules can be started, stopped and updated dynamically and independently.
- Reduced complexity– Correctly sized modules will implement a single functionality thus applications will be easier to manage, test and fix bugs.
- Transparency – Through OSGi console you can access internal details of any deployed modules. Things like registered services, services in use and structure of the MANIFEST file for your deployed bundles.
You can visit this link https://github.com/dmoshi/liferay/wiki to see a sample architecture and implementation that I wrote to leverage these benefits using Liferay Portal v7-milestone.