Java 11 Guidelines

The GigaSpaces Platform and GigaSpaces data grid support Java 11 starting from release 14.0.1. We strongly recommend reviewing the provided guidelines so you can fine-tune your Java implementation to achieve optimal system behavior and performance for applications based on GigaSpaces products.

 

The product (source code) is compiled with Java 8, but is compatible with a runtime of Java 11. From version 16.3.0 GigaSpaces docker image comes with Java 11 runtime.

Java Distributions

Oracle has made a number of significant changes to their terms and conditions regarding Java 11 usage and support, and have also aligned their releases with OpenJDK. GigaSpaces products are tested on OpenJDK, which is the de facto baseline for all popular JDK distributions on the market. The version of OpenJDK that GigaSpaces are using is openjdk_11_0_18.

Modules and Classpath

The JPMS (Java Platform Module System) was introduced in Java 9. JPMS is a modern alternative to the previous modularity architecture based on JARs and classpath. However, JPMS is still fairly new and adoption in the ecosystem is slow. As such, classpath is still fully supported and not deprecated in Java 11. GigaSpaces products currently continue to use the classpath system.

Additionally, as part of remodeling the Java code and attempting to reduce its size and complexity, some Java EE technologies have been excluded from the standard Java package and are instead available as independent modules. Applications that use these modules can include the relevant ones explicitly, instead of the Java distribution implicitly containing all of them. GigaSpaces products use some of those dependencies, which have been packaged under $GS_HOME/lib/platform/javax and are automatically included in the classpath.

Memory Footprint

Starting from Java 9, string implementation has been enhanced to use less memory in common use cases (see JEP 254). In a nutshell, in earlier Java versions each character in the string used at least two bytes, whereas from Java 9 and up common characters use only a single byte. This means that most strings consume ~50% less RAM in Java 11 environments, which may be significant for applications storing a lot of strings in the Space.

Performance

As with any Java application, the Garbage Collector (GC) should be fine-tuned and care should be taken to select a GC algorithm that meets requirements.

It is recommended to set verbose GC and analyze GC files to optimally tune the system.

For more information about garbage collection in Java-based systems, see Oracle’s Garbage Collection Tuning Guide for Java 11.

When upgrading to Java 11, it is important to be aware of the new default GC mechanism, and to choose the one that best serves your application requirements. If your configuration already explicitly sets the GC mechanism, this GC will be the one used with Java 11.

Security

For information regard TLS and selecting the encryption protocol, visit the Securing the Transport Layer page.

Third-Party Support for Java 11

Spring

Officially, Spring supports Java 11 starting from version 5.1. The GigaSpaces Platform and GigaSpaces data grid currently support Spring version 4.x and are packaged with the latest 4.3.x Spring release. Internal testing of GigaSpaces products with Spring version 5.1 has been performed and no issues were noted. Spring 5.x support is planned for a future release.

Hibernate

The GigaSpaces-Hibernate integration is currently based on Hibernate 4.1.9, which doesn't support Java 11. Hibernate support for Java 11 starts in version 5.3.3, and an updated GigaSpaces-Hibernate integration will be available in an upcoming release. Users that want to upgrade the Hibernate support can do so independently via the GigaSpaces-Hibernate extension in the open source software on Github.

Spark

The GigaSpaces Platform is currently packaged with Spark version 2.3.2, which is based on Scala version 2.11 that does not support Java 11. The latest Spark 2.4 release includes experimental support for Scala 2.12 and Java 11, but as the term suggests it not yet completely certified and the ecosystem has only partial support for this combination.

Spark 2.4 support is planned for a future release of the GigaSpaces Platform, at which point the GigaSpaces product will include the same level experimental support of Scala 2.12 and Java 11 as is provided with Spark 2.4.

Windows

GigaSpaces GigaSpaces, XAP.NET and GigaSpaces Platform use a dependency called Sigar, which does not support Java 11 on Windows environments. This dependency is optional and can be removed; it mainly affects resource monitoring. This issue is scheduled for improvement in a future release of GigaSpaces products.