Alex headshot

AlBlue’s Blog

Macs, Modularity and More

Java, Oracle, Google, Dalvik and Harmony

Java 2010 Zfs Google

What a week to go away on vacation. Oracle exercise their patent muscles on Java (or more specifically, the JVM) and then confirm what's been known for months; that OpenSolaris is now NoLongerOpenSolaris. This doesn't bode well for MacZFS ...

First though, there seems to be a lot of confusion on the Google vs Oracle litigation. A lot of people are claiming that this impacts the Java language – but that's not strictly true. The community is already affected, so there's been some collateral damage, but what Oracle has done hasn't affected the language itself; rather, the issue is about items relating to the JVM.

The second thing is that there appears to be confusion between the Apache Harmony project, and Google's use of their class libraries, versus the VM that underpins it. Apache Harmony is a set of clean-room implemented class libraries that implement features like java.lang.String and java.util.HashMap. In fact, the Harmony libraries can run on a number of different VMs, including IBM's experimental ones. The JVM that actually gets bundled with Harmony downloads is DRLVM – so when people refer to the Harmony JVM, they're really talking about DRLVM. It doesn't prevent others using the Harmony class libraries for their own VMs (e.g. VMKit) if they wanted to.

In fact, this is what Google did with Dalvik and their Dalvik VM. They wrote a new VM engine, and used the Harmony libraries to provide a similar language and runtime environment, all on a completely new VM. It doesn't even run bytecode; the Dalvik Executable is translated from the bytecode that's generated by compilers and the like.

The important thing is this has nothing to do with OpenJDK, or GPL. Google hasn't been near them, and to the best of my knowledge, hasn't contributed back any source upstream to Apache Harmony yet either. They're clients of an open-source library; and the patents don't cover that.

What Oracle has done, however, is attempted to exercise some patents that are used by the Dalvik VM. This should be a concern by others (e.g. Apache Harmony DRLVM, VMKit) because there's nothing stopping Oracle moving foward with those later. But the real money is in the mobile space, which is where the open dispute about Java came from.

I suspect at least some of the patents in question will be invalidated in the coming years, though I suspect enough will remain to result in an out-of-court settlement in the future. But the key problem here is that whether Java is open-source or not, Oracle will threaten its patent sabre in the future again.

As for communities; Oracle can't put a dollar price on them, so equates them to zero. The JCP was pretty much dead in the water even before the takeover was complete; and it's only really the JCP that put the Java name on the compiled bits. I suspect Oracle will disband the JCP and simply call the next release Java 7, whatever anyone else thinks.

Similarly, the OpenSolaris community has been shot in the foot with the long-expected, but now confirmed, announcement that there is no more OpenSolaris. What this means for ZFS is less clear; whilst the bits will be available, the number of people using it outside of a supported contract will vaporise and so all of the future testing on the ZFS bits will disappear, other than what is expected by the internal testing teams. That doesn't give me confidence that ZFS will continue to be rock solid, particularly as lead engineers are disappearing from Oracle at a higher than usual rate for the valley. The last OpenSolaris build that was available was 134, and I'm silently expecting that ZFS will become less and less useful after that point. Already, deduplication was a work in progress that people had raised many concerns about; and now Oracle have confirmed that dedup will be in the commercial Oracle Solaris 11. I predict larger problems for Oracle as times go ahead.

As for my work on MacZFS, there's certainly a few things to get done; but the evaporating upstream community, combined with the menacing patent troll outlook means that I don't see ZFS as the future of filing systems any more. Unfortunately, there's nothing to replace it yet; though some are cheering Btrfs, that's a project that is going from stillborn to stillborn status, with a btrfs is broken by design critique.

Still, innovations don't tend to happen when all is going well; they tend to occur when prompted by stress (in the environmental sense). I predict that a new ZFS replacement will emerge in the next decade, outside of Oracle (and perhaps by the disaffected engineers who originally designed it and learnt the issues associated with it), and a new Java-like language and runtime. Whether that's Google Go (which has finally grown up and got exceptions, although they call them panic and recover rather than try and catch, presumably to savour some of that eggy goodness all over their face).

The reality is that the JVM got left behind some time ago by Microsoft's CLR, particularly with its multiple language support (well, except for IronRuby which has rusted). The lambda-dev project was always going to be a case of a little too late, and the dynamic method handles are going to be great; but the re-rolling Jigsaw was always going to be contentious and not useful to boot.

Could this herald the emergence of a new language and runtime to surpass Java? Only time will tell, but Oracle's actions this week may well be the point where computer historians identify the beginning of the end of Java.