Helidon
From APIDesign
Line 1: | Line 1: | ||
- | [http://helidon.io helidon.io] is a microservices framework developed four meters away from me (my seat in [[Oracle]] Prague office). As such [[I]] | + | [http://helidon.io helidon.io] is a microservices framework developed ''four meters away from me'' (my seat in [[Oracle]] Prague office). As such [[I]] felt as the natural fit for solving complex tasks that require understanding of both sides - the [[JavaEE]] landscape as well as the [[GraalVM]] internals. |
- | [[Helidon]] MP | + | === [[Helidon]] MP 2.0 supports [[GraalVM]] [[NativeImage]] === |
- | + | [[Helidon]] MP implements the [[MicroProfile]] specification based on various other standard [[JavaEE]] subspecifications including [[CDI]]. Getting [[Weld]] (the reference [[CDI]] specification) running on top of [[NativeImage]] is particularly tricky. Not only [[Weld]] dynamically scans for various annotations, but it also dynamically emits [[bytecode]] for its helper classes during runtime. Solving this required more insight into [[JavaEE]] than available among compiler engineers - not that [[I]] had it initially, but the close co-operation with Tomáš Langer (the [[Helidon]] lead engineer) helped us move forward. Tomáš prepared various trivial [[CDI]] sample projects and [[I]] was then able to get them running on [[NativeImage]] by writing a dedicated '''WeldFeature'''. Once the initial road block was gone the [[Helidon]] team was able to move forward. [[Helidon]] 2.0 has been released on June 24, 2020. It's [[MicroProfile]] edition works with [[NativeImage]]. | |
- | [[GraalVM]] offers not only [[NativeImage]] compilation, but also polyglot capabilities. During the [[FifthGraalAdventures]] we also | + | === [[Debugging]] === |
+ | |||
+ | Particularly tricky issue related to [[NativeImage]] is [[debugging]]. It is not easy to debug [[Java]] code with [[gdb]]. People tend to avoid doing so as much as possible. In certain situations that's however unavoidable and [[I]] tried to be as helpful as possible. I remember spending a week in [[debugging]] a race condition in the database connection driver just to find out that the test is buggy and works in [[HotSpot]] mode just because [[HotSpot]] is too slow when booting up. | ||
+ | |||
+ | === Related === | ||
+ | |||
+ | [[GraalVM]] offers not only [[NativeImage]] compilation, but also [[polyglot]] capabilities. During the [[FifthGraalAdventures]] we also prepared sample [[Helidon]] application that successfully use [[GraalVM]]'s [[Ruby]] and [[JavaScript]] interpreters to handle incoming connections. |
Revision as of 14:57, 29 June 2020
helidon.io is a microservices framework developed four meters away from me (my seat in Oracle Prague office). As such I felt as the natural fit for solving complex tasks that require understanding of both sides - the JavaEE landscape as well as the GraalVM internals.
Helidon MP 2.0 supports GraalVM NativeImage
Helidon MP implements the MicroProfile specification based on various other standard JavaEE subspecifications including CDI. Getting Weld (the reference CDI specification) running on top of NativeImage is particularly tricky. Not only Weld dynamically scans for various annotations, but it also dynamically emits bytecode for its helper classes during runtime. Solving this required more insight into JavaEE than available among compiler engineers - not that I had it initially, but the close co-operation with Tomáš Langer (the Helidon lead engineer) helped us move forward. Tomáš prepared various trivial CDI sample projects and I was then able to get them running on NativeImage by writing a dedicated WeldFeature. Once the initial road block was gone the Helidon team was able to move forward. Helidon 2.0 has been released on June 24, 2020. It's MicroProfile edition works with NativeImage.
Debugging
Particularly tricky issue related to NativeImage is debugging. It is not easy to debug Java code with gdb. People tend to avoid doing so as much as possible. In certain situations that's however unavoidable and I tried to be as helpful as possible. I remember spending a week in debugging a race condition in the database connection driver just to find out that the test is buggy and works in HotSpot mode just because HotSpot is too slow when booting up.
Related
GraalVM offers not only NativeImage compilation, but also polyglot capabilities. During the FifthGraalAdventures we also prepared sample Helidon application that successfully use GraalVM's Ruby and JavaScript interpreters to handle incoming connections.