Oracle is making GraalVM Community Edition – a native code compiler for Java – part of the OpenJDK, though excluding the “polyglot technologies” that support other programming languages such as JavaScript, Python, Ruby, R and WebAssembly.
GraalVM Community Edition was already open source but the company said that moving to OpenJDK will address obstacles including “differences in release schedules, features, and development processes.”
One of the implications of the move is that GraalVM will in due course become part of the JEP (Java Enhancement Proposal) process. “When suitable portions of the GraalVM technologies are ready to be proposed for inclusion into the main-line JDK source code, they will be accompanied by one or more JEPs,” Oracle said. A further implication is that GraalVM releases will be aligned with those for the JDK (Java Development Kit), with two feature releases per year, and a long-term support release every two years. This alignment is planned for sometime in 2023, though when is not stated.
The plans do include migration of “the most applicable parts of the GraalVM Native Image implementation” to OpenJDK. Native Image compiles Java code into a standalone native executable, with no requirement for a JVM (Java Virtual Runtime) to be installed on the target system. A benefit is faster start-up as well as potentially better performance, simplified deployment and for security, a reduced attack surface. Native Image is particularly suitable for container deployments and according to the documentation can improve start-up time by up to 50x.
GraalVM is a complex and multi-faceted project. It can be used as a JVM (Java Virtual Machine) with a just-in-time compiler, as an alternative to Native Image. There is also a mode called Java on Truffle, where the Truffle framework is a library for running multiple programming languages on the JVM. This eanbles seamless interoperability between languages.
One snag with the new OpenJDK integration is that Oracle is not contributing the GraalVM Enterprise Edition, which has additional performance optimizations and security features, where the optimizations “typicially provide an additional 20% application performance improvement.”
GraalVM is interesting technology and making it part of OpenJDK may help to win more attention. Java remains wildly popular, third after JavaScript and Python in the Redmonk programming language rankings; but the energetic development of other technologies such as the V8 JavaScript engine and WebAssembly makes Java seem staid by comparison. More community involvement in GraalVM could help address that. “I was always scared that Oracle could slap some $$$ licensing scheme for GraalVM, but this proves me wrong,” remarked one developer, though the fact that best performance requires the Enterprise version does spoil the picture.