Features in Java 9, 10 and 11 that enhance the performance of a distributed system

Yury Niño
3 min readMar 9, 2019

Since the release of Java 9 in September 2017, Java 10 in March 2018 and Java 11 in September 2018, several performance improvements have been included. Considering that it helps in the implementation of microservices solutions and inspired by [1] I have selected some of the features that could bring quality and accelerate the development and the performance of distributed architectures.

Taken from [2]

In the next 3 entries, I am going to address these features for each Java version. For now, this article includes the features for Java 9:

JEP 102 — Process API Updates

Description

Changes in the API for controlling and managing operating-system processes. Now, the java.lang.ProcessHandle class returns information about each process according to the operating system, including process id, arguments, command, start time, etc.

Benefit

Considering that in a distributed environment, the systems can be deployed in different operating systems, this feature helps to monitor and control native processes.

JEP 110 — HTTP/2 Client

Description

Define a new HTTP client API that implements HTTP/2 and WebSocket. It replaces the legacy HttpURLConnection API, which supported HTTP/1.1 and was hard to use and maintain.

Benefit

The new API replaces the existing problematic API HttpURLConnection. Although the performance comparisons only can be done in the context of the operation, it should be better, considering that it is a new protocol and it should have improvements in scalability and latency.
Memory consumption of the new API is on par or lower than when using HttpURLConnection.

JEP 158 — Unified JVM Logging

Description

Introduce a common logging system for all components of the JVM.

Benefit

The new infrastructure for JVM logging allows better identification of the root cause of crashes or performance issues. The new infrastructure for JVM logging allows better identification of the root cause of crashes or performance issues.

JEP 165 — Compiler Control

Description

With this version, the JVM compilers can be controlled at runtime using certain flags called directives, which are immutable for the duration of a compilation.

Benefit

This provides better control in distributed computing because it provides a fine-grained and method-context dependent control of the JVM compilers (C1 and C2). Now, the compiler testing is possible while it is running.

JEP 193 — Variable Handles

Description

Define a standard for handling variables as a reference under different access modes (static, instance, array elements, array views, byte or char array, and so on).

Benefit

With the increase in the use of concurrent and parallel programming, this feature helps to achieve atomicity and order operations on the variables and in consequence a better control over them.

JEP 197 — Segmented code cache

Description

Divide the code cache into distinct segments, each of which contains compiled code of a particular type.

Benefit

Considering that the separation of specialized code provides better performance and control of JVM memory footprint. In a distributed architecture, it improves the management of heterogeneous code.

References

[1] Java 9 High Performance: Practical techniques and best practices for optimizing Java applications through concurrency, reactive programming.

https://openjdk.java.net/jeps/102

https://openjdk.java.net/jeps/110

https://openjdk.java.net/jeps/158

https://openjdk.java.net/jeps/165

https://openjdk.java.net/jeps/193

https://openjdk.java.net/jeps/197

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Yury Niño
Yury Niño

Written by Yury Niño

Cloud Infrastructure Engineer @Google. Chaos Engineer Advocate. Loves building software applications, DevOps, Security and SRE

No responses yet

Write a response