Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2573 posts at DZone. You can read more from them at their website. View Full User Profile

Eclipse Foundation Wants OSGi to be Considered for Java 8 - Jigsaw Doesn't Cut it

10.18.2010
| 11915 views |
  • submit to reddit
Although he is very supportive of Java 7, Mike Milinkovich, the Executive Director of the Eclipse Foundation, said in a blog post this weekend that Eclipse would vote against JDK 8 if it doesn't accommodate the OSGi modularity and services framework.  Milinkovich said he wants to see OSGi replace the current "greenfield projects" for JDK 8.  He believes that the issues standing in the way of OSGi are "not software but social engineering."  He adds that, "In the best interest of the Java community, some sort of compromise is going to be required."

According to the new schedule for OpenJDK development, the former JDK 7 specs have been broken up into JDK 7 and JDK 8 under Plan B.  While Oracle says they have a bunch of features that are nearly ready, other major platform changes like Project Jigsaw and Project Lambda (closures) are not as mature, therefore, Lambda and Jigsaw have been postponed until JDK 8, which is scheduled to ship in late 2012 (Milinkovich predicts early to mid 2013).   Jigsaw is a low-level module system similar to OSGi, but Milinkovich thinks this isn't enough:

We are no where near as positive about the Java 8 JSR [as we are about JDK7].  …  We are just not comfortable that the direction of the Java 8 team will do an adequate job of bridging the divide between the OSGi world and whatever modularity model is decided upon for the platform. Which potentially means that Java 8 may ship in late 2012 (actually I predict early-to-mid-2013) with a modularity model which is orthogonal to, and incompatible with OSGi. In our opinion, that would be a disaster for the Java platform and the Java ecosystem.  --Mike Milinkovich

This clearly seems like a criticism of Project Jigsaw, although he doesn't mention it by name.  OSGi has been very important to Eclipse for quite some time.  Milinkovich reminds readers that OSGi is the basis for the Eclipse platform's plug-in model.  Eclipse hosts OSGi projects like Virgo and Gemini while also using OSGi as the basis for its ESB implementations and Java EE application servers.

I am not saying that OSGi is a panacea. There are lots of people out there who will happily tell you about all of the reasons why it is imperfect. For example, despite the fact that its roots are in embedded, it objectively has been a failure in the Java ME space. My point is that it is deeply ingrained in the Java ecosystem and in the architectures of many of the most successful Java products out there. I cannot imagine a scenario where ignoring or trying to replace it in a major Java platform release two and a half years from now can be anything other than a train wreck.  …  Unless we see sufficient accommodation for OSGi in the Java 8 JSR we will be voting No.  --Mike Milinkovich

Go here and read the full blog posting.

Comments

Jacek Furmankiewicz replied on Mon, 2010/10/18 - 10:18am

Hell no. Based on my horrible experiences with OSGi (lots of pain for very little gain, with very messy troubleshooting of any classpath issues), there is no way that Java/JVM should be held hostage by the OSGi fan club.

I would be more than happy to have someone take another stab at modularity in Java. If they fail and decide that OSGi is the best we can, OK let it be...but there is no way we should just capitulate to OSGi in Java by default.

It has been nothing but a long, painful thorn in the project I worked on....right up there with J2EE 1.4 in terms of pain factor.

Ronald Miura replied on Mon, 2010/10/18 - 11:42am

For example, despite the fact that its roots are in embedded, it objectively has been a failure in the Java ME space.
I thought that Java ME itself was a failure...

Nick Brown replied on Mon, 2010/10/18 - 12:45pm in response to: Jacek Furmankiewicz

I think what he is trying to say is that whatever modularization solution they come up with should be compatible with OSGI so everything that currently uses doesn't have to be rewritten.  There are obviously some things in OSGI today that need to be addressed, such as split packages (I think that is the one big thing that is Jigsaw rejected OSGI for, since part of the point of Jigsaw was to be able to package some parts of the java.util package seperately).

Jonathan Fisher replied on Mon, 2010/10/18 - 2:16pm

I agree with the eloquent Jacek Furmankiewicz.

Thanks, but NO!

Mike Milinkovich replied on Mon, 2010/10/18 - 3:11pm

Mitchell, Your headline seriously misrepresents what I said in my blog post. I absolutely did not demand "Standard OSGi in Java 8". That is totally bogus.

What I did say was that OSGi has been around a long time, is the incumbent technology, and ignoring it would be a disaster. There needs to be an accomodation. E.g. some sort of migration or interoperability path that actually allows whatever comes out of Jigsaw to play nicely with OSGi.

The fact is that OSGi is already used in the internal implementations of most JEE implementations out there, including Oracle's own Glassfish and Weblogic. What we are trying to avert is an unnecessary train wreck two years from now. Have you actually thought through what a mess it would be if a brand new modularity story in Java 8 forced a re-implementation or porting of (to name just a few) Glassfish, WebLogic, Websphere, JBoss, JOnAS and Netweaver? 

If, in the end, OSGi or a subset thereof becomes the modularity story for Java 8 that would be just fine. But that is not what I said, nor is it what I meant. 

 

Mitch Pronschinske replied on Mon, 2010/10/18 - 9:58pm in response to: Mike Milinkovich

I hope the new title is closer to what you meant.

Ryan Developer replied on Mon, 2010/10/18 - 10:08pm

I know Eclipse Foundation != IBM, but I wonder if part of the reason IBM is now a contributor in OpenJDK is to help with the module system.

 

Kamal Mettananda replied on Tue, 2010/10/19 - 12:56am

If OSGi is replaced with something completely new; it would not be easy for existing products to move to Java 8 (but not impossible). However as IBM is working with Oracle on OpenJDK, they will find a way to push OSGi in.

Mike Milinkovich replied on Tue, 2010/10/19 - 8:52am in response to: Mitch Pronschinske

That is closer, thanks!

Chris Kaminski replied on Wed, 2010/10/20 - 2:09pm

@Jacek: You have a point, I've just struggled through getting a servlet-based processing engine working on Felix, and getting the classpath issues resolved was a pain. How much of that goes away if we get Isolates support, which IMHO is long overdue?

James Ervin replied on Wed, 2010/10/20 - 4:10pm in response to: Jacek Furmankiewicz

Those of you haters, hatin' on OSGi need to look at Jigsaw more closely. A closer examination will have you in agreement with Mike.

Alex Clement replied on Thu, 2010/10/28 - 2:33pm

There may be an alternative to OSGi or Jigsaw to provide dynamic modularity to the JVM.
Simple Dynamic Modules.
It works with maven artifacts as modules.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.