Starting a Java application as fast as any executable with a memory footprint rivaling the most lightweight runtime engines is quickly becoming a reality, through Graal VM and ahead of time compilation. This in turn is a major boost for using Java for microservice and especially serverless scenarios. For a long time GraalVM seemed merely an exotic research project in an Oracle lab. However, things are moving fast now. A production ready GraalVM release is available – so we can start to leverage its goodness.
Microservice frameworks like Quarkus fully leverage GraalVM – and Spring is rapidly embracing it as well. The second major pillar of GraalVM is its polyglot capability: it can run code in several languages – JVM and non-JVM such as JavaScript/ES, Python, Ruby, R or even your own DSL. More importantly still: GraalVM enables code running in one language to interoperate with code in another language. Forget Rhino and Nashorn: Java to JavaScript interaction is so much better on GraalVM. Want to leverage Python libraries from Java? Or a C++ routine? GraalVM supports many and increasingly more forms of interoperability.
This session introduces GraalVM, its main capabilities and especially its practical applicability – now and in the near future. There are demonstrations of ahead of time compilation and use of Java based serverless functions with tiny run times and ultrafast startup. Quarkus and Apache Camel on Graal VM are shown and examples are presented of runtime interoperability of various non-JVM languages with Java.