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.