3 ms·
The point of Micronaut is Graal, you can compile it native, it consumes 10 times less memory and starts in few milis.
by hokkos 6y ago
The point of Micronaut is Graal, you can compile it native, it consumes 10 times less memory and starts in few milis.
- abeppu 6y agoCan you comment about how to actually use this approach for something useful? I've gotten toy services working with graal nativeimage, but every time I try moving a pre-existing project, I find that some library causes a problem.
- hokkos 6y agoGraal is a lot of work on some libraries, I had to use an xsd to pojo mapper, and it was a lot of profiling with the tracing agent that save the reflection and ressources used, when using spark java micro framework. But micronaut has a facility to automatically handling the mapping lib, so it is less work if it is supported. When porting the tracing agent and a lot of integration tests that test all the code branches is key.
- unscaled 6y agoI think it's a bit of misleading marketing. Sure, Micronaut (just like Quarkus and Helidon) is ready to be compiled with Graal out-of-the-box. But it doesn't magically make any library you use work with Graal, and it also doesn't mean you cannot get code based on other frameworks like Vert.x or Spring Boot work with Graal (with varying degrees of extra effort). Also, from all the benchmarks I've seen, GraalVM is not a free lunch. Native images trade peak performance for faster startup times and lower memory usage. It's a worthwhile trade for some people, but not for everyone. And yes, I know there are features like Profile-guided Optimization that can theoretically bring Graal closer to JIT in terms of peak performance, but these requires a very expensive Enterprise license ($18 per core/month).
- suyash 6y agoI prefer Helidon which also came out with 2.0 release
- pjmlp 6y agoAnyone that cares about AOT in Java could have gotten one of the commercial JDKs that offer it since around 2000, what GraalVM brings into the table is not having to pay for such tooling, although the best optimizations are still only available on the professional version.
- oblio 6y agoYou'd be surprised how many developers and companies would choose the worse alternative just because it is free.
- pjmlp 6y agoNo I wouldn't, that is how UNIX and C got widespread (those source code tapes on university campus), how nice productive RAD tooling is only available alongside Fortune 500 paychecks, and plenty of other examples.