InfoQ

News

Are JSR277 and OSGi coming together?

Posted by Alex Blewitt on May 19, 2008 09:30 AM

Community
Java
Topics
Technology,
Language
Tags
OSGi,
JSR 277,
JSR 294,
JSR 291

Last month's piece on the status of the JSR277 and OSGi (aka JSR291), sparked a fresh debate on the JSR277 expert group mailing list, clocking up its biggest monthly total so far this year. One of the main drivers behind this has been Bryan Atsatt, a member of both the JSR277 (modules) and JSR294 (superpackages) expert groups. He argues that JSR277 could be great for OSGi:

The initial spec actually has two separate parts: an api/framework, and an implementation with a new distribution format. Unfortunately, these are presented in a way that seriously blurs the distinction. Worse, the new distribution format (".jam" files) often takes center stage.

So how could JSR 277 be great for OSGi? By providing tight integration of bundles into SE environments. The benefits would surface in four main ways:

  • Canonical storage model
  • Compile time dependency resolution
  • Class/resource sharing across module implementations
  • Command-line execution

And this could all work for existing OSGi bundles. Could be nice, huh? Maybe there's hope yet.

In fact, Bryan has been the driver for a number of the recent posts on the JSR277 expert group; he raised the point that the specification should be separate from the implementation, as these are mixed in the presentation of the expert draft review; and that Peter Kriens should be brought on board:

This EG has stagnated and needs to be brought back to life. I'd like to propose these concrete steps:

  1. Add Peter Kriens to the EG. Peter has clearly demonstrated great expertise in this area, and I believe he would quickly become a valued, active contributor.
  2. Bring the interop design/discussion/investigation process out of Sun offices and into the EG.
  3. Give the EG read access to the tip of the source tree (or at least very current snapshots).

Indeed, it seems that most of the discussions and implementation decisions are being done behind closed doors at Sun, and treat the expert group as proof readers after the decisions have been made. In fact, both of these points were highlighted by Peter Kriens not wanting to be involved in the current state:

However, JSR 277 now consists of two good (Repository and Language modules) and one bad part (JAM). Just before JavaOne 2008 Stanley had published a brief OSGi interoperability document. This document was not only very thin on details, it also referred in many places to an invisible Early Draft #2 (EDR2). I asked the EG members BJ Hargrave [Equinox - ed] and Richard Hall [Felix - ed] if they had seen this EDR2, but it was unknown to them as well. I had recently complained about the lack of discussions on the JSR 277 mailing list, so it seems that work had been going on stealthily.

During the JSR 277 presentations Alex and Stanley it became clear to me that a lot of work had happened behind the scenes; Without any communications on the mailing lists. For somebody in the audience it was absolutely not clear that almost everything that was said was never discussed in the EG. How could I participate in an EG if the only option would be to approve work done at Sun behind the curtains? How much change can there be if the unpublished EDR2 is presented at JavaOne as the stable result for JSR 277? Should I join an EG where most of the work was already done? How many fundamental changes can you achieve in this situation?

We are now at a crucial point in time. Though I'd love to participate in the discussions about modules in the Java language and the repositories, I cannot become responsible for a module system in Java that is creating this complexity for no rational reason. I do hope Sun will take this last step as well, and drop JAM in favor of the much simpler approach of using the OSGi metadata throughout the system. In the last months we have gotten so far! Please?

Meanwhile, fresh involvement at Sun means that the OSGi interoperation is looking up. Alex Buckley has joined the 277 expert group (and was responsible for the aforementioned simplification of JSR294, which was met with great acclaim); and Mandy Chung has been tasked with working on OSGi interoperability.

It seems that Sun have been listening, and not before time. At JavaOne this year, we reported on the OSGi-based Spring Source Application Platform and Glassfish running on OSGi. The OSGi best practices presentation (PDF) sparked a fresh interest and since JavaOne there has been a increased number of discussions on forums and blogs about bundles. We can hope that the JSR277 EDR 2 will have taken all of these points to heart and will bring OSGi and JSR 277 closer together.

No comments

Reply

Exclusive Content

Using Ruby Fibers for Async I/O: NeverBlock and Revactor

Ruby 1.9's Fibers and non-blocking I/O are getting more attention - we talked to Mohammad A. Ali of the NeverBlock project and Tony Arcieri of the Revactor project.

Agile and Beyond - The Power of Aspirational Teams

Tim Mackinnon talks about the aspirations behind the Agile principles and practices, the desire to become efficient, to write quality code which does not end up being thrown away.

Concurrency: Past and Present

Brian Goetz discusses the difficulties of creating multithreaded programs correctly, incorrect synchronization, race conditions, deadlock, STM, concurrency, alternatives to threads, Erlang, Scala.

ActionScript 3 for Java Programmers

Often the hardest part of changing technologies is language syntax differences. This new article provides Java developers with a transition guide to Actionscript which forms the foundation of Flex.

Neal Ford On Programming Languages and Platforms

Neal Ford talks about having multiple languages running on one of the two major platforms: Java and .NET. He also presents the advantages offered by Ruby compared to static languages like Java or C#.

Future Directions for Agile

David Anderson talks about the history of Agile, the current status of it and his vision for the future. The role of Agile consists in finding ways to implement its principles.

Nick Sieger on JRuby

Nick Sieger talks about the future of JRuby, Java Integration, and his work on JEE deployment tools for Ruby on Rails like Warbler.

Rustan Leino and Mike Barnett on Spec#

Rustan Leino and Mike Barnett of Microsoft Research discuss the technology in Spec# and its futures.