days
1
5
hours
1
9
minutes
3
2
seconds
1
0
search
You can use whatever language you think is most productive to solve the task at hand

Meet GraalVM, Oracle’s polyglot virtual machine

Gabriela Motroc
GraalVM

© Shutterstock /dencg

Oracle’s GraalVM aims to remove the isolation between programming languages and enable interoperability in a shared runtime. The tech giant sees GraalVM as a language-level virtualization layer which allows leveraging tools and embeddings across all languages.

Having one single VM that would provide high performance for all programming languages, therefore facilitating communication between programs sounds like a dream, right? Not anymore. After years of research and development, Oracle is ready to introduce GraalVM to the world — have a look at its first production-ready release.

According to the blog post announcing the availability of GraalVM 1.0, this universal virtual machine designed for a polyglot world offers “high performance for individual languages and interoperability with zero performance overhead for creating polyglot applications. Instead of converting data structures at language boundaries, GraalVM allows objects and arrays to be used directly by foreign languages.”

You can use whatever language you think is most productive to solve the task at hand

GraalVM 1.0 allows you to run

– JVM-based languages like Java, Scala, Groovy, or Kotlin
– JavaScript (including Node.js)
– LLVM bitcode (created from programs written in e.g. C, C++, or Rust)
– Experimental versions of Ruby, R, and Python

Furthermore, this polyglot VM can run standalone, embedded as part of platforms such as OpenJDK or Node.js, or inside databases such as MySQL or the Oracle RDBMS.

Applications can be deployed flexibly across the stack via the standardized GraalVM execution environments. In the case of data processing engines, GraalVM directly exposes the data stored in custom formats to the running program without any conversion overhead.

One of the best parts about the GraalVM ecosystem is the language-agnostic tooling that can be applied to all GraalVM deployments. The core GraalVM installation provides a language-agnostic debugger, profiler, and heap viewer.

SEE ALSO: FastR: A new R virtual machine written in Java

Get started with GraalVM

GraalVM gives you enhanced performance for JVM-based applications written in languages such as Java, Scala, Groovy or Kotlin thanks to Graal, a dynamic compiler which improves efficiency and speed of applications. The Graal compiler is also available as an experimental option in JDK 10. However, you should be using it with GraalVM if you want to unlock the latest features and boost performance.

If you’re a JavaScript developer building Node.js apps, you should use Graal JavaScript [Graal.js], an ECMAScript compliant JavaScript engine. It provides all the benefits from the Graal stack, including language interoperability and common tooling.

If you want to find out more about GraalVM, you should check out the reference manual. All you have to do is choose your favorite language and go to its page. But before you do that, you should make sure the libraries and modules you use as dependencies work with GraalVM. To do it, please use the GraalVM Language Compatibility tool.

Author
Gabriela Motroc
Gabriela Motroc is editor of JAXenter.com and JAX Magazine. Before working at Software & Support Media Group, she studied International Communication Management at the Hague University of Applied Sciences.

Leave a Reply

2 Comments on "Meet GraalVM, Oracle’s polyglot virtual machine"

avatar
400
  Subscribe  
Notify of
Mani Sarkar
Guest

Thanks a great post, have liked it on Twitter, feel free to add your post and any such links to https://github.com/neomatrix369/awesome-graal/

Mani Sarkar
Guest

We have also put together a channel/playlist of videos related to these topics, see https://www.youtube.com/playlist?list=PLUz6BqeCy21T3xPMlzaaIeeKqx-KTwjRC