Let's compare jvm frameworks 🎉💻
The idea is pretty simple:
How does the same simple service that is able to consume a message from a queue and expose some information via an HTTP endpoint looks like in different popular jvm frameworks/libs. And how do those services compare based on:
- startup time
- size of the artifact
- memory footprint
- personal take on the codebase feel
Each service uses a fictional domain consuming bookings over a queue and stores it in memory providing certain statistics for those bookings over HTTP.
~/repos/testing-jvm-frameworks > java --version
openjdk 13.0.1 2019-10-15
OpenJDK Runtime Environment (build 13.0.1+9)
OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
- MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
- CPU: 2,7 GHz Quad-Core Intel Core i7
- Memory: 16 GB 2133 MHz LPDDR3
Bootstapped using spring-initializr
Endpoints:
2019-12-19 12:50:16.616 INFO 9235 --- [main] d.l.test.bookings.BookingsApplication : Started BookingsApplication in 1.785 seconds (JVM running for 2.127)
Bootsrapped using micronaut cli
Endpoints:
15:44:12.614 [main] INFO io.micronaut.runtime.Micronaut - Startup completed in 22ms. Server Running: http://localhost:8080
Bootsrapped using quarkus starter
Endpoints:
Although quarkus supports graalvm and native-images it's currently not compatilbe with java11 & graalvm (quarkusio/quarkus#5691).
<to come....>
- Quarkus: https://www.youtube.com/watch?v=SQDR34KoC-8
- Micronaut: https://www.youtube.com/watch?v=RtjSqRZ_md4
- Quarkus vs. Micronaut: https://www.youtube.com/watch?v=hnEXOqcNXPs