SlideShare a Scribd company logo
The Framework Redefining Java
for Microservices and Beyond
•Introduction to Micronaut
•Key differences: Compile-time vs. Runtime
•How Micronaut uses Ahead-of-Time (AOT) compilation
•Why avoiding runtime reflection is important
•Use cases where reflection is still required
•Micronaut or Spring Boot
Agenda
Introduction to Micronaut
- Modern, JVM-based framework
- Designed for microservices and cloud-native applications
- Focuses on low memory footprint and fast startup time
- Compile-time dependency injection and AOP
Key differences: Compile-time vs.
Runtime Spring Boot Micronaut(Compile time)
Startup Time 5-10 seconds 1-2 seconds
Memory Usage 250-350MB 50-100MB
Bean Creation Runtime reflection Direct instantiation
Proxy Generation Runtime dynamic proxies Compile-time generated
Configuration Runtime processing Compile-time processing
Class Loading Full classpath scan Pre-computed metadata
Hot Reload Supported Limited support
Just In Time (JIT)
Image Credit: azul
The Framework Redefining Java for Microservices and Beyond
Ahead-of-Time (AOT) compilation
• Compilation Process
•AOT compiles code before the application starts
•Generate native machine code that can be directly executed by CPU
•Reduce runtime overhead and speed up start up time
•Compile time Dependency Injection
•Proxy Less Design
• Key Benefits
• Faster Startup time
• Reduce Memory Consumption
•Lower Runtime performance overhead
• More predictable memory usages
Bean
Initialization
10-30x slower
then direct
initialization
Use Cases where Reflection is required
[
{
"name": "org.cm.transformer.StringCapitalizer",
"methods": [
{
"name": "capitalize",
"parameterTypes": [
"java.lang.String"
]
}
]
},
{
"name": "org.cm.transformer.StringReverser",
"methods": [
{
"name": "reverse",
"parameterTypes": [
"java.lang.String"
]
}
Why Runtime Reflection is important
•Flexibility
•AOP
•Dynamic Behavior
How proxy generates
additional reflection-based
method invocations
Micronaut or Spring Boot
Any Question?

More Related Content

PDF
Introduction to Micronaut - JBCNConf 2019
PPTX
Micronaut: A new way to build microservices
PDF
Introduction to Micronaut at Oracle CodeOne 2018
PDF
Microservices with Micronaut
PDF
Micronaut Deep Dive - Codeone 2019
PDF
Micronaut Deep Dive - Devnexus 2019
PPTX
Discover Micronaut
PDF
Micronaut Launchpad
Introduction to Micronaut - JBCNConf 2019
Micronaut: A new way to build microservices
Introduction to Micronaut at Oracle CodeOne 2018
Microservices with Micronaut
Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Devnexus 2019
Discover Micronaut
Micronaut Launchpad

Similar to The Framework Redefining Java for Microservices and Beyond (20)

PDF
Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
PDF
Micronaut: Evolving Java for the Microservices and Serverless Era
PDF
Micronaut: Changing the Micro Future
PDF
Micronaut Deep Dive - Devoxx Belgium 2019
PPTX
Micronaut brainbit
PDF
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
PDF
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
PDF
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
PDF
Java Cloud Native Hack Nights GDL
PDF
Micronaut Framework Guide Framework Basics and Fundamentals.pdf
PDF
Introduction to Micronaut
PDF
Microservices with Micronaut
PDF
Microservices with Micronaut
PPTX
Greach 19 - Micronaut Performance
PDF
Grails 4 and Micronaut at Devnexus 2019
PDF
Open talk micronaut
PDF
jLove 2020 - Micronaut and graalvm: The power of AoT
PDF
Codemotion Madrid 2018 - Microservicios Reactivos con Micronaut
PDF
Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019
PDF
Taking Micronaut out for a spin
Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
Micronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Changing the Micro Future
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut brainbit
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
Java Cloud Native Hack Nights GDL
Micronaut Framework Guide Framework Basics and Fundamentals.pdf
Introduction to Micronaut
Microservices with Micronaut
Microservices with Micronaut
Greach 19 - Micronaut Performance
Grails 4 and Micronaut at Devnexus 2019
Open talk micronaut
jLove 2020 - Micronaut and graalvm: The power of AoT
Codemotion Madrid 2018 - Microservicios Reactivos con Micronaut
Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019
Taking Micronaut out for a spin
Ad

Recently uploaded (20)

PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Well-logging-methods_new................
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
PPT on Performance Review to get promotions
PPTX
UNIT 4 Total Quality Management .pptx
PPT
Mechanical Engineering MATERIALS Selection
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Sustainable Sites - Green Building Construction
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Automation-in-Manufacturing-Chapter-Introduction.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Well-logging-methods_new................
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
OOP with Java - Java Introduction (Basics)
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
CH1 Production IntroductoryConcepts.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPT on Performance Review to get promotions
UNIT 4 Total Quality Management .pptx
Mechanical Engineering MATERIALS Selection
Ad

The Framework Redefining Java for Microservices and Beyond

  • 1. The Framework Redefining Java for Microservices and Beyond
  • 2. •Introduction to Micronaut •Key differences: Compile-time vs. Runtime •How Micronaut uses Ahead-of-Time (AOT) compilation •Why avoiding runtime reflection is important •Use cases where reflection is still required •Micronaut or Spring Boot Agenda
  • 3. Introduction to Micronaut - Modern, JVM-based framework - Designed for microservices and cloud-native applications - Focuses on low memory footprint and fast startup time - Compile-time dependency injection and AOP
  • 4. Key differences: Compile-time vs. Runtime Spring Boot Micronaut(Compile time) Startup Time 5-10 seconds 1-2 seconds Memory Usage 250-350MB 50-100MB Bean Creation Runtime reflection Direct instantiation Proxy Generation Runtime dynamic proxies Compile-time generated Configuration Runtime processing Compile-time processing Class Loading Full classpath scan Pre-computed metadata Hot Reload Supported Limited support
  • 5. Just In Time (JIT) Image Credit: azul
  • 7. Ahead-of-Time (AOT) compilation • Compilation Process •AOT compiles code before the application starts •Generate native machine code that can be directly executed by CPU •Reduce runtime overhead and speed up start up time •Compile time Dependency Injection •Proxy Less Design • Key Benefits • Faster Startup time • Reduce Memory Consumption •Lower Runtime performance overhead • More predictable memory usages
  • 9. Use Cases where Reflection is required [ { "name": "org.cm.transformer.StringCapitalizer", "methods": [ { "name": "capitalize", "parameterTypes": [ "java.lang.String" ] } ] }, { "name": "org.cm.transformer.StringReverser", "methods": [ { "name": "reverse", "parameterTypes": [ "java.lang.String" ] }
  • 10. Why Runtime Reflection is important •Flexibility •AOP •Dynamic Behavior
  • 11. How proxy generates additional reflection-based method invocations