InfoQ

News

Catching up with Apache Felix OSGi Container

Posted by Srini Penchikala on Dec 10, 2007 04:00 PM

Community
Java
Topics
Deployment / Datacenter
Tags
Deployment,
OSGi
Felix is the Apache implementation of OSGi Release 4 specification. OSGi is a specification of a Java based service platform targeted for use by systems that require long running times, dynamic updates, and minimal disruptions to the running environment. A number of companies have been using OSGi to create micro-kernal & plugin architectures to enable good modularizatoin and dynamic assembly at run time, including Eclipse IDE, which was the first major project to adopt OSGi technology. Several other projects such as Apache Directory, Geronimo, Jackrabbit, Spring, and JOnAS are also moving towards the same adoption.

Richard Hall, one of the project committers, did a presentation on Apache Felix project at ApacheCon last month. He started off the presentation with an overview of OSGi Architecture and its Framework Layering. He said that any application, whether it's an Embedded system, Client or Server application, can get the benefits of modularity and extensibility from using OSGi in its implementation. In the presentation, Richard also demonstrated the use of Felix components with a sample Swing based paint program.

InfoQ spoke with Richard about the goals of Felix project, its current status, and how the framework fits into other Apache projects, especially those in the SOA stack since Felix also aims for providing a service-oriented component model.

Richard said Felix project is the result of a volunteer community effort. The goal of the project is to make it easy to embed the framework into other projects. He said the current released version 1.0.1 is mostly compliant with OSGi R4 spec and it has been tested against the OSGi Test Compatibility Kit (TCK). The results of TCK test suite are posted on Felix website. The main missing piece for R4 compliance is the support for bundle fragments which will be worked in the next release. Fragments are the bundles that are attached to the main application bundle. A good example of fragments is the translation files for different locales. Felix version 1.0.2 is expected to be released shortly.

Responding to a question on how Felix fits into Apache SOA projects such as ServiceMix and CXF, he said that there is interest in OSGi technology in both ServiceMix and CXF communities and OSGi platform provides a good environment for deploying and managing services implemented with such technologies.

What role can Felix play in enterprise SOA initiatives where dependency and version management and governance play a vital role in achieving the SOA benefits?

At a minimum, it provides them with a platform into which they can package, deploy, and execute applications in a modular fashion to help them with dependency and version management. Effectively, OSGi technology is the missing modularity layer for the Java platform. Additionally, the OSGi platform also provides a service-oriented application model, which allows OSGi-based applications to be built from service-oriented principles in addition to being modular.

Europa, the latest version of Eclipse is bundled as an OSGi module. Are there any plans to bundle the Apache products (Tomcat for example) as OSGi modules as well?

Eclipse uses OSGi as its modularity mechanism for plugins. Our goal at Felix is to get other Apache projects packaging their artifacts as OSGi bundles. Within Felix we have started to create bundle wrapper JAR files for various common open source packages to help start the process. In many cases it is as simple as adding some metadata to the existing JAR file's manifest, but in other cases it requires more effort to integrate an existing project with OSGi technology. We are also working with the Maven community to try to get some level of OSGi metadata added to every JAR file that Maven creates, which would be a good start.

The next major release of Felix will be version 1.2 which will have support for bundle fragments. With fragment support, Richard said that Felix should basically be R4 compliant, which will make it easier to focus on R4.1 compliance.

Felix graduated into a top level Apache project earlier this year; the project team released version 1.0.1 back in October. A Maven plugin for Service Component Runtime (SCR) descriptors was released last month. This plugin can be used for generating OSGi service descriptors based on annotations. Felix also has Eclipse integration support so the developers can run Felix inside the Eclipse IDE. Felix components are licensed under the terms of Apache Software License Version 2.0.

See also numerous OSGi related news and videos at http://infoq.com/osgi.

No comments

Reply

Exclusive Content

Rationalizing the Presentation Tier

Thin client paradigm characterized by web applications is a kludge that needs to be repudiated. Old compromises are no longer needed and it's time to move the presentation tier to where it belongs.

Agile Project Management: Lessons Learned at Google

In this presentation filmed during QCon 2007, Jeff Sutherland, the creator of Scrum, talks about his visit at Google to do an analysis of Google's first implementation of Scrum.

AtomServer – The Power of Publishing for Data Distribution

In this article, Bryon Jacob and Chris Berry introduce AtomServer, their implementation of a full-fledged Atom Store based on Apache Abdera, which is now available as open source.

An Introduction to Virtualization

It is easy to think that virtualization applies only to servers. In reality the recent resurgence of the concept is also being applied to networking, storage, and application infrastructure.

REST Anti-Patterns

In this article, Stefan Tilkov explains some of the most common anti-patterns found in applications that claim to follow a "RESTful" design and suggests ways to avoid them.

Choosing between Routing and Orchestration in an ESB

In this article, Adrien Louis and Marc Dutoo discuss the differences and relative merits of using orchestration vs. routing in a typical ESB setup, and discuss various implementation options.

Enterprise Batch Processing with Spring

Wayne Lund discusses batch processing, Spring Batch objectives and features, scenarios for usage, Spring Batch architecture, scaling, example code, failures and retrying, and the future roadmap.

User Story Estimation Techniques

Developer Jay Fields draws on his experiences as a ThoughtWorks consultant to describe effective user story estimation techniques.