JavaLand 2023: "When Is Native Java With GraalVM Worthwhile for Me?"
Summary
- For most users, native Java is not worthwhile right now.
- In the cloud, Java is more expensive than competitors like Go.
- Native Java makes Java cheaper, but spends developer time to save operational costs.
- Native Java sometimes doesn’t work, and sometimes doesn’t make business sense.
- In my sample application, going from Spring Boot 2.7 to Quarkus reduced the startup time from 600 ms to 10 ms and the initial memory allocation from 107 MB to 6.7 MB.
- The sweet spot is microservices on Kubernetes – we can run more pods per node there if the applications aren’t CPU limited.
- We should use a framework with GraalVM: Spring Boot 3, Quarkus, or Micronaut.
Please see my slides for why I came to this conclusion.
Information additional to the slides is below.
And here’s how to get started with native Java:
Table Of Contents
- Summary
- Logistics
- Who Made Me the Expert?
- ADVERTISEMENT
- Slides
- Get Started With Native Java
- Additional Talk Information
Logistics
Conference
JavaLand 2023 is a three-day on-site conference. It currently run from March 20 through March 23, 2023. Talks are scheduled for the 21. and 22. There’s an unconference on the 20. and workshops on the 23.
It’s Germany’s biggest Java conference. It has 2.412 visitors in 2023, the most ever! The German Oracle User Group, the Association of the German Java User Groups, and the German publisher Heise Medien organize this conference. All talks are recorded.
I spoke at JavaLand in 2021 about how Java developers should build front-ends. In 2022, I gave talks about (Google’s cross-platform UI framework Flutter and data versions in Java).
You can buy a ticket here to stream all talks here:
Talk
My German talk “Wann lohnt sich Native Java mit GraalVM für mich?” (“When Is Native Java With GraalVM Worthwhile for Me?”) will be on Wednesday, March 22, 2023, at 14:00 local time. The talks don’t have a URL of their own. Instead, they are overlay windows. So please use this link to search for my name and then click on the “magnifier with plus” icon to see the abstract.
Abstract
German
Java dominiert Enterprise-Anwendungen. Aber in der Cloud ist Java oft teurer als Konkurrenten wie JavaScript, Python oder Go. Native Java durch die GraalVM AOT (Ahead-of-Time) Compilation macht Java billiger: Die entstehenden, nativen Java-Anwendungen starten viel schneller und benötigen weniger Speicher. Aber das klappt nicht für alle Java-Anwendungen, macht Entwicklung & Betrieb komplizierter und ist auch noch recht neu.
Wann lohnt sich nun Native Java für mich? Meist beleuchten Vorträge zu diesem Thema entweder nur die Vorteile oder bloß die Nachteile und geben “Kommt darauf an” als Empfehlung.
Mein Vortrag dagegen beleuchtet sowohl Vorteile als auch Nachteile von Native Java. Ich erkläre, wie Native Java funktioniert und wann Sie es nicht einsetzen können. Und ich sage Ihnen konkret, wann sich Native Java für Sie lohnt – und wann nicht.
English
Java dominates enterprise applications. But in the cloud, Java is often more expensive than competitors like JavaScript, Python, or Go. Native Java with the GraalVM AOT (Ahead-of-Time) compilation makes Java cheaper: The resulting native Java applications start much faster and use less memory. But that doesn’t work for all Java applications, makes development & operation more complicated, and is also quite new.
When is native Java worthwhile for me? Usually talks on this topic either only highlight the advantages or only the disadvantages and give “It depends” as a recommendation.
My presentation, on the other hand, examines both the advantages and disadvantages of native Java. I explain how native Java works and when you can’t use it. And I’ll tell you specifically when native Java is worth it for you - and when not.
Who Made Me the Expert?
In the spring of 2022, I was the editor of a highly popular, six-part article series about native Java on InfoQ. I have data to back up my claims. And Java experts helped me.
Unlike some other talks which are either pro or against GraalVM Native Image, I’m neutral on it. I’m the Switzerland of GraalVM talks! Which is quite fitting, as my current project is in Switzerland! 😃 I’m not selling books or training courses, and I’m not a developer advocate. I share my experiences and my knowledge so you can do get better projects faster!
ADVERTISEMENT
Developer job ads down 32% year over year, Stack Overflow questions dropped 55% since ChatGPT. I now recommend IntelliJ Community Edition because many AI code assistants don't run in Eclipse. Job ads for Quarkus hit an all-time high.
See All Issues & Subscribe
Slides
Here are the slides as PDF. They have more content and more text than my talking slides. They are just 1.8 MB:
You can also get the slides in their original Keynote format. “Keynote” is Apple’s presentation application. Why would you do that? My slides have less text than the PDF version, so you can see what I cut. I also animated the slides, so they are more pleasant to watch. Or maybe you want to peek under the hood to see how I achieved specific effects. The slides also have fewer words than the PDF ones - it’s a talk, not a read! But they do have speaker notes. These slides are a whoppin’ 36.1 MB.
Get Started With Native Java
Here’s my page for getting started with native Java.
- It tells you how to install the tools for Spring Boot 3 and Quarkus and how to build native executables.
- It explains in more detail how Java works and how GraalVM works.
Additional Talk Information
Demo Application
The demo application converts images to PDFs. It’s available for Spring Boot 2 & 3 and Quarkus. Check it out below.
Other JavaLand 2023 Talks
There are some other talks about GraalVM and related topics:
- “To InstantOn and Beyond: Java at Lightspeed!” by Grace Jansen
- “The Next Frontier in Open Source Java Compilers: JIT-as-a-Service” by Grace Jansen
- “GraalVM” by Stephan Rauch
- “Schlanke Spring Boot Applikationen für die Cloud” by Patrick Baumgartner
Part 23 of 25
in the
Conference Talks
series.
« JAX London 2023: "When Is Native Java With GraalVM Worthwhile for Me?"
|
JAX London 2022: "Flutter for Java Developers: Mobile, Web, and Desktop with One Codebase?" »
| Start: Java Forum Stuttgart 2019: "When Using the Application Generator Jhipster Is Worth It - and When Not"
Developer job ads down 32% year over year, Stack Overflow questions dropped 55% since ChatGPT. I now recommend IntelliJ Community Edition because many AI code assistants don't run in Eclipse. Job ads for Quarkus hit an all-time high.
Read my newsletter