SlideShare a Scribd company logo
1 of 34
Download to read offline
Micronaut and GraalVM:
The power of AoT
Iván López
(@ilopmar)
Iván López @ilopmar
Iván López (@ilopmar)
Iván López @ilopmar
GraalVM
- Substrate VM: compile Java applications to native binaries
- https://www.graalvm.org
Iván López @ilopmar
- Reflection (with config)
- Dynamic class loading (with config)
- Dynamic proxy (with config)
- Unsafe Memory Access (partially)
- Class initializers (supported)
- InvokeDynamic bytecode and method handlers (partially)
- Lambda (supported)
- Finalizers (not supported)
- Threads (partially)
Limitations
Iván López @ilopmar
- Framework for microservices in the JVM
- Ultra-lightweight & reactive (Netty-based)
- Java, Groovy & Kotlin
- Ahead of Time compilation (AoT)
- No reflection, no runtime proxies
- Fast startup
- Low memory footprint
- Natively Cloud Native
- GraalVM support (improved a lot in Micronaut 2.x)
Micronaut
Iván López @ilopmar
$ mn create-app basic-app
--features=graalvm
Create an application with GraalVM support
Iván López @ilopmar
$ mn create-app basic-app
--features=graalvm
Create an application with GraalVM support
Micronaut 2.2 (Gradle & Maven)
Iván López @ilopmar
$ ./gradlew nativeImage
$ ./mvnw package -Dpackaging=native-image
Create native-image
$ ./gradlew dockerBuildNative
$ ./mvnw package -Dpackaging=docker-native
Iván López @ilopmar
- Composable native-image.properties
How does it work?
Iván López @ilopmar
# inject/native-image.properties
Args = --allow-incomplete-classpath 
-H:EnableURLProtocols=http,https
# http/native-image.properties
Args = -H:IncludeResources=META-INF/http/mime.types
# http-netty/native-image.properties
Args = --initialize-at-run-time=
com.sun.jndi.dns.DnsClient,io.netty.handler.ssl.ConscryptAlpnSslEngine,io.netty.handler.ssl.Je
ttyNpnSslEngine,io.netty.handler.ssl.ReferenceCountedOpenSslEngine,io.netty.handler.ssl.JdkNpn
ApplicationProtocolNegotiator,io.netty.handler.ssl.ReferenceCountedOpenSslServerContext,io.net
ty.handler.ssl.ReferenceCountedOpenSslClientContext,io.netty.handler.ssl.util.BouncyCastleSelf
SignedCertGenerator,io.netty.handler.ssl.ReferenceCountedOpenSslContext,io.micronaut.buffer.ne
tty.NettyByteBufferFactory,io.netty.handler.ssl.JettyAlpnSslEngine$ClientEngine,io.netty.handl
er.ssl.JettyAlpnSslEngine$ServerEngine,io.netty.handler.codec.http2.Http2CodecUtil,io.netty.ha
ndler.codec.http2.CleartextHttp2ServerUpgradeHandler,io.netty.handler.codec.http2.Http2ServerU
pgradeCodec,io.micronaut.http.netty.channel.converters.EpollChannelOptionFactory,io.micronaut.
http.netty.channel.converters.KQueueChannelOptionFactory,io.micronaut.http.bind.binders.Contin
uationArgumentBinder$Companion,io.micronaut.http.bind.binders.ContinuationArgumentBinder
Micronaut includes everything (I)
Iván López @ilopmar
@AutomaticFeature
final class HibernateFeature implements Feature {
@Override
public void beforeAnalysis(BeforeAnalysisAccess access) {
// other drivers...
registerIfPresent(access, "oracle.jdbc.OracleDriver",
Oracle8iDialect.class,
Oracle9iDialect.class,
Oracle10gDialect.class,
Oracle12cDialect.class);
}
}
Micronaut includes everything (II)
Iván López @ilopmar
private void handleOracle(BeforeAnalysisAccess access) {
Class<?> oracleDriver = access.findClassByName(ORACLE_DRIVER);
if (oracleDriver != null) {
registerAllIfPresent(access, "oracle.jdbc.driver.T4CDriverExtension");
registerAllIfPresent(access, "oracle.jdbc.driver.T2CDriverExtension");
registerAllIfPresent(access, "oracle.net.ano.Ano");
registerAllIfPresent(access, "oracle.net.ano.AuthenticationService");
registerAllIfPresent(access, "oracle.net.ano.DataIntegrityService");
registerAllIfPresent(access, "oracle.net.ano.EncryptionService");
registerAllIfPresent(access, "oracle.net.ano.SupervisorService");
ResourcesRegistry resourcesRegistry = getResourceRegistry();
if (resourcesRegistry != null) {
resourcesRegistry.addResources("META-INF/services/java.sql.Driver");
resourcesRegistry.addResources("oracle/sql/converter_xcharset/lx20002.glb");
resourcesRegistry.addResources("oracle/sql/converter_xcharset/lx2001f.glb");
resourcesRegistry.addResources("oracle/sql/converter_xcharset/lx200b2.glb");
resourcesRegistry.addResourceBundles("oracle.net.jdbc.nl.mesg.NLSR");
resourcesRegistry.addResourceBundles("oracle.net.mesg.Message");
}
initializeAtBuildTime(access,
"oracle.net.jdbc.nl.mesg.NLSR_en",
"oracle.jdbc.driver.DynamicByteArray",
"oracle.sql.ConverterArchive",
"oracle.sql.converter.CharacterConverterJDBC",
"oracle.sql.converter.CharacterConverter1Byte"
);
initializeAtRuntime(access, "java.sql.DriverManager");
}
}
Micronaut includes everything (III)
Iván López @ilopmar
Micronaut includes everything (IV)
Iván López @ilopmar
Micronaut includes everything (V)
Iván López @ilopmar
- @Introspected
- @TypeHint
- @ReflectiveAccess
- GraalTypeElementVisitor
-reflect-config.json
-resource-config.json (* Micronaut 2.0)
Support in Micronaut
DEMO
Iván López @ilopmar
Demo
Iván López @ilopmar
14 vs 140 MB
What about memory?
Iván López @ilopmar
- Create a native image takes a lot of time
- And it needs a lot of RAM
- GraalVM changes so fast (and they break things)...
- ...and so we do ;-)
- We used Travis for testing Micronaut (now Github Actions), but...
- ...Travis has a limit for RAM
- We needed another way...
So… how do we test this?
Iván López @ilopmar
- Scheduled jobs every hour (2.2.x / 2.3.x)
- Only run if new commits in Micronaut or GraalVM
- Compile GraalVM from source code (JDK8 & JDK 11)
- Also test GraalVM stable
- Create native images for test Micronaut applications
- Run native images and execute functional tests
- https://github.com/micronaut-graal-tests
- https://gitlab.com/micronaut-projects/micronaut-graal-tests
Tests using Gitlab CI
Iván López @ilopmar
- Basic application: DI, POJO serialization, reactive types, HTTP Client
- Cache
- Micronaut function
- Service discovery: Consul & Eureka
- Static resources & views: Handlebars, Thymeleaf, Freemarker, Velocity, Pebble
- Management & Metrics endpoints
- Distributed tracing: Zipkin
- RabbitMQ: Fire-and-forget & RPC
- MQTT
Test applications Micronaut-GraalVM
Iván López @ilopmar
- Security: JWT, Basic Auth, Cookie, Session
- Scheduled jobs
- Micronaut Data JDBC: H2, Postgresql, Oracle, MariaDB, MS SQL Server
- Micronaut Data JPA-Hibernate: H2, Postgresql, MariaDB
- Bean Introspection
- Servlet: Tomcat & Jetty
- Flyway & Liquibase
- AWS app & function
- gRPC
Test applications Micronaut-GraalVM
Iván López @ilopmar
Gitlab CI
Iván López @ilopmar
Gitlab CI
Iván López @ilopmar
Gitlab CI 2 years ago
Iván López @ilopmar
x8
- JDK 8 & 11
- 2.3.x & 2.2.x
- GraalVM dev/stable
Gitlab CI today
Iván López @ilopmar
Gitlab CI
Iván López @ilopmar
Use cases
Iván López @ilopmar
- https://launch.micronaut.io (Google Cloud)
- Micronaut CLI: Linux, MacOS, Windows
- AWS Lambda + Custom runtime
Use cases
Iván López @ilopmar
GraalVM is a new and
interesting technology
Micronaut AoT is the
perfect match
Out-of-the-box support
in Micronaut
New improvements in
every release
Fast startup & low
memory footprint
Developers happy and
productive
Summary
Thank you!
@ilopmar
lopez.ivan@gmail.com
https://github.com/ilopmar
Iván López
https://bit.ly/jlove-micronaut
Questions?

More Related Content

What's hot

Native Java with GraalVM
Native Java with GraalVMNative Java with GraalVM
Native Java with GraalVMSylvain Wallez
 
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...LogeekNightUkraine
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRubyAmit Solanki
 
Don't dump thread dumps
Don't dump thread dumpsDon't dump thread dumps
Don't dump thread dumpsTier1 App
 
Find bottleneck and tuning in Java Application
Find bottleneck and tuning in Java ApplicationFind bottleneck and tuning in Java Application
Find bottleneck and tuning in Java Applicationguest1f2740
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with serverEugene Yokota
 
Iurii Antykhovych "Java and performance tools and toys"
Iurii Antykhovych "Java and performance tools and toys"Iurii Antykhovych "Java and performance tools and toys"
Iurii Antykhovych "Java and performance tools and toys"LogeekNightUkraine
 
ruby + websocket + haproxy
ruby + websocket + haproxyruby + websocket + haproxy
ruby + websocket + haproxyMathieu Elie
 
Bulding a reactive game engine with Spring 5 & Couchbase
Bulding a reactive game engine with Spring 5 & CouchbaseBulding a reactive game engine with Spring 5 & Couchbase
Bulding a reactive game engine with Spring 5 & CouchbaseAlex Derkach
 
Getting started with Apache Camel - jDays 2013
Getting started with Apache Camel - jDays 2013Getting started with Apache Camel - jDays 2013
Getting started with Apache Camel - jDays 2013Claus Ibsen
 
Using Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivityUsing Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivityClaus Ibsen
 
J Ruby Whirlwind Tour
J Ruby Whirlwind TourJ Ruby Whirlwind Tour
J Ruby Whirlwind Touroscon2007
 
JRuby - Everything in a single process
JRuby - Everything in a single processJRuby - Everything in a single process
JRuby - Everything in a single processocher
 
Stacking up with OpenStack: Building for High Availability
Stacking up with OpenStack: Building for High AvailabilityStacking up with OpenStack: Building for High Availability
Stacking up with OpenStack: Building for High AvailabilityOpenStack Foundation
 
Apache Camel workshop at BarcelonaJUG in January 2014
Apache Camel workshop at BarcelonaJUG in January 2014Apache Camel workshop at BarcelonaJUG in January 2014
Apache Camel workshop at BarcelonaJUG in January 2014Claus Ibsen
 
Ruby eventmachine pres at rubybdx
Ruby eventmachine pres at rubybdxRuby eventmachine pres at rubybdx
Ruby eventmachine pres at rubybdxMathieu Elie
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pieTomas Doran
 
Microservices with apache_camel_barcelona
Microservices with apache_camel_barcelonaMicroservices with apache_camel_barcelona
Microservices with apache_camel_barcelonaClaus Ibsen
 

What's hot (20)

Native Java with GraalVM
Native Java with GraalVMNative Java with GraalVM
Native Java with GraalVM
 
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in ruby
 
Don't dump thread dumps
Don't dump thread dumpsDon't dump thread dumps
Don't dump thread dumps
 
Find bottleneck and tuning in Java Application
Find bottleneck and tuning in Java ApplicationFind bottleneck and tuning in Java Application
Find bottleneck and tuning in Java Application
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
Iurii Antykhovych "Java and performance tools and toys"
Iurii Antykhovych "Java and performance tools and toys"Iurii Antykhovych "Java and performance tools and toys"
Iurii Antykhovych "Java and performance tools and toys"
 
GraalVm and Quarkus
GraalVm and QuarkusGraalVm and Quarkus
GraalVm and Quarkus
 
ruby + websocket + haproxy
ruby + websocket + haproxyruby + websocket + haproxy
ruby + websocket + haproxy
 
Bulding a reactive game engine with Spring 5 & Couchbase
Bulding a reactive game engine with Spring 5 & CouchbaseBulding a reactive game engine with Spring 5 & Couchbase
Bulding a reactive game engine with Spring 5 & Couchbase
 
Getting started with Apache Camel - jDays 2013
Getting started with Apache Camel - jDays 2013Getting started with Apache Camel - jDays 2013
Getting started with Apache Camel - jDays 2013
 
Using Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivityUsing Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivity
 
J Ruby Whirlwind Tour
J Ruby Whirlwind TourJ Ruby Whirlwind Tour
J Ruby Whirlwind Tour
 
JRuby - Everything in a single process
JRuby - Everything in a single processJRuby - Everything in a single process
JRuby - Everything in a single process
 
Stacking up with OpenStack: Building for High Availability
Stacking up with OpenStack: Building for High AvailabilityStacking up with OpenStack: Building for High Availability
Stacking up with OpenStack: Building for High Availability
 
Apache Camel workshop at BarcelonaJUG in January 2014
Apache Camel workshop at BarcelonaJUG in January 2014Apache Camel workshop at BarcelonaJUG in January 2014
Apache Camel workshop at BarcelonaJUG in January 2014
 
Ruby eventmachine pres at rubybdx
Ruby eventmachine pres at rubybdxRuby eventmachine pres at rubybdx
Ruby eventmachine pres at rubybdx
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pie
 
Microservices with apache_camel_barcelona
Microservices with apache_camel_barcelonaMicroservices with apache_camel_barcelona
Microservices with apache_camel_barcelona
 

Similar to jLove 2020 - Micronaut and graalvm: The power of AoT

Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019graemerocher
 
Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Petr Zapletal
 
The Diabolical Developer's Guide to Surviving Java 9
The Diabolical Developer's Guide to Surviving Java 9The Diabolical Developer's Guide to Surviving Java 9
The Diabolical Developer's Guide to Surviving Java 9jClarity
 
Discover Quarkus and GraalVM
Discover Quarkus and GraalVMDiscover Quarkus and GraalVM
Discover Quarkus and GraalVMRomain Schlick
 
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of QuarkusD. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of QuarkusUni Systems S.M.S.A.
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containersRed Hat Developers
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornMaxime Najim
 
DCSF19 Docker Containers & Java: What I Wish I Had Been Told
DCSF19 Docker Containers & Java: What I Wish I Had Been ToldDCSF19 Docker Containers & Java: What I Wish I Had Been Told
DCSF19 Docker Containers & Java: What I Wish I Had Been ToldDocker, Inc.
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
 
Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)smancke
 
Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)
Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)
Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)OpenBlend society
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Arun Gupta
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVMAlex Birch
 
Discover Micronaut
Discover MicronautDiscover Micronaut
Discover MicronautRiadh MNASRI
 

Similar to jLove 2020 - Micronaut and graalvm: The power of AoT (20)

Splunking the JVM
Splunking the JVMSplunking the JVM
Splunking the JVM
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019
 
Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018
 
Peru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVMPeru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVM
 
The Diabolical Developer's Guide to Surviving Java 9
The Diabolical Developer's Guide to Surviving Java 9The Diabolical Developer's Guide to Surviving Java 9
The Diabolical Developer's Guide to Surviving Java 9
 
Discover Quarkus and GraalVM
Discover Quarkus and GraalVMDiscover Quarkus and GraalVM
Discover Quarkus and GraalVM
 
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of QuarkusD. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containers
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with Nashorn
 
DCSF19 Docker Containers & Java: What I Wish I Had Been Told
DCSF19 Docker Containers & Java: What I Wish I Had Been ToldDCSF19 Docker Containers & Java: What I Wish I Had Been Told
DCSF19 Docker Containers & Java: What I Wish I Had Been Told
 
GraalVM
GraalVMGraalVM
GraalVM
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Javantura v4 - JVM++ The GraalVM - Martin Toshev
Javantura v4 - JVM++ The GraalVM - Martin ToshevJavantura v4 - JVM++ The GraalVM - Martin Toshev
Javantura v4 - JVM++ The GraalVM - Martin Toshev
 
Devignition 2011
Devignition 2011Devignition 2011
Devignition 2011
 
Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)Jalimo Slides Linuxtag2007 (English)
Jalimo Slides Linuxtag2007 (English)
 
Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)
Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)
Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVM
 
Discover Micronaut
Discover MicronautDiscover Micronaut
Discover Micronaut
 

More from Iván López Martín

SalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersSalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersIván López Martín
 
CommitConf 2024 - Spring Boot <3 Testcontainers
CommitConf 2024 - Spring Boot <3 TestcontainersCommitConf 2024 - Spring Boot <3 Testcontainers
CommitConf 2024 - Spring Boot <3 TestcontainersIván López Martín
 
Voxxed Days CERN 2024 - Spring Boot <3 Testcontainers.pdf
Voxxed Days CERN 2024 - Spring Boot <3 Testcontainers.pdfVoxxed Days CERN 2024 - Spring Boot <3 Testcontainers.pdf
Voxxed Days CERN 2024 - Spring Boot <3 Testcontainers.pdfIván López Martín
 
VMware - Testcontainers y Spring Boot
VMware - Testcontainers y Spring BootVMware - Testcontainers y Spring Boot
VMware - Testcontainers y Spring BootIván López Martín
 
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud GatewaySpring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud GatewayIván López Martín
 
Codemotion Madrid 2023 - Testcontainers y Spring Boot
Codemotion Madrid 2023 - Testcontainers y Spring BootCodemotion Madrid 2023 - Testcontainers y Spring Boot
Codemotion Madrid 2023 - Testcontainers y Spring BootIván López Martín
 
CommitConf 2023 - Spring Framework 6 y Spring Boot 3
CommitConf 2023 - Spring Framework 6 y Spring Boot 3CommitConf 2023 - Spring Framework 6 y Spring Boot 3
CommitConf 2023 - Spring Framework 6 y Spring Boot 3Iván López Martín
 
Construyendo un API REST con Spring Boot y GraalVM
Construyendo un API REST con Spring Boot y GraalVMConstruyendo un API REST con Spring Boot y GraalVM
Construyendo un API REST con Spring Boot y GraalVMIván López Martín
 
Codemotion Madrid 2020 - Serverless con Micronaut
Codemotion Madrid 2020 - Serverless con MicronautCodemotion Madrid 2020 - Serverless con Micronaut
Codemotion Madrid 2020 - Serverless con MicronautIván López Martín
 
JConf Perú 2020 - ¡Micronaut en acción!
JConf Perú 2020 - ¡Micronaut en acción!JConf Perú 2020 - ¡Micronaut en acción!
JConf Perú 2020 - ¡Micronaut en acción!Iván López Martín
 
JConf Perú 2020 - Micronaut + GraalVM = <3
JConf Perú 2020 - Micronaut + GraalVM = <3JConf Perú 2020 - Micronaut + GraalVM = <3
JConf Perú 2020 - Micronaut + GraalVM = <3Iván López Martín
 
JConf México 2020 - Micronaut + GraalVM = <3
JConf México 2020 - Micronaut + GraalVM = <3JConf México 2020 - Micronaut + GraalVM = <3
JConf México 2020 - Micronaut + GraalVM = <3Iván López Martín
 
Developing Micronaut Applications With IntelliJ IDEA
Developing Micronaut Applications With IntelliJ IDEADeveloping Micronaut Applications With IntelliJ IDEA
Developing Micronaut Applications With IntelliJ IDEAIván López Martín
 
CommitConf 2019 - Micronaut y GraalVm: La combinación perfecta
CommitConf 2019 - Micronaut y GraalVm: La combinación perfectaCommitConf 2019 - Micronaut y GraalVm: La combinación perfecta
CommitConf 2019 - Micronaut y GraalVm: La combinación perfectaIván López Martín
 
Codemotion Madrid 2019 - ¡GraalVM y Micronaut: compañeros perfectos!
Codemotion Madrid 2019 - ¡GraalVM y Micronaut: compañeros perfectos!Codemotion Madrid 2019 - ¡GraalVM y Micronaut: compañeros perfectos!
Codemotion Madrid 2019 - ¡GraalVM y Micronaut: compañeros perfectos!Iván López Martín
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsIván López Martín
 
VoxxedDays Bucharest 2019 - Alexa, nice to meet you
VoxxedDays Bucharest 2019 - Alexa, nice to meet youVoxxedDays Bucharest 2019 - Alexa, nice to meet you
VoxxedDays Bucharest 2019 - Alexa, nice to meet youIván López Martín
 
JavaDay Lviv 2019 - Micronaut in action!
JavaDay Lviv 2019 - Micronaut in action!JavaDay Lviv 2019 - Micronaut in action!
JavaDay Lviv 2019 - Micronaut in action!Iván López Martín
 
CrossDvlup Madrid 2019 - Alexa, encantado de conocerte
CrossDvlup Madrid 2019 - Alexa, encantado de conocerteCrossDvlup Madrid 2019 - Alexa, encantado de conocerte
CrossDvlup Madrid 2019 - Alexa, encantado de conocerteIván López Martín
 
Madrid-GUG - ¡Micronaut en acción!
Madrid-GUG - ¡Micronaut en acción!Madrid-GUG - ¡Micronaut en acción!
Madrid-GUG - ¡Micronaut en acción!Iván López Martín
 

More from Iván López Martín (20)

SalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 TestcontainersSalmorejoTech 2024 - Spring Boot <3 Testcontainers
SalmorejoTech 2024 - Spring Boot <3 Testcontainers
 
CommitConf 2024 - Spring Boot <3 Testcontainers
CommitConf 2024 - Spring Boot <3 TestcontainersCommitConf 2024 - Spring Boot <3 Testcontainers
CommitConf 2024 - Spring Boot <3 Testcontainers
 
Voxxed Days CERN 2024 - Spring Boot <3 Testcontainers.pdf
Voxxed Days CERN 2024 - Spring Boot <3 Testcontainers.pdfVoxxed Days CERN 2024 - Spring Boot <3 Testcontainers.pdf
Voxxed Days CERN 2024 - Spring Boot <3 Testcontainers.pdf
 
VMware - Testcontainers y Spring Boot
VMware - Testcontainers y Spring BootVMware - Testcontainers y Spring Boot
VMware - Testcontainers y Spring Boot
 
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud GatewaySpring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
 
Codemotion Madrid 2023 - Testcontainers y Spring Boot
Codemotion Madrid 2023 - Testcontainers y Spring BootCodemotion Madrid 2023 - Testcontainers y Spring Boot
Codemotion Madrid 2023 - Testcontainers y Spring Boot
 
CommitConf 2023 - Spring Framework 6 y Spring Boot 3
CommitConf 2023 - Spring Framework 6 y Spring Boot 3CommitConf 2023 - Spring Framework 6 y Spring Boot 3
CommitConf 2023 - Spring Framework 6 y Spring Boot 3
 
Construyendo un API REST con Spring Boot y GraalVM
Construyendo un API REST con Spring Boot y GraalVMConstruyendo un API REST con Spring Boot y GraalVM
Construyendo un API REST con Spring Boot y GraalVM
 
Codemotion Madrid 2020 - Serverless con Micronaut
Codemotion Madrid 2020 - Serverless con MicronautCodemotion Madrid 2020 - Serverless con Micronaut
Codemotion Madrid 2020 - Serverless con Micronaut
 
JConf Perú 2020 - ¡Micronaut en acción!
JConf Perú 2020 - ¡Micronaut en acción!JConf Perú 2020 - ¡Micronaut en acción!
JConf Perú 2020 - ¡Micronaut en acción!
 
JConf Perú 2020 - Micronaut + GraalVM = <3
JConf Perú 2020 - Micronaut + GraalVM = <3JConf Perú 2020 - Micronaut + GraalVM = <3
JConf Perú 2020 - Micronaut + GraalVM = <3
 
JConf México 2020 - Micronaut + GraalVM = <3
JConf México 2020 - Micronaut + GraalVM = <3JConf México 2020 - Micronaut + GraalVM = <3
JConf México 2020 - Micronaut + GraalVM = <3
 
Developing Micronaut Applications With IntelliJ IDEA
Developing Micronaut Applications With IntelliJ IDEADeveloping Micronaut Applications With IntelliJ IDEA
Developing Micronaut Applications With IntelliJ IDEA
 
CommitConf 2019 - Micronaut y GraalVm: La combinación perfecta
CommitConf 2019 - Micronaut y GraalVm: La combinación perfectaCommitConf 2019 - Micronaut y GraalVm: La combinación perfecta
CommitConf 2019 - Micronaut y GraalVm: La combinación perfecta
 
Codemotion Madrid 2019 - ¡GraalVM y Micronaut: compañeros perfectos!
Codemotion Madrid 2019 - ¡GraalVM y Micronaut: compañeros perfectos!Codemotion Madrid 2019 - ¡GraalVM y Micronaut: compañeros perfectos!
Codemotion Madrid 2019 - ¡GraalVM y Micronaut: compañeros perfectos!
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut Configurations
 
VoxxedDays Bucharest 2019 - Alexa, nice to meet you
VoxxedDays Bucharest 2019 - Alexa, nice to meet youVoxxedDays Bucharest 2019 - Alexa, nice to meet you
VoxxedDays Bucharest 2019 - Alexa, nice to meet you
 
JavaDay Lviv 2019 - Micronaut in action!
JavaDay Lviv 2019 - Micronaut in action!JavaDay Lviv 2019 - Micronaut in action!
JavaDay Lviv 2019 - Micronaut in action!
 
CrossDvlup Madrid 2019 - Alexa, encantado de conocerte
CrossDvlup Madrid 2019 - Alexa, encantado de conocerteCrossDvlup Madrid 2019 - Alexa, encantado de conocerte
CrossDvlup Madrid 2019 - Alexa, encantado de conocerte
 
Madrid-GUG - ¡Micronaut en acción!
Madrid-GUG - ¡Micronaut en acción!Madrid-GUG - ¡Micronaut en acción!
Madrid-GUG - ¡Micronaut en acción!
 

Recently uploaded

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Recently uploaded (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

jLove 2020 - Micronaut and graalvm: The power of AoT

  • 1. Micronaut and GraalVM: The power of AoT Iván López (@ilopmar)
  • 2. Iván López @ilopmar Iván López (@ilopmar)
  • 3.
  • 4. Iván López @ilopmar GraalVM - Substrate VM: compile Java applications to native binaries - https://www.graalvm.org
  • 5. Iván López @ilopmar - Reflection (with config) - Dynamic class loading (with config) - Dynamic proxy (with config) - Unsafe Memory Access (partially) - Class initializers (supported) - InvokeDynamic bytecode and method handlers (partially) - Lambda (supported) - Finalizers (not supported) - Threads (partially) Limitations
  • 6.
  • 7. Iván López @ilopmar - Framework for microservices in the JVM - Ultra-lightweight & reactive (Netty-based) - Java, Groovy & Kotlin - Ahead of Time compilation (AoT) - No reflection, no runtime proxies - Fast startup - Low memory footprint - Natively Cloud Native - GraalVM support (improved a lot in Micronaut 2.x) Micronaut
  • 8. Iván López @ilopmar $ mn create-app basic-app --features=graalvm Create an application with GraalVM support
  • 9. Iván López @ilopmar $ mn create-app basic-app --features=graalvm Create an application with GraalVM support Micronaut 2.2 (Gradle & Maven)
  • 10. Iván López @ilopmar $ ./gradlew nativeImage $ ./mvnw package -Dpackaging=native-image Create native-image $ ./gradlew dockerBuildNative $ ./mvnw package -Dpackaging=docker-native
  • 11. Iván López @ilopmar - Composable native-image.properties How does it work?
  • 12. Iván López @ilopmar # inject/native-image.properties Args = --allow-incomplete-classpath -H:EnableURLProtocols=http,https # http/native-image.properties Args = -H:IncludeResources=META-INF/http/mime.types # http-netty/native-image.properties Args = --initialize-at-run-time= com.sun.jndi.dns.DnsClient,io.netty.handler.ssl.ConscryptAlpnSslEngine,io.netty.handler.ssl.Je ttyNpnSslEngine,io.netty.handler.ssl.ReferenceCountedOpenSslEngine,io.netty.handler.ssl.JdkNpn ApplicationProtocolNegotiator,io.netty.handler.ssl.ReferenceCountedOpenSslServerContext,io.net ty.handler.ssl.ReferenceCountedOpenSslClientContext,io.netty.handler.ssl.util.BouncyCastleSelf SignedCertGenerator,io.netty.handler.ssl.ReferenceCountedOpenSslContext,io.micronaut.buffer.ne tty.NettyByteBufferFactory,io.netty.handler.ssl.JettyAlpnSslEngine$ClientEngine,io.netty.handl er.ssl.JettyAlpnSslEngine$ServerEngine,io.netty.handler.codec.http2.Http2CodecUtil,io.netty.ha ndler.codec.http2.CleartextHttp2ServerUpgradeHandler,io.netty.handler.codec.http2.Http2ServerU pgradeCodec,io.micronaut.http.netty.channel.converters.EpollChannelOptionFactory,io.micronaut. http.netty.channel.converters.KQueueChannelOptionFactory,io.micronaut.http.bind.binders.Contin uationArgumentBinder$Companion,io.micronaut.http.bind.binders.ContinuationArgumentBinder Micronaut includes everything (I)
  • 13. Iván López @ilopmar @AutomaticFeature final class HibernateFeature implements Feature { @Override public void beforeAnalysis(BeforeAnalysisAccess access) { // other drivers... registerIfPresent(access, "oracle.jdbc.OracleDriver", Oracle8iDialect.class, Oracle9iDialect.class, Oracle10gDialect.class, Oracle12cDialect.class); } } Micronaut includes everything (II)
  • 14. Iván López @ilopmar private void handleOracle(BeforeAnalysisAccess access) { Class<?> oracleDriver = access.findClassByName(ORACLE_DRIVER); if (oracleDriver != null) { registerAllIfPresent(access, "oracle.jdbc.driver.T4CDriverExtension"); registerAllIfPresent(access, "oracle.jdbc.driver.T2CDriverExtension"); registerAllIfPresent(access, "oracle.net.ano.Ano"); registerAllIfPresent(access, "oracle.net.ano.AuthenticationService"); registerAllIfPresent(access, "oracle.net.ano.DataIntegrityService"); registerAllIfPresent(access, "oracle.net.ano.EncryptionService"); registerAllIfPresent(access, "oracle.net.ano.SupervisorService"); ResourcesRegistry resourcesRegistry = getResourceRegistry(); if (resourcesRegistry != null) { resourcesRegistry.addResources("META-INF/services/java.sql.Driver"); resourcesRegistry.addResources("oracle/sql/converter_xcharset/lx20002.glb"); resourcesRegistry.addResources("oracle/sql/converter_xcharset/lx2001f.glb"); resourcesRegistry.addResources("oracle/sql/converter_xcharset/lx200b2.glb"); resourcesRegistry.addResourceBundles("oracle.net.jdbc.nl.mesg.NLSR"); resourcesRegistry.addResourceBundles("oracle.net.mesg.Message"); } initializeAtBuildTime(access, "oracle.net.jdbc.nl.mesg.NLSR_en", "oracle.jdbc.driver.DynamicByteArray", "oracle.sql.ConverterArchive", "oracle.sql.converter.CharacterConverterJDBC", "oracle.sql.converter.CharacterConverter1Byte" ); initializeAtRuntime(access, "java.sql.DriverManager"); } } Micronaut includes everything (III)
  • 15. Iván López @ilopmar Micronaut includes everything (IV)
  • 16. Iván López @ilopmar Micronaut includes everything (V)
  • 17. Iván López @ilopmar - @Introspected - @TypeHint - @ReflectiveAccess - GraalTypeElementVisitor -reflect-config.json -resource-config.json (* Micronaut 2.0) Support in Micronaut
  • 18. DEMO
  • 20. Iván López @ilopmar 14 vs 140 MB What about memory?
  • 21. Iván López @ilopmar - Create a native image takes a lot of time - And it needs a lot of RAM - GraalVM changes so fast (and they break things)... - ...and so we do ;-) - We used Travis for testing Micronaut (now Github Actions), but... - ...Travis has a limit for RAM - We needed another way... So… how do we test this?
  • 22.
  • 23. Iván López @ilopmar - Scheduled jobs every hour (2.2.x / 2.3.x) - Only run if new commits in Micronaut or GraalVM - Compile GraalVM from source code (JDK8 & JDK 11) - Also test GraalVM stable - Create native images for test Micronaut applications - Run native images and execute functional tests - https://github.com/micronaut-graal-tests - https://gitlab.com/micronaut-projects/micronaut-graal-tests Tests using Gitlab CI
  • 24. Iván López @ilopmar - Basic application: DI, POJO serialization, reactive types, HTTP Client - Cache - Micronaut function - Service discovery: Consul & Eureka - Static resources & views: Handlebars, Thymeleaf, Freemarker, Velocity, Pebble - Management & Metrics endpoints - Distributed tracing: Zipkin - RabbitMQ: Fire-and-forget & RPC - MQTT Test applications Micronaut-GraalVM
  • 25. Iván López @ilopmar - Security: JWT, Basic Auth, Cookie, Session - Scheduled jobs - Micronaut Data JDBC: H2, Postgresql, Oracle, MariaDB, MS SQL Server - Micronaut Data JPA-Hibernate: H2, Postgresql, MariaDB - Bean Introspection - Servlet: Tomcat & Jetty - Flyway & Liquibase - AWS app & function - gRPC Test applications Micronaut-GraalVM
  • 29. Iván López @ilopmar x8 - JDK 8 & 11 - 2.3.x & 2.2.x - GraalVM dev/stable Gitlab CI today
  • 32. Iván López @ilopmar - https://launch.micronaut.io (Google Cloud) - Micronaut CLI: Linux, MacOS, Windows - AWS Lambda + Custom runtime Use cases
  • 33. Iván López @ilopmar GraalVM is a new and interesting technology Micronaut AoT is the perfect match Out-of-the-box support in Micronaut New improvements in every release Fast startup & low memory footprint Developers happy and productive Summary