Nitin has posted 391 posts at DZone. View Full User Profile

Tech Chat - Rich Sharples on OpenJDK

  • submit to reddit

In this exclusive interview, Rich Sharples, Product Management Director at Red Hat, talks about OpenJDK, Sun’s free and open source implementation of the Java SE platform.  The IcedTea project, one of Red Hat’s major contributions to the OpenJDK ecosystem, has done a great deal to enable upstream adoption of Java on the Linux platform; however, the question remains whether Java would’ve been more ubiquitous throughout the Linux universe had Sun open sourced Java much sooner than it actually did.   Rich discusses some of these issues and talks about some of the new features in OpenJDK 7, as well as the impact that dynamic languages, increased modularity and virtualization will have on the Java platform.  He also describes the impact he thinks Oracle's acquisition will have on licensing options around OpenJDK. 

The complete transcript of the interview has been provided below.

DZone: Rich, can you tell us a little bit about what you do at Red Hat?

Rich Sharples: Sure. I'm the product management director of application platforms and development at Red Hat, which is predominately the Java middleware that Red Hat ships as part of the JBoss portfolio.

DZone: What is OpenJDK?

OpenJDK is Sun's free and open source project for their previously existing JDK Java implementation. So if you remember back a couple of Java Ones, 2006, they made the promise that they were going to open source Java. Within a year we started to see the first result of that with HotSpot and a few of the other components. As of 2007, the pretty much completed that process, bar a few encumbrances within the code base.

DZone: Why is OpenJDK important to Red Hat?

Rich: Good question. Red Hat has moved beyond just being an enterprise Linux vendor. With the acquisition of JBoss, we're a key player in the Java middleware. Actually, we're really the only viable independent Java middleware vendor right now. So it's really important for us to have an entire stack, from the operating system up through the Java implementation, up through the middleware layers. An entire stack that we can control and we manage. Java was always a missing piece where we had to basically rely on other vendor's JDKs.

DZone: What are some of Red Hat's contributions to JDK?

Rich: Sure. That goes back to 2007 - or actually earlier, 2006, when some of the first components started to appear from Sun's OpenJDK work. We started the project called IcedTea, which really had two aims. One was to remove some of those encumbrances that I had mentioned. There were encumbrances around audio, some of the restorizers, the Web Start. That's actually part of the core J2SE platform. So a bunch of components that weren't built, that weren't truly free and open source. That was an impediment to getting OpenJDK into some of the Linux distributions like Fedora.

The other aspect was providing a build environment to be able to build OpenJDK using only open source software. Again, that was a requirement for getting into some of the Linux distributions like Fedora.

So those were two of the initial aims of IcedTea. There were a number of projects under IcedTea. One of them is Web Start, which I mentioned earlier. The browser plugin for Firefox, that was pushed forward by the IcedTea project and Red Hat employees, so we could have a true 64-bit open implementation of the browser plugin.

Another kind of key area we're looking at is around the portability of the OpenJDK code itself. So it has a lot of native code, a lot of assembly language, and that really does make it very, very hard and time consuming to migrate to other architectures.

The OpenJDK itself support that traditional X86, X64 architectures. But the Linux community have always enjoyed a much broader range of underlying architectures, so it was kind of important that we make it easy to port to other architectures.

One of the sub-projects, run by Gary Benson, is Zero and Shark. Zero is basically a project to remove all of the assembly language to make it much more portable. It does that by providing an interpreter layer. That it itself hurts performance a little bit, so there's another project called Shark to compensate for those performance hits. So it's a clever, neat optimization, a runtime.

So there are a couple of key, important projects we've worked on. We've really pushed the standardization, really enforced the standardization of the distributions that we push into the Linux community. Red Hat's IcedTea distribution, the OpenJDK implementation that first appeared in Fedora back in 2008, was the first true open source Java implementation that passed the TCK. So we're very, very interested in maintaining compatibility.

DZone: Why is the IcedTea project still needed today?

Rich: Most of the encumbrances have been removed by Sun and other OpenJDK community members. But there are still a couple of little areas with encumbrances, so we still need that. Then outside of the core JDK Java specification, things like Web Start and the browser plugin, they still have encumbrances. And those things, while they're not part of the core standard, they are shipped as part of all J2SE implementations, so we need help there.

Somewhat by accident, I think, the IcedTea project has really become the upstream for OpenJDK for Linux, essentially. All of the Linux distributions use the builds from IcedTea to provide a truly free and open implementation of Java.

DZone: Why is the Java TCK and Java compatibility in general of such importance?

Rich: When we first set out on the work with OpenJDK, we really wanted to ensure that whatever we ship is fully compatible. There's, I think, a very, very limited market for a Java that doesn't work like everybody else's Java. We run the TCK on all our builds. It's a huge burden; it's not exciting or fun work. But we feel it's very, very important. The initial OpenJDK shipped with Fedora was actually based on the JDK seven code base, so a lot of work had to be done to produce the OpenJDK six implementation. So it was essential that we ran the TCK tests anyway to make sure we had everything right.

But we continue with that commitment. Like I say, there's very little for Red Hat to gain by shipping a Java implementation that doesn't work like everybody else's.

DZone: Do you think Java adoption in the Linux community could have benefited from greater uptake had Sun open sourced Java much earlier than it actually did.

Rich: Yeah. I think Sun's hand was somewhat forced. I think they reacted to Apache Harmony, to some of the work that was being done in ClassPath and other projects. So I think they saw looming on the horizon an alternative, free and open source Java. That would have kind of hurt Sun. So I think their hand was forced, and I think they reacted a little late. Previously to joining Red Hat a year and a half ago, I was at Sun. I kind of drank the kool-aid, I believed that Java was already open enough. It was defined by an open consortium of companies, JCP. The code was always available for academic use and for some of the licensees.

But then when I joined Red Hat and started talking to some of the Linux diehards, if you like, it became clear that Java really had missed out on a pretty big opportunity. There's a whole community of users who really just didn't see the appeal of Java versus something like, say, PHP.

I know we shouldn't really compare them on a language level, but that was a technology that was adopted very, very quickly and vigorously by the Linux community. Because it was part of the core platform. I think the uptake would have been very, very different if OpenJDK or another open source Java implementation had existed five or six years ago.

That said, I don't think it's too late. I think OpenJDK has been very, very positively accepted. I think some of the work that Red Hat has done, given we have a strong base in the Linux community. By no means do I think it's too late. I think we can still make it a core part of the Linux ecosystem.

DZone: With Oracle's acquisition of Sun, are you concerned at all about some of the potential changes that will come as a result, to the governance and licensing options to the OpenJDK?

Rich: I'm really not that concerned. There are all sorts of scenarios that people are suggesting. I still believe Oracle will do the right thing. They have far too much to lose, by either accidently or purposely sabotaging OpenJDK. They have a very healthy business based around Java. Creating unrest, creating any kind of distrust or fragmentation of the Java community really isn't going to help Oracle. So I think they'll do the right thing. I also think they probably have the ability to invest in Java more than Sun had over the last five years at least. Sun kind of had some fairly pressing financial issues. I think that, above all else, probably hindered some of the progress of Java over the last five years.

So overall, I'm coming in neutral to slightly optimistic. If things do go awry, I'm sure Red Hat the rest of the Java community will step up and help Oracle to get back on track. So, yeah, I'm pretty comfortable with it.

DZone: Can you describe some of the work that's happening around OpenJDK 7?

Rich: Yeah. That's moving ahead really well. I believe the first builds, complete builds, are going to be appearing some time early 2010. I think the OpenJDK and the IcedTea community are very well linked. So as you see builds being pushed out through OpenJDK you'll see them on IcedTea as well. So, yeah, those two projects work in harmony. They're working pretty well together. We're very, very involved with the OpenJDK community. Andrew Haley, the technical lead for IcedTea, is on the interim board of governance for OpenJDK. Those two things will move in lockstep. And I think as 2010 approaches, we'll start to see that technology ripple down and we'll all get our hands on it.

I actually believe there are already builds available with OpenJDK and IcedTea on the OpenJDK code base, so it's appearing already.

DZone: So multilingual programming is sort of changing the way we look at JVM itself, more as a platform than anything. Is there any work being done around support for dynamic languages in OpenJDK?

Rich: Yeah. Some of that appeared in J2SE 6, and we'll see more in J2SE 7. And I think that's a great move. It's been a proposal for probably four or five years. It's something I followed internally when I was at Sun. And I think it's a great thing for the Java platform. I also think it's a great thing for those developers that really want to use scripting languages. It gives them the flexibility to choose a language that's appropriate, yet still get the power of the Java platform.

As an example, we did some work with Ruby in JBoss to show just that, that you can have a true first-class Ruby experience yet still have all of the things that you would get from an enterprise class Java application server. Some of the enterprise services like transactions and clustering and failover. So I think that's kind of goodness all around, and I'm pretty excited about that as a future direction of Java.

DZone: Is there any work being done in terms of modularity in the OpenJDK seven release, in terms of project Jigsaw? Can you talk a little bit more about that?

Rich: That's a kind of big subject, the whole Java modularity debate has been running for a couple years now. On the one side we have OSGI, which has some real groundswell both on the small devices as well as increasingly in the enterprise. We had a couple of JSRs specifically to address modularity in the Java platform. They've kind of come and gone and been resuscitated in various forms. But the latest work seems to be happening, rather than in the JCP, right down in the OpenJDK implementation itself. So I think it's going to be quite exciting to see what comes of that.

We certainly have an interest more and more on the enterprise side of Java with JBoss, where we're kind of invested in OSGI. We're kind of hedging our bets with modularity in general. We're aware that there are a couple of initiative. So what we hope is the microcontainer, given it's a fairly low level implementation, should be able to adapt and adopt whatever modular system we need to.

So hopefully we think we've played our cards right there.

DZone: As a JBoss customer, what are some of the benefits or optimizations I get now from an OpenJDK distribution on Fedora or Ubuntu?

Rich: Performance is a long-term thing. We're pretty excited now, we can look at performance holistically. We have people log at the full stack. Looking at JBoss running on OpenJDK, running on Red Hat Enterprise Linux. I'm really looking at performance holistically. I think that will really allow us to identify some of the big, low-hanging watermelons. It may be around network IO, for example. We haven't publicized too much of this work. We haven't produced any breakthrough public number. But the work is going on in the background where we have people running all the various benchmarks. So we're pretty excited that there are some things we can do there.

I think there was some kind of initial interest in performance because of the initial OpenJDK that shipped with Fedora and RHEL did actually have a performance boost over Sun's JDK. I think that was largely accidental, it just happened to use some later versions of some of the components, like HotSpot.

I think the OpenJDK that we ship today as part of Fedora and RHEL and some of the other Linux distributions, really the aim there is to ensure that we're on par with other JDK implementations.

I think you'll see over a couple of years we'll start to see some of the performance work manifest itself in some pretty exciting ways.

DZone: Red Hat is doing a lot of work in the virtualization space. How do you see that playing into the evolution of Java as a platform?

Rich: It's pretty interesting. Traditionally on the Java side, we assumed that we had to solve certain problems around provisioning, for example, around recycling applications. Providing environments for continuous operation. I think on the whole, we've done a reasonable job of that. But I think when you step back and you look at the technology that we have to play with - internally when I look at some of the virtualization technology that we have here at Red Hat, I think we can solve those issues in a much, much cleaner, much more efficient way. So I think there's going to be some really interesting work going on. When we kind of merge the ideas of JVMs and operating system virtualized environments. Some of the things you can do in terms of recycling images, that can happen in sub-second times, it's just things we really can do within Java. There's some pretty exciting work there going on, some pretty exciting ideas that we hope to make available in the future.

DZone: Rich, any final thoughts for DZone members?

Rich: Yeah. Just keep track of OpenJDK. I think it's an important piece of work. It's a big thing that Sun did there. I think it needs support. People were asking for a free and open source Java implementation. They pretty much got what they asked for. So keep it going, get involved. If you don't know about OpenJDK, visit the website, take a look and see if there's a way you can get involved.

DZone: Thanks for your time today, Rich.

Rich: Thanks.

Published at DZone with permission of its author, Nitin Bharti.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Otengi Miloskov replied on Wed, 2009/07/29 - 3:35pm

Very nice article and I hope Oracle do the right thing. If not Oracle will shoot in their foot.

Comment viewing options

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