Inverno Framework


Another day, another microservices framework. This one’s called “Inverno”, a framework for Java that emphasizes modularity (embracing the Java module system) and reactive coding.

The code itself looks pretty similar to what Spring Boot would use, so we’ll have to see how it compares as Spring Boot starts to leverage the module system itself (writing from ignorance here, as I’ve only dabbled in modules; the ecosystem still feels like it’s unprepared).

There’s also another article on Medium about it: “Native Inverno with GraalVM” walks through building a somewhat-limited application and looks at the results of migrating to GraalVM:

  • A 3ms startup time - compared to the JVM’s 258ms startup time; if startup time is your thing, you might be in paradise
  • A halved throughput measurement; apparently the startup time comes at a cost! And yes, there’s a reason for it.

The halved performance is huge. And it’s present for native images in Quarkus and Spring Boot, based on the author’s tests.

From the looks of it (and the explanation agrees), it’s due to JIT and the runtime optimizations, which native images have a difficult time replicating. GraalVM has a guided optimization process that can help here, but it only means the native image is running at roughly 66% of the speed of the JVM at runtime (despite the extra startup time the JVM has, I guess?).

His conclusion is excellently written:

With cloud and container technologies, the portability offered by the JVM has become less attractive and can even be seen as an issue because of unecessary long startup time and preheating phase. A native image partly solves this issue and offers extremely fast startup.

On the other hand, if I consider the complexity, the impact on the code and the limitations in using the full power of the JVM, I’m not sure that generating native images for regular long running microservice applications is something desirable. This is all the more true given that native images perform poorly compared to the JVM, even with profile guided optimization which is also not so easy to set up and only comes with the non-free GraalVM Enterprise Edition.

So is Java native the future of Java? Yes most probably, that’s where the industry is going, but caveats are currently too big and the only application I can see right now is for serverless/FaaS applications for which extremely fast startup is a must. But for any other use case, I think it is important to reduce the startup time to the minimum, make the most efficient usage of resources and let the JVM do the rest which is precisely what the Inverno Framework is doing.

in java architecture microservices framework graalvm

Reading time: 2 minutes.