You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Table of Contents

Summary

At a face-to-face meeting in April 2009, the Fedora committers agreed to begin moving toward OSGi as a module framework for Fedora.  Over the remainder of 2009, several of us gained experience with OSGi:

  • Eddie worked on a Fedora-on-OSGi project, taking first steps to build the entire Fedora webapp as an OSGi bundle.
  • Eddie experimented with building Mulgara as an OSGi bundle.
  • Chris changed all Akubra modules to be built as OSGi bundles.
  • Bill and Andrew are actively using OSGi in DuraCloud, to aid in the deployment of arbirary services.

When the committers met in London in Feb 2010, we discussed what we have learned about OSGi and came to the conclusion that, while OSGi provides several capabilities that we still see as valuable (dynamic re-configuration, classloader isolation, and a standard module lifecycle), it has a significant learning curve and brings with it a new set of dependency management issues.

So, rather than concentrating on "Moving to OSGi" as a goal in itself, we resolved to improve Fedora's modularity in other, more tractable ways, while using the knowledge we've gained over the last year to increase Fedora's "OSGi-Friendliness" over time.  We have identified a few concrete steps we can take to move Fedora's Module Architecture forward:

  • (tick) Document, maintain, and apply best practices for being "OSGi Friendly"
  • (tick) Change Fedora's Modules to use a modern dependency injection framework (Spring and/or Guice)
  • (tick) Retain the long-term goal of having a Fedora OSGi bundle that can be used by other apps

Want to Help?

Great! Please signal your interest by adding your name below, contributing to this wiki page, and participating in related discussions on the fedora-commons-developers mailing list.

Lead: (smile) Chris Wilper

Interested Contributors: (thumbs up) Dan Davis, (thumbs up) Andrew Woods, (thumbs up) Asger Askov Blekinge

OSGi Friendliness

What can we do to make Fedora more OSGi-friendly (ideally, without building in any runtime dependencies on OSGi)?

  • For jars that are intended to be usable by other projects, build them with the maven-bundle-plugin so they include OSGi metadata.
  • Put APIs and implementation details in different packages.  A common convention in the OSGi world is to use the ".impl" suffix on packages that contain implementation details.
  • If possible, avoid using libraries that are known to be problematic in OSGi environments, or require third-party repackaging in order to work in OSGi environments.  Well-known examples include:

Dependency Injection Framework

Spring and Guice have both been mentioned as candidates here.  What are the tradeoffs?  Why one over the other?

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels