3 ms·
The only things those frameworks offered were compile-time dependency injection (Spring injects at runtime, and can make startup slower)... and support for buil
by StevePerkins 5y ago
The only things those frameworks offered were compile-time dependency injection (Spring injects at runtime, and can make startup slower)... and support for building AOT native executables with GraalVM (Spring couldn't do that before because Graal has poor support for its reflection-based dependency injection).
Within a few months of Micronaut and Quarkus emerging, Spring started working on the "Spring Boot Native" project. Allowing you to build AOT compiled native executables with GraalVM. That’s now fully released for production if you want it.
Ironically, aside from perhaps some "serverless" applications where startup time is more important, the traditional JIT applications typically outperform AOT native executables. Especially in the kind of long-running server tasks that Java is mostly used for in the enterprise. This is mostly about marketing and appearances, because newbies see the eye-popping AOT startup times (for "Hello World" demo apps), and Spring has to keep up with those bullshit examples.
But the point is that Spring DOES keep up. The Java enterprise ecosystem is at a point where occasionally something new gets introduced, but then Spring adds support for the same thing within a year or two. Since "a year or two" is a snap of the fingers in the enterprise world, there's just little incentive to migrate just because a new thing is "cooler" on Reddit. Especially when the new things have a minuscule fraction of the community, working out the bugs and producing the blog posts and StackOverflow answers that you rely on.
- sixbrx 5y agoApparantly with the enterprise version of GraalVM which enables PGO, there's no longer any significant performance penalty, with GraalVM running at 97% of regular JVM throughput: https://www.infoq.com/articles/native-java-graalvm/ https://www.infoq.com/articles/native-java-graalvm/ (section "Peak performance On Par with JVM")
- StevePerkins 5y agoThe point is that most newbies don't understand the ramifications of JIT and AOT. And assume that AOT is dramatically BETTER performing, based on overhyped startup time benchmarks. You try to explain to people that once an application has been running for 30 seconds (or whatever), AOT will never be as good as JIT let alone better. And half the time, you just draw blank stares like the "But this goes up to eleven!" scene from "Spinal Tap". Java (and to a somewhat lesser extent .NET) exist in a totally different social bubble. Because most of the students and early stage startup workers on Reddit and HN simply don't know what they're talking about most of the time.
- Tsarbomb 5y agoI feel you about that startup time garbage. I did end up working on a GraalVM based Spring Boot app that was super cool as part of our business requirements were taking in user provided Python and Javascript code for execution and executing that code on incoming events, sort of like a rules engine.
- gavinray 5y agoI agree with your point about a year or two being nothing in Enterprise timelines But to chime in, I much prefer the Quarkus/Vert.x ecosystem if I have a choice, due to developer experience and the overall ergonomics.