Categories
Development

Graal basics

I spent last year designing and implementing javascript scripting support in our Java/Spring backend with the help of GraalVM and its polyglot support. I fell in love with Graal, as it brings quite a lot of features and performance improvements to Java JVM. Will focus on basics of Graal Polyglot capabilities in this article.

I’m not going to write about what is Graal, others have done this better:

https://www.graalvm.org/why-graalvm/
https://www.graalvm.org/reference-manual/embed-languages/

Nice article to read is also Top 10 Things To Do With GraalVM.

Make sure you follow their twitter and blog:
https://twitter.com/graalvm
https://medium.com/graalvm

And its a good idea to join public Graal slack group as the devs and community is quite active and eager to respond.

https://join.slack.com/t/graalvm/shared_invite/zt-anuczas6-PrCle0QVfUFPrnMEcp_JEw

From my experience you will need to ask for some advanced/hidden features as they are not described in docs or scattered between several sources. Advanced topics are described here:

https://github.com/oracle/graaljs/tree/master/docs/user

One of the killer features of Graal is its polyglot support. The most mature one is the Javascript scripting engine. And as opposed to previous javascript java implementation, its fully ECMAScript compliant so you have the whole JS library ecosystem at your disposal.