Tuesday 21 April 2009

No Java SE 7 - The Oracle perspective

So, I've been writing this series of blogs about how Sun's decision to block Apache Harmony has caused a lack of a Java SE 7 specification. Does the Oracle takeover change anything?

Obviously, at this point, everyone is just digesting the news that Oracle will soon own Sun (subject to various details). I don't have any special or inside information on this, but I can draw out some pointers from the past and my reading of licenses.

Oracle JCP voting

Firstly, lets look at the key vote that is recorded in the JCP minutes:

JCP EC meeting summary - December 7th 2007
Resolution 1 (proposed by Oracle, seconded by BEA)
"It is the sense of the Executive Committee that the JCP become an open independent vendor-neutral Standards Organization where all members participate on a level playing field with the following characteristics:
* members fund development and management expenses
* a legal entity with by-laws, governing body, membership, etc.
* a new, simplified IPR Policy that permits the broadest number of implementations
* stringent compatibility requirements
* dedicated to promoting the Java programming model
Furthermore, the EC shall put a plan in place to make such transition as soon as practical with minimal disruption to the Java Community."

Vote tally from SE/EE Executive Committee:
Voting "yes": 13 (Apache, BEA, Fujitsu, Google, HP, IBM, Intel, Doug Lea, Nortel, Oracle, Red Hat, SAP, Hani Suleiman)
Voting "abstain": 1 (Sun)
Vote tally from ME Executive Committee:
Voting "yes": 13 (BenQ, Jean-Marie Dautelle, Ericsson, IBM, Intel, Nokia, Orange, RIM, Samsung, Siemens, Sony-Ericsson, Time Warner, Vodafone)
Voting "abstain": 1 (Sun)

Resolution 2 (proposed by BEA, seconded by Intel)
"The SEEE EC requests Sun to submit a Java SE7 JSR with the following characteristics:
* EG members will share costs by contributing to the TCK and RI submitted under common licensing terms that will allow any implementer to use them;
* accompanied by public spec, tck, ri licenses at JSR initiation;
* licenses do not contain Field of Use restrictions on spec implementations.
* the JSR is operated by the Spec Lead under democratic principles (e.g. Java SE6)
Furthermore, from the time of submission, TCK license(s) for Java SE5 and later will be offered without field of use restrictions on spec implementations enabling the TCK to be used by organizations including Apache."

Vote tally from SE/EE Executive Committee:
Voting "yes": 10 (Apache, BEA, Fujitsu, Google, Intel, Doug Lea, Nortel, Oracle, SAP, Hani Suleiman)
Voting "abstain": 4 (Sun, HP, IBM, Red Hat)

(My highlights)

So, we have a clear indication from December 2007 that Oracle were actively supporting the ASF in the dispute with Sun.

Of course, that may have been a competitive move against Sun. Now that Oracle holds the power, it may choose to use its power very differently.

JCP

I've read the JSPA and JCP documents today to see what they say about Sun being taken over. I couldn't find anything in those documents (Feel free to correct me).

As such, we should go with the simple model that I drew up, however now all contracts previously signed between companies/individuals and Sun (about the JCP), will automatically become contracts with respect to Oracle. Thus, Oracle now sits in the centre of the JCP ring, and all power accrues to it. How it chooses to use that power will be a determining factor of Java's future.

OpenJDK, Glassfish, Netbeans, etc

In addition, any contracts signed with respect to any Sun Open Source project (the SCA) would I'm assuming naturally become contracts with Oracle. There is a FAQ on this though:

SCA FAQ
Q: What if Sun is acquired, or the rights to a particular code base are transferred? Do I have assurances that the party receiving these rights will continue to honor the SCA?
A: The SCA does not include any relicensing terms or obligations in the event of transfer of rights. But because contributors retain all their rights, there is no danger that contributions can be made exclusively proprietary. Contributors retain the ability to make sure their contributed material is always freely available.

So, the SCA itself provides no guarantees that the SCA will continue to be honoured. There are some nice platitudes here about your own personal contributions, however the reality is that your single patch to a large project like Glassfish, Netbeans or OpenJDK is meaningless without the rest of the codebase.

The Java Trap

The 'Java Trap' is a reference to a campaign by Richard Stallman and the FSF to ensure that the Java platform was usable by Free software (ie. the FSF definition of free, not free as in beer).

A key aim of the campaign was to ensure that were Sun to ever change its mind about the licensing of Java, or be taken over by a Free/Open Source Hostile company, that existing Java programs could continue to be run. The 'Java Trap' battle was apparently won in May 2006 when Sun announced that Java would become Open Source, and later that the GPL license would be used.

Interestingly, this wasn't that long after Apache Harmony was launched in May 2005. Various commentators have suggested that Harmony's faster than expected progress was in fact a key factor in Sun's decision to make Java Open-Source.

If that is the case, then its interesting to consider just how important that pressure that Harmony (a project that many like to criticise) put on Sun to cause Java SE to become Open Source. We will probably never know for sure, but whatever the reasons, we should be thankful that Java SE is Open Source now and that Oracle can't remove that right.

Except....

The Java Trap still exists

I claim that there is still a Java Trap (although I'll accept that I'm talking about something slightly different to the original issue). So, what do I mean?

Well, as I've been banging on in this blog series, it's all about the IP.

OpenJDK 6 is a GPL licensed implementation of the Java SE 6 specification. As such, it can be tested using the official testing kit. And as I've shown, once you pass the tests, you get granted the IP.

But what about the IP added to Java since version 6?

Well, there is no specification for Java SE 7, we've established that. And Oracle as new masters of the JCP could choose to keep it that way. And without that specification and JSR, there is no testing kit, and there is no way to pass the IP from all the contributors to the differences between Java SE 6 and Java SE 7 to the completed Open JDK 7. Ironically, this is exactly the same situation that the ASF has been highlighting in the Apache Harmony dispute.

The problem isn't that the code of Open JDK 7 isn't Free and Open under the GPL. The problem is that there is no specification and JSR to grant the necessary IP rights.

Thus, the new 'Java Trap' is that an owner of Java could still choose to take the next version of Java back into a closed world again, simply through its control of the IP. Sure, existing programs would still run on Open JDK 6, but that could be the one and Free and Open version of Java SE.

Now, perhaps some will choose to ignore IP questions, or to consider them meaningless. Unfortunately lawyers don't think that way.

Some of you will be shouting 'but we'll fork Open JDK 6' in that scenario. But I'll say it again - you can't get the IP! You can't get certified as being compatible if there is no specification! The Trap is Back.

Of course, this is probably worst case scenario. After all, we have no idea what Oracle plans to do with Java. But there is one less major player now to keep the market honest.

Anyway, I do think its worthwhile considering and being aware that Bad Things can still happen. And that Open JDK and the GPLv2 isn't necessarily the big saviour that some might think it is. (But lets be very thankful for Open JDK 6, and perhaps Apache Harmony's role in making it happen).

Summary

Well, thats my slightly legalistic take on how the Java SE 7 and ASF/Sun disputes might play out now Oracle is in the frame. And I know some may disagree with my take on this.

I'm still hopeful that Oracle will do the right thing - the signs from two years ago are good. But sometimes power corrupts. So lets stay vigilant.


Stephen Colebourne
Apache Software Foundation member, speaking personally
Sun Java Champion, speaking personally
Not a committer on Harmony or OpenJDK

14 comments:

  1. It seems you are on an all-out war to get Java 7, rather than JDK 7. I support getting Java free from anyone's and everyone's authority.

    IMHO Oracle's acquisition of Sun would be more because of MySQL and the JVM, which are hugely popular against Oracle's current offerings. Oracle has been contributing to many OSS projects, Eclipse, Linux, InnoDB, Berkeley DB, PHP etc. I feel Oracle would be more inclined to divert all its efforts in making the VM more powerful, optimized and robust than struggling to keep Java specification under wraps. Thoughts?

    A nice and timely article which I am sure would garner enough community support to build a wonderful Java ecosystem.

    ReplyDelete
  2. Interesting. So if Oracle decides to continue holding on to IP, then the post Java 6 era could itself be seen as a fork reinstated by none other than Sun themselves.

    ReplyDelete
  3. Oracle has every incentive to open up the JDK (for real this time) as they understand that if a billion new users flock to java, they have new opportunities to sell software and services around the popularity of the platform.

    BTW:
    The whole "yeah its open source but if you dont do exactly what I say, Ill sue you with my software/idea patents" goes against the spirit of the GPL and the OSS movement all together. The point of OSS is to encourage forks, that's how innovation takes place.

    ReplyDelete
  4. Do you know how many tests there are inside Harmony test suite (versus inside TCK) ?
    Thanks.

    ReplyDelete
  5. There's a few points to be made here:
    1) OpenJDK is GPLv2, so without the improvements regarding IPR licensing in v3. Sun was a big proponent of v3, so going for v2 must have been a deliberate move. Their IPR is likely the reason.
    2) IPR is actually distributed across the industry. Oracle/sun not putting OpenJDK 7 through JCP also means that the whole thing could backfire: e.g. IBM sueing.
    3) Other OSS projects seem to function fine with GPLv2, just one implementation, and no explicit IPR deals. E.g. linux. It's all about risk management here. Could Oracle sue. Yes. Would they? No, it would mean exposing their customers to counter suits: very bad for business.
    4) The whole point of Apache Harmony is that closed source & IPR friendliness (i.e. having it and not being forced to expose it). It's primary supporters are notorious for having big IPR portfolios. So, don't be naive about this. Harmony would not exist if people could live with the GPLv2 which is arguably a lot more liberal on these issues.
    5) The test suite is a nuisance. But you are allowed to use it with OpenJDK derivatives. I.e. someone could fork OpenJDK and still use the test suite. Secondly, the test suite is not needed from a pure functional point of view. You could just write your own tests. It's only needed if you want the Java brand slapped on your product. Sun/Oracle is the rightful owner of that.
    6) While OSS Java is very hip, much of the industry still uses non OSS Java 1.4 and 1.5. Java has gotten quite far without being open source.
    7) Going from a full blown OSS GPL software base with an insanely huge amount of users (whole Fortune 500, world+dog, everybody else) to a closed source software base would be an unprecedented first. I think you give Oracle too much credit by even assuming they could pull it off.

    So altogether, I don't think Java and Java 7 are in trouble. I do think that if Oracle shows any hint of doing what you think they might do, the OSS community will step in and hijack Java OSS assets and continue under its own flag. That would be a bad deal for Sun/Oracle. Both Apache Harmony and any OpenJDK clone (e.g. iced tea) are perfectly ready for production usage. IBM or anyone else could just choose to throw their weight behind it, if they wanted. Mismanagement on behalf of Oracle will in my view lead to this situation very soon.

    ReplyDelete
  6. Your interpretation of the GPL is not entirely correct. If an OpenJDK is released under a GPL (v2) copyright license, then an implicit patent license exists for any infrigment that happens because of the exercising of the rights granted by the license. Therefore, Oracle may choose to have patents on the new features of Java v7 and enforce them, but, in that case, in cannot distribute that code under the GPL license, and it cannot include that features under any OpenJDK release.


    Quote from the GPL:

    7. If, as a consequence of a court judgment or allegation of patent infringement or for any ther reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you
    may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by
    all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to
    refrain entirely from distribution of the Program.

    Therefore, it would be illegal to redistribute OpenJDK itself unless the recipient can fully exercise the rights granted by the GPL v2 license. If this is not the case, the redistribution cannot be done, and by Sun doing that distribution, it is granting a license on any patent neccessary to exercise the rights granted by the GPL.

    On the other hand, Java is not without competition, and in order to be competitive it must have a long term warranty of not tieing developers to a closed product.

    ReplyDelete
  7. Jim Bethancourt22 April 2009 at 22:50

    Taking a close look, the resolutions would still pass, even with Sun and BEA out of the picture (assuming 50% is required for a resolution to pass)

    Cheers,
    Jim

    ReplyDelete
  8. Stephen Colebourne23 April 2009 at 00:24

    @sourceroot, "The point of OSS is to encourage forks, that's how innovation takes place". Ideally yes, but I think that is the last thing on the minds of company sponsored open source.

    @Dominique, No I don't know the test numbers for Harmony or OpenJDK. I do know that the Java SE testing kit tests are designed for a different purpose - compliance, not functionality.

    @Jiles, On point 1, there does seem to be evidence that Sun deliberately didn't apply GPLv3 (even though senior people suggested they might).

    On point 5, we probably disagree. I believe I've shown now how Harmony can't be released because it doesn't have the IP rights to do so. Some people might say thats an overblown risk, but I would suggest risk management and honesty is one reason why Apache is well respected in the industry.

    I don't think its inconceivable that Oracle might keep the OSS version of java, but charge for the non OSS version (bear in mind that Sun still has a non-OSS licensed version of Java)

    @Ramon, Maybe Oracle might not feel the need to release 'JDK 7' under GPL?

    As I said in the post though - all of this is worst case scenario.

    ReplyDelete
  9. Java as an ecosystem will fragment and die.

    (I posted this on theserverside too, Y'now, I'm lazy)...

    It will be a death far more quickier than the one it would have had if IBM had bought Sun instead.

    Under slomo IBM, Java would have rusted and sat inertly to oblivion, but Oracle will try by any means to capitalize it, even if that means total distruption of the open source part of it.

    We will see Java run better under Oracle Solaris (it is already true btw), less bugs fixed on Linux, JCP driven to make Oracle offer the best one and similar techniques.

    IBM will fight this, producing far more fragmentation than the swt/swing dualism.

    And no, I don't think that .net will ever be a solution (6 incompatible and highly proprietary releases since 2002).

    Just my 2 eurocents.

    R

    ReplyDelete
  10. Number 5 is indeed the key point. In my view Harmony never was essential for the Java ecosystem. I fully agree the test suite situation is annoying for them but I don't see it as a long term problem for Java, just for Harmony and only if they insist on using the Java brand name.

    Harmony is actually being used in production by Google despite your claim that they should not be able to do that. Google provides Apache licensed OSS releases that incorporate Harmony. So, it seems they can do it and more importantly, the mobile phone industry, where industries tend to be very cautious with IPR, seem to have no major issues using it and building their product port folios on it. In short, for Google's Dalvik the unavailability of the SUN test kit is a non issue and I'm pretty sure their lawyers thought long and hard on this one.

    I see no reason why e.g. Spring source would not be able to put together a fully functional application server based on Harmony. The only thing I can think of here would be missing technical features that for whatever reason are not ready. If they'd wanted to, they'd be able to provide a 100% Apache licensed software stack. From a technical point of view that doesn't make much sense right now because Sun Java is the better runtime environment at this point. But if Oracle screws up, this might become a reality.

    The test suite is not needed from either a technical or legal point of view unless you want to use the Java brand name. For the same reason you'd probably run into legal trouble slapping the name Linux on your BSD kernel.

    Regarding Oracle publishing a non GPL Java version. Yes they can do that, at least insofar they have the copyright of the code (close to 100% but not quite 100%). I think that would be bordering on suicidal though and they'd end up losing control instead of gaining some. For a start, most linux distributions would continue to ship the OSS version for legal reasons. Red hat has already shown that iced tea is perfectly usable and supportable in production.

    @Ramon, GPLv3 exist because GPLv2 was not bullet proof regarding IPR. There's ways around this clause. Sun knows this and chose to have these ways open. I'm not a lawyer though but I'm well aware our lawyers have a healthy respect for both versions of the GPL.

    ReplyDelete
  11. Beware the days of:
    ATT System 5 vs Open Software Foundation vs BSD vs ATT Unix academic freeware vs SCO BSD compatibilites vs ANSI standard vs SunOS ...
    Transfer data on tape with tar, make an application, ... Um, which Unix ? which version ?
    Ahh, the horrors of vendors in Unixland.
    And then there was Linux.
    One guess is that Java and all development on it, will become a battleground between IBM and Oracle, unless the Open Source movement can hold the power.

    ReplyDelete
  12. Oracle taking over sun is only LE knows whats happening.. Ora is not one of the companies which is quite successful with anything outside databases... I am suprised even weblogic couldn't get the limelight especially since its so much better than websphere.. but then who knows... Java will be lost in Oracles "no plan strategy" of random acquisitions...Before any harm comes Java's way.. i think the president should declare it as the third official language of the country :)

    ReplyDelete
  13. Interesting discussion.

    Beside some more recent votes, I was also involved (SE/EE EC member) where all EC members voted against Sun again over restrictions of use for JSRs or a JDK, the thing that strikes me is this part:
    >Resolution 1 (proposed by Oracle, seconded by >BEA)

    At that time (December 2007) Oracle had already made the final bid to take over BEA Systems, which has by now been finalized and become "history".

    Oracle also inherited a JVM from this deal. JRockit. It is still rather little known, unless you install WebLogic products from now Oracle.

    So like IBM has their own JVM ever since, it is possible, Oracle may find a dual strategy for an OpenJDK and its own commercial derived product. Maybe tuned to run best on Solaris, just like Larry Ellison has already mentioned Oracle DB would be.

    News of NetBeans' death are however more likely. Considering how fast most of BEA's good and extensive offerings under Eclipse and WTP were quickly canned by Oracle. Unlike Eclipse, which plays a minor role for Oracle (they offer connectors, even develop a JSR there as RI, but little beyond that) NetBeans could be "recycled" into JDeveloper more easily. WebLogic Workshop also had many parts base on Swing. Some may rather flock into JDeveloper than the brand new Eclipse based version 10.x which went Sun-down pretty soon after BEA was purchased.

    So some of Sun's projects and technologies may also go "Sun-down" here and there. Oracle's and BEA's close relation with Apache e.g. makes it almost more likely, their JSF contributions like Trinidad, Tobago and whatever other island there is become the RI for JSF. And Sun's own contributions get merged into it sooner or later.

    ReplyDelete
  14. "the reality is that your single patch to a large project like Glassfish, Netbeans or OpenJDK is meaningless without the rest of the codebase"

    And of course the codebase is meaningless without lots of individual patches.

    ReplyDelete

Please be aware that by commenting you provide consent to associate your selected profile with your comment. Long comments or those with excessive links may be deleted by Blogger (not me!). All spam will be deleted.