JVM

Galahad embarks on a journey to bring GraalVM to Java – JVM Weekly #117

Today will be short, as we’ll focus on single announcement that comes at us from the Java mailing lists. PS: But remember – stay for the scene after the credits 😉 .

Article cover

1. Galahad sets out to bring GraalVM to Java

During the recent JavaOne, the announcement was made that Oracle is releasing a GraalVM CE version for Java, and the project will be moved under the wings (and licenses) of the JDK. So far, details on how the whole thing will be implemented have been lacking. It’s important to remember that even moving the Java source code from the previous repository to GitHub was a long, complicated initiative that got its own Skara project.

In the case of GraalVM, we are not only talking about a pure migration from one service to another (which in itself is not trivial either, especially since the JDK repository was also moved from Mercurial to Git) but taking out a certain part of GraalVM and flipping it into a completely separate entity, which is the JDK. It is important to remember that GraalVM CE is a broader ecosystem, and only the Java part will be migrated. This makes the whole thing a complicated operation since all future changes to GraalVM will have to take into account the Java variant, with a different life cycle and license. Therefore, it comes as no surprise that a special initiative – the Galahad project – has been appointed to design and carry out that process.

I bow to the name. Galahad is King Arthur’s knight who delivered the Graal to Camelot. It made my heart warm despite the snow all around.

What does Galahad mean in practice? The first step will be the introduction of the JDK’s second (actually, third) JIT compiler. As a reminder – at the moment the JDK already has two different JITs – C1, C2. They are run at different stages of the application lifecycle – a process known as Tiered Compilation, which is brilliantly described in the chapter Working with the JIT Compiler of the book “Java Performance” by Scott Oaks. GraalVM will complement them. However, Ron Pressler has stated that GraalVM may replace C2 in the future. If you are curious about how the JIT compiler derived from GraalVM actually differs from the existing ones, I recommend the publications Deep Dive Into the New Java JIT Compiler – Graal.

The Ahead-of-Time compilation part of GraalVM is also expected to be ported at a later date. Here, the whole thing has interesting twists, as the initiative hooks up quite a bit with Project Leyden. Both Leyden and Galahad will be happening at the same time, and the developers of the latter have already announced that they will be heavily sensitive to what happens in its older brother.

PS: If you are not familiar with Project Leyden, you can read more about it in one of my older publications.

Reddit users point out that there is a mass of experienced engineers behind the project, with the GraalVM project leader himself. Galahad has chosen JDK 20 as a starting point. It’s also already clear that, as is the case with other projects, we are unlikely to expect one big migration, but a series of smaller JEPs that will gradually move GraalVM to JDK.

And that’s it for now. We can probably expect more announcements, first propositions, and actions soon.

Sources

Discover more IT content selected for you
In Vived, you will find articles handpicked by devs. Download the app and read the good stuff!

phone newsletter image

Bonus: Valhalla.

And if you’re a little short of today’s slightly smaller edition, a great video summary of the current state of Valhalla recently appeared on inside.java. Enjoy watching it by the Christmas tree 🎄.


PS1: And as we are already in the mood of Knights of the Round Table, I personally am a big fan (it could not be otherwise, my parents named me after no one else, but King Arthur). That’s why I wanted to recommend to you the film Green Knight, released in 2021 – one of the best reinterpretations of the Arthurian legends, preserving all their mystery, dilluted to the core by pop culture.

PS2: I will add also my beloved card game: Avalon, which will let you take on the role of Galahad yourself and set out to get the Grail.

PS3: while we’re on the subject of the board and card games, I’ll also suggest the  Shadow over Camelot, which also allows you to travel for the legendary chalice.

PS4: And if you want to know what happens if you fail to recover the Grail, a brilliant production with a heavy Soul-Like vibe is Tainted Grail: Conquest by Polish studio Awaken Dreams. There is also a board edition, but this one I haven’t had a chance to try this one yet. But you know, the holidays are coming…. do you hear me Santa?

In general:

PS5: And since there was also Valhalla as a bonus, if you liked Green Knight, this year’s The Northman is a cinema very similar in both atmosphere and form (and equally good)…

Yes, I’m stopping now.