Java goes commercial, what does this mean for Sitecore - Solr?

Sat, Dec 15, 2018 in Development , Sitecore using tags Sitecore , Solr , Java , OpenJDK

Oracle to start charging for Java

I’ve been following this update for Java for many months since initally seeing the popup warning when updating Java on my local machine. And now finally getting around to blog about it, now the options have become clearer. And finding that some people still aren’t aware about the pending update in January 2019 that will mean will require a commercial Java licence if you want any further security updates from the Oracle version of Java.

I brought this topic up at the Sitecore Discussion Club
http://sitecore.events/

 

Java Public Updates

 

When I started to follow this, the policy for the LTS release of Java 11 hadn’t been announced, and I was thinking would need to update to Java 11 to continue to get free updates. Solr is up to supporting Java 10 (since 7.3.0), however sitecore doesn’t support a version of Solr this high yet https://kb.sitecore.net/articles/227897, and anyway Java 11 is now not free anyway, so not an option to get free updates that way.

Further reading:

Oracle Java - what’s the cost?

The cost has come down since I started following this.

Originally the price was:

 

Per CPU   Support
Java SE Advanced   $5,000   $1,100
Java SE Suite   $15,000   $3,300

 

Which is quite a large up front cost, and continual support cost.

Then it was announced the subscription licence, charging $25 per CPU per month with support. Going down to $12.50 with volume discount (possibly lower with Enterprise agreement), which works out cheaper than the previous licencing.

A note on mapping an Oracle Processor Licence to an Azure vCPU:

https://www.oracle.com/assets/cloud-licensing-070579.pdf

“Microsoft Azure – count two vCPUs as equivalent to one Oracle Processor license if hyperthreading is enabled, and one vCPU as equivalent to one Oracle Processor license if hyperthreading is not enabled.”

If you’ve got 2 solr servers, and 3 zookeeper servers, all running as Quad Cores, that’s 5x4=20 CPU’s, which might be up to 20x$25=$500 a month. Or if the hyperthreading detail applies above, might ve $250 a month. And even cheaper if have a load of servers to volume licence. Would require Java licencing to confirm actual price for your particular scenario.

Open JDK

What the alternative’s to paying Oracle for commercial support?

Open JDK is the alternative.

https://blog.joda.org/2018/09/do-not-fall-into-oracles-java-11-trap.html

Is anyone using Open JDK?

If you look at the docker community, most Docker images which use Java use an Open JDK variant.

(was saying DEPRECATED - This image is officially deprecated in favor of the Open JDK image, and will receive no further updates after 2016-12-31 (Dec 31, 2016). Please adjust your usage accordingly.)
https://hub.docker.com/_/java/

Shows previously issues/questions on legality of Java on Docker
https://blog.takipi.com/running-java-on-docker-youre-breaking-the-law/

Explains issues, and update on support now
https://devops.stackexchange.com/questions/433/is-there-no-oracle-jdk-for-docker

Flow chart of which OpenJDK to choose for Docker
https://medium.com/@hudsonmendes/docker-spring-boot-choosing-the-base-image-for-java-8-9-microservices-on-linux-and-windows-c459ec0c238

Update on Oracle Java support for Docker
https://blogs.oracle.com/developers/official-docker-image-for-oracle-java-and-the-openjdk-roadmap-for-containers

Official Java Docker images, but appears have to sign up to see them.
https://hub.docker.com/_/oracle-serverjre-8

There are many version of Open JDK, but which version should I use?

This posts lists out the different flavours of the Open JDK
https://blog.joda.org/2018/09/time-to-look-beyond-oracles-jdk.html

Adopt Open JDK appears to be the main choice, with longer term updates, and actually free.
https://adoptopenjdk.net/

Red Hat are supporting it (and IBM which have now bought Red Hat)
https://developers.redhat.com/blog/2018/09/24/the-future-of-java-and-openjdk-updates-without-oracle-support/

Amazon are releasing their own version of Open JDK, which they use internally, but still in public preview, but certainly one to look out for, and not just for use on AWS - can use off AWS which sounds awesome.

I noticed on this tweet that the version of Java Azure App Service was running was Azul.
https://twitter.com/dancruickshank/status/1072541500058284034

A quick google later I found that was announced in September, that if you are an Azure customer, can use Azul Open JDK for no extra cost. So that’s awesome too if you are an Azure customer, but this is just for use on Azure.

Summary

Ultimately you’ve got to way up the pros/cons for your particular scenario, pay a monthly fee to stay on official Oracle Java with security updates. Or switch to the Open JDK, and pick the variant which fits you well the best - and ensure your Java software is compatible with the Open JDK you’ve chosen.

It would seem if looking to move to Docker & Kubernetes eventually, then embracing the Open JDK seems to be the standard anyway. And even if Oracle engineers aren’t going to be supporting the Open JDK anymore, got a choice of Red Hat/IBM, Amazon and Azul (free on Azure) to go for.