InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

OSGi: The Next Release

Posted by Alex Blewitt on Jul 17, 2009

Sections
Development,
Enterprise Architecture
Topics
Java ,
Enterprise Architecture
Tags
JSR 294 ,
Equinox ,
Eclipse ,
Apache Felix ,
JSR 291 ,
OSGi

Peter Kriens, technical director of the OSGi alliance, gave a presentation this week at the UK OSGi Users Group sponsored by Paremus and held at SkillsMatter in London. The event was recorded, and the video is now available.

The upcoming OSGi 4.2 release (expected to be released to the public by the end of August 2009) covers a number of new features, some of which are already provisionally implemented in Equinox, the OSGi engine behind Eclipse.

The new features of the OSGi core include:

  • Standard launching framework which will make launching an OSGi system easier, regardless of underlying implementation (allowing Equinox to be replaced by Felix simply by swapping them on the class path, for example)
  • Service Hooks to allow OSGi bundles to intercept and filter services destined for other bundles (such as security provisioning)
  • Bundle tracker to allow monitoring of bundles as they are started and stopped
  • Enhanced security to allow both positive and negative permissions (allow/deny) to customise authorisation policies
  • Standard Bundle-License header so that bundles can define what their licensing requirements are for administration purposes

The OSGi compendium, which covers additional services that may be present, is due out for release following the core, but will include:

  • Initial provisioning which will allow provisioning information to be stored in the bundle's manifest
  • Declarative services which are now supported by BND has had some of the limitations removed
  • Remote services, formerly distributed OSGi (aka RFC 119) will allow OSGi services to be connected between VMs using remoting technology. Configuration external to the bundle can define how these services are wired up. Unlike RMI, these services don't have checked exceptions (though clearly, if a communication error occurs, a RuntimeException will be thrown). This is implemented by ECF in Eclipse as well as Felix CXF.
  • Blueprint extender provides a configuration-driven services model (similar to declarative services) but based on the Spring patterns. Furthermore, the services can be instantiated at start-up and then bound to a proxy, which can change over time.

There was also a report of the Enterprise OSGi services, which will include an OSGi-based Transaction API (on JTA), provide JDBC and JNDI through OSGi services, as well as managing OSGi systems via JMX. The final piece of the Enterprise puzzle is the WebContainer, which allows a WAR to be installed into a running OSGi system, as used by Spring DM Server.

There are also some experimental services (which are not defined in the spec) such as the ability to create nested frameworks (whereupon an OSGi engine instantiates another OSGi engine internally for hosting a walled-off application) and TSL, a shell-like scripting language for interacting with OSGi services and supporting runtime commands. The latter will allow for a standard shell to control any OSGi engine, rather than the per-system shells at the moment. This has already been used in systems like POSH and Pax-Shell.

The approach to experimental services in OSGi is different from how experimental systems are defined in the JCP; instead of spending a long time defining a spec prior to gaining any experience on how it works, the RFCs provide provisional details which multiple implementations (Felix, Knopflerfish, Equinox etc.) are then used to get feedback on how it works. This feedback is then used to refine the spec until it is at a stable point rather than releasing something unfinished and early (c.f. the Date debacle in Java). Having the opportunity to experiment and gain feedback prior to publishing a final spec means that future changes are less likely to impact those once it goes final.

The talk concluded with some opinions of where the JSR294 outcome is headed. At the moment, there's a mix of requirements and implementation being conflated; owing to the way that JavaC handles the meta-module system, there are proposed changes to the way that visibility will work in Java (including the introduction of a new module keyword). This has prompted a recent heated debate on the implications of the meta-modules and the requires keywords. As Richard Hall, Sun employee and Felix commiter, writes:

For me, I share Peter's concerns that we are defining something with only vague meaning and it will ultimately hurt Java's vision of "write once, run anywhere". I would like it if we were defining something more concrete.

Fortunately, there is still time for the JSR 294 to be worked upon and the recent volume of comments on JSR 294 indicate a desire to come to a workable solution for all.

Great write up by Eric Newcomer Posted
Minor correction! by Oisin Hurley Posted
  1. Back to top

    Great write up

    by Eric Newcomer

    Alex,

    Thanks very much for the excellent write up of Peter's talk on R4.2. It has been a long time coming, but we are very hopeful that it will represent a good foundation for beginning to address the long list of requirements for improving support for using OSGi in enterprise computing.

    One thing that Peter did not mention was the EEG work to try to standardize what we are calling "application metadata" to assist the further development of lifecycle tooling. Those who have been using OSGi already for enterprise application development typically cite this area as needing significant further work.

    I can't say for sure, but EEG members are certainly prioritizing the metadata work along with the Java EE component mapping for the upcoming "enterprise profile" spec.

    Eric Newcomer
    OSGi EEG Co-Chair

  2. Back to top

    Minor correction!

    by Oisin Hurley

    You mean "Apache CXF" rather than "Felix CXF" :)

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.