Introduction to GraalVM (Community Edition): and what does the future look like? | Java code geeks


1. Introduction

In this final part of the tutorial, we are going to speculate on the future of GrailVM, both from a short and long term perspective. I think there are three main themes that GrailVM will evolve:

Let’s talk briefly about some work in progress and already completed in these directions.

2. Bridge the gap

In the previous parts of the tutorial, we mentioned a number of limits associated with construction native image sure GrailVM, however, the situation has since changed.

Fair recently serialization support was added at native image, managed by the new property -H:SerializationConfigurationResources. Tracing Java Agent is now able to capture serialization activities and export them to serialization-config.json drop off.

In addition, the recent Version 21.0.x provides full support for method handles. The methods accessible via method descriptors should be saved in the same configuration file as the reflection methods, and this configuration could be generated automatically via tracing. Java Agent. Please note that the VarHandleS that are not stored in static fields are still not supported.

And even that’s not all. A new website GraalVM dashboard the tool was recently announced (in beta). It is a dashboard to visualize the arbitrary aspects of dynamic and static builds in GrailVM and native image. The tool was designed to display information about method compilation, accessibility, class usability, profiling data, and even information about dynamic compilation pressure, compiled code lifetime, the number of compilation, deoptimization, etc. Currently it is available as a hosted option and supports only Native image dump format which could be produced by passing command line options:

  • -H:DashboardDump=<path> to set the path of the dump file
  • -H:+DashboardAll to empty all available data

So what else is cooking for native image?

As you can conclude from the above, support for different GCs is the most requested feature. In addition to this, there are some notable Truffle current developments:

On a slightly different note, a nicely prepared GraalVM quick reference summarizes all the keys GrailVM options and controls to illustrate its capabilities.

3. Ecosystem maturity

Without a doubt, the ecosystem around GrailVM matures very quickly. New versions of Micronaut, Helidon and Quarkus are removed regularly, which adds stability and supports more libraries and integrations. the Native spring has been switched to beta, an important step in the multi-year journey towards preparation for production.

4. Alternative distributions

Another trend that we observe is the appearance of alternative distributions based on GrailVM Community edition. The first is Mandrel, a community distribution of GrailVM for the Red Hat build from Quarkus.

Mandrel is a downstream distribution of GrailVM Community edition. MandrelThe main objective of is to provide a native-image release specifically to take over Quarkus. The goal is to align the native-image capacities of GrailVM with OpenJDK and Red Hat Enterprise Linux libraries to improve maintainability for Quarkus applications.

https://github.com/graalvm/mandrel

The other is Liberica Native Image Kit (or soon, Liberica NIK) by BellSoft, a well-known supplier of the similar name Liberica JDK Distribution.

Liberica Native Image Kit (Liberica NIK) is a utility that converts your JVM based application into a fully compiled native AOT executable under the assumption of a closed world with almost instantaneous startup time. It is based on open source GrailVM Community edition. Be compatible with a variety of platforms including lightweight muscle-based Alpine Linux, this technology optimizes the consumption of resources and minimizes the static footprint.

https://bell-sw.com/announcements/2021/02/19/BellSoft-releases-Liberica-Native-Image-Kit/

It is very likely that we should expect more suppliers to go out and provide GrailVM distributions, supplemented by additional features, tools and support.

5. Leyden project

At one point it became clear that the scope of native image (and in general, AOT compilation on JVM) goes well beyond the simple GrailVM. Exactly one year ago, the new Leyden project was announced with the ambitious goals of standardizing native static images at the JVM platform level.

Unfortunately, there aren’t many details available on the Leyden project today and it seems that his establishment is still in progress. In the meantime, the experimental jaotc the command line tool has been removed from OpenJDK distributions from JDK 16. The rest is not clear, I hope more details on the Leyden project will soon emerge.

6. Conclusions

Here at the end of the introductory tutorial to GrailVM Community edition. Hopefully this technology has caught your attention and will find its way into your projects or / and organizations. It’s hard to predict the future by being an insider, even harder by being an outsider, but every pointer suggests that GrailVM is here to stay. It is not known how the relation between GrailVM and OpenJDK will evolve, but it is heartbreaking to see the inspiring projects that result from this partnership.



Source link

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *