Micronaut + GraalVM
A match made in Cloud Native
• Desarrollado por Object Computing (OCI)
• Graeme Rocher (@GraemeRocher)
• Diseñado para desarrollar Microservicios
• Compile time dependency injection.
• First class support for reactive programming
• Cloud Native
• Service Discovery (Consul, Kubernetes, Eureka)
• Distributed tracing (Zipkin, Jaeger)
• Serverless functions
• Micronaut builds its dependency injection data at compile
• Fully supports JSR-330 annotations as well.
• JDBC support
• JPA with Hibernate support
• Very good alternative to Spring Boot
• Simple, clean, small, lightweight.
• Programming model very familiar (Spring, CDI)
• Cloud Native ready!
• Ideal for microservices
• But… the JVM…
• OpenSource project at Oracle Labs
• Based in OpenJDK 8u
• GraalVM offers a comprehensive ecosystem supporting a
large set of languages (Java and other JVM-based
other LLVM-based languages) and running them in different
deployment scenarios (OpenJDK, Node.js, MySQL, Oracle
Database, or standalone).
• GraalVM runs Java applications faster, on the OpenJDK.
• Ahead-of-time compilation for native images.
• Insane startup times, reduce memory footprint…
• Run scripting languages faster.
Performance as ﬁrst class citizen
• GraalVM compiler can remove costly object allocations in
• Better inlining and more aggressive speculative
optimizations can lead to additional beneﬁts for complex
• Running applications in the JVM implies the status and
• GraalVM allow us to generate a native image without those
• The image generation process employs static analysis to
ﬁnd any code reachable from the main Java method and
then performs full ahead-of-time (AOT) compilation
• The resulting native binary contains the whole program in
machine code form for its immediate execution.
GraalVM in the real world
• Twitter is running GraalVM for almost 2 years now.
• Twitter is also contributing.