Friday, August 20, 2010

Oracle, Google, and Java

Oracle's decision to sue Google over the use of Java technologies in the Android operating system has certainly cast a cloud over the Java platform in general. Sun's behavior towards Java was paternalistic but not aggressive: a single lawsuit, against Microsoft, was issued at a time when Microsoft was doing what it could to muddy what Java actually was (in some senses, Microsoft's actions constituted something akin to trademark infringement, even if the technicalities of the case said otherwise), but beyond that, Sun did not sue anyone producing similar or competing platforms.

And the competing or similar platforms were legion. The FSF, Apache foundation, and IBM produced their own independent Java Virtual Machine implementations, IBM licensing and certifying their's, but the others being entirely independent. Open source developers put together a Java alternative called Parrot. And, of course, Google, while Java was still owned by Sun, put together Dalvik.

What's Dalvik? Well, it's the virtual machine at the heard of the Android operating system. Programs are written in a high level language like Java, that is translated into Dalvik code, and then this is the code that is distributed, in much the same way that code written for the Java platform is translated into Java bytecode, put into JAR files, and distributed.

Sun did not object, strongly at least, to what Google was doing. In fact, then Sun CEO, Jonathan Schwartz, welcomed Android upon its announcement. This isn't to suggest Sun didn't have concerns: Sun wanted mobile devices to converge around the J2ME system, and while Android contained some Java technologies, the underlying platform was entirely incompatible with J2ME.

Oracle has taken these political concerns, and turned them into a lawsuit. Given the fact people generally believed that Java had been turned into an open source technology by Sun, this is raising concerns about the status of the entire platform.

Are people right to be concerned? Well, let's address what's going on.

The status of Java

Java's status as an open source technology is affirmed by two actions Sun made before being swallowed by Oracle. The first was to take the official Sun version of Java, and release the source code under the GNU General Public License. This license permits anyone to take the code and distribute it or modified versions, as long as they too provide the code to those they distribute too, and they license it under the GPL too. The basis of the GPL is copyright law, so Sun's license covered any risk of infringing copyright by copying Java - as long as you kept to the license, you would not be infringing upon Sun's copyrights.

The second action was to create a patent grant. This took the software patents that form the core of Sun's Java technologies, and allowed anyone to implement technology covered by those patents, as long as certain conditions were met. However, the conditions here were more limited than those imposed by the GPL copyright license: you could only implement technologies using the Java patents if, and only if, you implemented the official, Sun sanctioned, Java specification. There's some debate as to whether you could create a product that implemented a superset of Java using the license, but there's no debate that implementing a subset (or a superset of a subset) would violate the license.

In some ways, the latter license seriously cripples the former license. The GPL is supposed to allow those who receive code under it complete freedom to modify that code as they see fit (within the confines of the law.) However, the patent grant limits that freedom quite severely.

So, in essence:
  • You can create a custom implementation of Java, based upon Sun's code, if, and only if, your implementation follows the Java specification.
That's the legal status of Java, at least, as Oracle understands it.


Java was only recently made open source, and a large community has centered around it despite Java's initial lack of openness. Hence it's unlikely, at this stage, that Oracle's actions will kill Java outright. However, Oracle's lawsuit has angered quite a few people in the Java community.

Google's embrace of the Java language has also helped increase momentum for the language against rivals such as C#. It's not clear to me how Google will address the issues, and a lot will depend upon whether Oracle win their lawsuit (or Google believes they will.) The best thing that could happen for almost everyone would be for Google to take the suit to court, and win.  This would ensure Java remains a safe, open, platform, without anyone believing they're taking an excessive legal risk by dabbling with it.

But what if Google loses? Well, the consequences would be substantial.
  • Google and Oracle would have to negotiate a system of licenses covering Android, or else see the destruction of the Android platform. This might involve changes to Android itself, or it might involve some form of payment to Oracle to cover future updates. In the worst case, Android might cease to be open source, but such a move would likely end much of the support for the platform.
  • Developers would be wary of working with Java at different levels. Those who write end user applications would be largely unaffected, although the use of technologies developed to work around Java's limitations could be compromised. As development goes down the chain, frameworks, alternative libraries, and third party implementations of Java would increasingly be impacted by developers concerned about the legal risks of playing with the platform. The progress made integrating Java with many GNU/Linux distributions may be partially undone.
  • Mindshare would inevitably shift towards alternatives, rightly or wrongly. Microsoft's .NET platform, for instance, certainly would benefit from an overly litigious Oracle.
On the surface, as long as developers see Java as a platform, and avoid third party implementations or extensions, Oracle's lawsuit might not be an issue. But the risk is that if Oracle continues down this path, successfully, we'd be looking at a stagnating platform. One hopes that Oracle will change course, or else Google will win the right to create its own implementation of a technology Sun had claimed it had freed.

No comments:

Post a Comment