SlideShare una empresa de Scribd logo
1 de 49
Descargar para leer sin conexión
Running Spring Boot Applications
as GraalVM Native Images
Andy Clement, Sébastien Deleuze
October 7–10, 2019
Austin Convention Center
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Safe Harbor Statement
The following is intended to outline the general direction of Pivotal's offerings. It is intended for information
purposes only and may not be incorporated into any contract. Any information regarding pre-release of
Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal
and is subject to change. This information is provided without warranty or any kind, express or implied, and
is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making
purchasing decisions regarding Pivotal's offerings. These purchasing decisions should only be based on
features currently available. The development, release, and timing of any features or functionality described
for Pivotal's offerings in this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to
update forward looking information in this presentation.
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Runtime efficiency
3
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What is GraalVM?
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What is GraalVM?
GraalVM is an umbrella project that can be used for various purposes
● Seamless interoperability between languages
● Run JVM code as native images
● Embeddable high-performance JIT compiler
5
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
CE versus EE
GraalVM Community Edition
● Code source and issue tracker on GitHub
● GPL with classpath exception
GraalVM Enterprise Edition
● Faster performance and smaller footprint
● Enhanced security features
● Managed capabilities for native code
● Commercial license
6
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
How to generate a native image
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Creating a native-image - DEMO
1. Compile application as normal
2. Run the native-image command, configuring it via any mix of:
● configuration options directly passed to the command
● resource files in your application
● dynamic configuration via a Feature - we’ll get to that…
3. Wait a while - building a native-image is RAM hungry
4. Run resultant self contained executable
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Limitations
https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md
Supported
● Class Initializers
● Lambda Expressions
● Threads
Mostly supported
● Java Native Interface (JNI)
● Unsafe Memory Access
● References
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Limitations
Supported with configuration
● Reflection
● Dynamic Proxies (JDK)
● Resource access
Not supported
● Dynamic Class Loading / Unloading
● InvokeDynamic Bytecode and Method Handles
● Finalizers
● Security Manager
● JVMTI, other native VM interfaces
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Configuring reflection access
Class.forName() / clazz.getDeclaredMethod()
Need to tell native-image what you will reflect on at runtime
● it can prepare the answers and include them in the image
Native-image will infer what it can (e.g. string literals or constants)
Static configuration provided via .json file
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 12
[
{
"name" : "com.example.Something",
"allDeclaredConstructors" : true,
"allPublicMethods" : true,
}, {
"name" : "com.example.SomethingElse",
"fields" : [ { "name" : "value"} ],
"methods" : [
{ "name" : "<init>", "parameterTypes" : ["char[]"] }
]
}
]
Sample reflection configuration
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Configuring resource access
Which files (e.g. .properties files or even .class files) might be accessed at runtime
via Class.getResource() / Class.getResourceAsStream()
Expressed via patterns (wildcards allowed)
Static configuration provided via .json file
{
"resources": [
{"pattern": "application.properties"},
{"pattern": "META-INF/spring.components"},
{"pattern": "org/example/DataSourcePublisher.Registrar.class"}
]
}
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Configuring dynamic proxy usage
Which groups of types does the application create dynamic proxies for at runtime
Specifying these groups at native image build time, the proxies are pre-built then
available at runtime
CGLIB not supported
[
["java.util.Comparator"],
["java.util.List"],
["java.lang.AutoCloseable", "java.util.Comparator"]
]
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Configuring class initialization - DEMO
Ideally initialize classes at native image build time and not runtime
List the classes/packages and when they should be initialized
Gets tricky when a group of types pull in other types unexpectedly
// Command line:
// Eagerly initialize classes in package p at build time
--initialize-at-build-time=p
// Initialize class C1 at run time
--initialize-at-run-time=p.C1
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Coping with limitations via substitutions
Configuration not enough? Try a substitution
Modify a class just before the native image is built
● Adjust any method or field (almost…)
Feel like they should be temporary in our use cases
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Static configuration
Point at the config files directly with native-image options:
-H:ReflectionConfigurationResources=myList.json
Or, place files in well known locations on the classpath:
META-INF/native-image/
META-INF/native-image/<groupId>/<artifactId>
native-image.properties at that location can specify options, merged with any
others discovered/supplied
Args=-H:ReflectionConfigurationResources=${.}/reflection-config.json 
-H:DynamicProxyConfigurationResources=${.}/dynamic-proxies.json
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Native image agent
An agent can assist in generating these files, available with GraalVM
java -agentlib:native-image-agent=config-output-dir=META-INF/native-image Demo
Run application with agent attached to produce .json files
Exercise all code paths (manually or via tests) - producing (merging) many of these
Doesn’t address initialization though
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Dynamic configuration via a Feature
Create a class implementing the Graal Feature interface
● Accessible through the com.oracle.substratevm:graal-hotspot-library library
Class called back to participate in image building processes
● Can register new entries for reflection/resource/proxies/initialization handling
Add @AutomaticFeature to ensure picked up from classpath automatically
Able to change existing (or create new) resources as image constructed
Does not prevent static configuration also being supplied
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Boot applications
as native images
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Timeline
What we talked about in 2018
Dave Syer: “How fast is Spring?”
Some functional registration based Spring apps compiled to native images
Sébastien Deleuze: “Spring, the Kotlin and Functional Way”
Kofu native-image built projects
And now 2019
Spring Boot 2.2
Lots of performance work in general, unrelated to native-images
Regular Spring apps now buildable into native-images
Native-image building is a work in progress
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
spring-graal-native
https://github.com/spring-projects-experimental/spring-graal-native
Provides a Graal @AutomaticFeature
Includes some static configuration via JSON for elements common to all spring apps
Dynamically analyses specific application to add other configuration
Lots of sample projects showing Spring in action with a variety of technologies
Webflux, netty, tomcat, Spring MVC, rabbit, thymeleaf, jpa, grpc
Even PetClinic
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Feature handling for Spring capabilities
Spring typically scans a subset of the classpath
Use spring-content-indexer to avoid the need for runtime classpath scanning
Feature will synthesize a spring.components file if not found
A new resource added to the image!
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-indexer</artifactId>
</dependency>
META-INF/spring.components:
com.example.foo.Thing=org.springframework.stereotype.Component
com.example.foo.ThingApplication=org.springframework.stereotype.Component
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Feature handling for Spring capabilities
Spring generates classes at runtime
JDK Proxies are fine, just need to register that those will get created
The feature will register necessary proxies
CGLIB proxies are actually no longer necessary
Boot 2.2 introduced proxyBeanMethods option to avoid CGLIB processing
Boot already uses this internally
@SpringBootApplication(proxyBeanMethods=false)
public class MyApplication {
…
}
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Feature handling for Spring capabilities
Spring uses reflection
That’s ok! GraalVM has great reflective support
Feature knows what kinds of annotation or framework feature usage lead to
reflection needs at runtime
Feature chases down annotations (e.g. @Import)
Spring accesses resources
Not only .properties files but also walks .class bytecode so they must be
accessible as resources
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Feature handling for Spring capabilities
Spring Boot has autoconfiguration enabled by presence of entries on classpath
As image built, complete classpath is known.
Feature analyses configuration checks (e.g. @ConditionalOnClass)
A deeper look...
Auto configuration is listed in spring.factories
With a closed world, @ConditionalOnClass check can be evaluated
If it won’t pass, remove it from the spring.factories list => even faster startup
Resource modification as image constructed
org.springframework.boot.autoconfigure.EnableAutoConfiguration=
com.example.FooAutoConfiguration,com.example.BarAutoConfiguration
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Examples!
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Examples: CommandLineRunner
CommandLineRunner example on Boot 2.2.0.RC1
Simple app implementing CommandLineRunner interface
See compile script for native-image invocation
Or use maven...
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Examples: webflux-netty
Bigger sample using more Spring facilities including embedded netty
Netty includes their own configuration
https://github.com/netty/netty/tree/4.1/transport/src/main/resources/META-INF/native
-image/io.netty/transport
https://github.com/netty/netty/blob/4.1/common/src/main/resources/META-INF/nativ
e-image/io.netty/common/native-image.properties
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Examples: springmvc-tomcat
Standard web app with embedded tomcat
Tomcat also include their own configuration
https://github.com/apache/tomcat/tree/master/res/tomcat-maven
https://ci.apache.org/projects/tomcat/tomcat9/docs/graal.html
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Examples: webmvc-kotlin
Kotlin web app with Spring MVC and embedded tomcat
Note: WebFlux + Coroutines does not work yet due to oracle/graal#366
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Examples: PetClinic
PetClinic Flavour: webflux/netty
There are benefits just upgrading boot:
Spring PetClinic 2.1
Benchmark Mode Cnt Score Error Units
MainBenchmark.jar avgt 10 3.040 ± 0.096 s/op
MainBenchmark.main avgt 10 2.242 ± 0.033 s/op
Spring PetClinic 2.2
Benchmark Mode Cnt Score Error Units
MainBenchmark.jar avgt 10 2.675 ± 0.045 s/op
MainBenchmark.main avgt 10 2.111 ± 0.028 s/op
Spring PetClinic 2.2 (with -Ds)
Benchmark Mode Cnt Score Error Units
MainBenchmark.jar avgt 10 2.249 ± 0.017 s/op
MainBenchmark.main avgt 10 1.731 ± 0.021 s/op
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Want to try out the feature?
https://github.com/spring-projects-experimental/spring-graal-native
Can I just apply the feature to my project and it will work straightaway?
● mmmmmmmmmmaaaaybbbbeeeeeee
Feel free to raise issues and work with us to explore them
Project is experimental, a work in progress
Feature is not yet the certain option, purely static configuration approach instead?
Or mixed approach?
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
GraalVM native versus OpenJDK JIT
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
GraalVM native allows to start applications faster
3
5

Spring Boot 2.2 with Spring MVC startup time
GraalVM native
OpenJDK JIT
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Beware of truncated point of views
3
6
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Make sure to evaluate all the criteria
3
7

JIT
GraalVM native CE
GraalVM native EE
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
And anticipate the evolution
3
8

Late
2020
projection
JIT
GraalVM native CE
GraalVM native EE
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Benchmarks
● Simple “hello world” HTTP endpoint
● Spring MVC with Tomcat and Spring WebFlux with Netty
● 2 min warmup, 30 seconds measurement
● Dell P5520 i7-7820HQ CPU @ 2.90GHz 32G Ubuntu 19.04
● Heap settings : -Xms8g -Xmx8g
● wrk2 -t4 -c200 -d30s -R20000 --latency <host>
● Log scale due to the high tail latency
3
9
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring MVC: native versus JIT
4
0

With the upcoming new GC and WIP
optimization with Spring workload,
GraalVM native EE could reach in the
future OpenJDK JIT performances.
GraalVM native CE lags behind, but it
enables scale to 0 applications and is
suitable for memory constraint
environment.
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring WebFlux: native versus JIT
4
1

More gap than with Spring MVC, and PGO
not effective for that use case.
Ongoing work with GraalVM team.
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring MVC: OpenJDK JIT versus GraalVM JIT
4
2

5% lower median latency with GraalVM JIT EE.
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring WebFlux: OpenJDK JIT versus GraalVM JIT
4
3

GraalVM JIT EE provides a significant boost on
Reactor based stack, median latency is 10%
lower with OpenJDK JIT.
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
4
4

OpenJDK JIT with low Xmx
Spring MVC: relative CPU and memory profiles
GraalVM native
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Roadmap
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
3rd party libraries
GraalVM native support needs to be sustainable and maintainable, that’s why we do
not want to maintain fragile patches for the whole JVM ecosystem.
The ecosystem of libraries needs to support it natively like Netty or Tomcat do
Spring team plans to collaborate with GraalVM team actively on that (contact open
source project maintainers, help for guidelines, even provide initial PR)
In a nutshell, Spring should be a good GraalVM native citizen for its own codebase,
and should support GraalVM native compatible libraries.
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Collaborating with the Graal team
Graal team has been very responsive on issues and enhancements.
Collaboration is going to increase in upcoming months on:
- Optimizing both GraalVM native and JIT for optimal performance with Spring
workload
- Improving JVM ecosystem compatibility with GraalVM native
- Tooling
- Testing
Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring roadmap
Spring Framework 5.3 should be able to configure reflection, proxies, resources, etc.
dynamically with GraalVM native.
Spring Framework test suite running on GraalVM native for supported features.
Not decided yet
● Dedicated project or part of Spring Framework core?
● Level of support on Spring Boot side
● Tooling (Maven, Gradle) for running tests and building native images
Stay Connected.
https://github.com/spring-projects-experimental/spring-graal-native
https://github.com/spring-projects/spring-framework/wiki/GraalVM-native-image-support
#springone@s1p

Más contenido relacionado

La actualidad más candente

Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot IntroductionJeevesh Pandey
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub ActionsKnoldus Inc.
 
Introduce yourself to java 17
Introduce yourself to java 17Introduce yourself to java 17
Introduce yourself to java 17ankitbhandari32
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKJosé Paumard
 
Clean architecture
Clean architectureClean architecture
Clean architecture.NET Crowd
 
Developing RESTful Web APIs with Python, Flask and MongoDB
Developing RESTful Web APIs with Python, Flask and MongoDBDeveloping RESTful Web APIs with Python, Flask and MongoDB
Developing RESTful Web APIs with Python, Flask and MongoDBNicola Iarocci
 
Clean architecture
Clean architectureClean architecture
Clean architectureLieven Doclo
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectJadson Santos
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentationBojan Golubović
 
GraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster EverywhereGraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster EverywhereJ On The Beach
 
The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!Baharika Sopori
 
Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudEberhard Wolff
 
How native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App DevelopmentHow native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App DevelopmentDevathon
 

La actualidad más candente (20)

Angular overview
Angular overviewAngular overview
Angular overview
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Introduce yourself to java 17
Introduce yourself to java 17Introduce yourself to java 17
Introduce yourself to java 17
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
Developing RESTful Web APIs with Python, Flask and MongoDB
Developing RESTful Web APIs with Python, Flask and MongoDBDeveloping RESTful Web APIs with Python, Flask and MongoDB
Developing RESTful Web APIs with Python, Flask and MongoDB
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
Reactjs
Reactjs Reactjs
Reactjs
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentation
 
GraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster EverywhereGraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster Everywhere
 
React Native
React Native React Native
React Native
 
The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!
 
Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring Cloud
 
How native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App DevelopmentHow native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App Development
 

Similar a Running Spring Boot Applications as GraalVM Native Images

P to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersP to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersVMware Tanzu
 
riffing on Knative - Scott Andrews
riffing on Knative - Scott Andrewsriffing on Knative - Scott Andrews
riffing on Knative - Scott AndrewsVMware Tanzu
 
Square Pegs, Square Holes: CI/CD That Fits
Square Pegs, Square Holes: CI/CD That FitsSquare Pegs, Square Holes: CI/CD That Fits
Square Pegs, Square Holes: CI/CD That FitsVMware Tanzu
 
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...VMware Tanzu
 
How to Build More Secure Service Brokers
How to Build More Secure Service BrokersHow to Build More Secure Service Brokers
How to Build More Secure Service BrokersVMware Tanzu
 
SDLC for Pivotal Platform powered by Spring Initializr and Concourse
SDLC for Pivotal Platform powered by Spring Initializr and ConcourseSDLC for Pivotal Platform powered by Spring Initializr and Concourse
SDLC for Pivotal Platform powered by Spring Initializr and ConcourseVMware Tanzu
 
Accelerating Development with Organizational Opinions
Accelerating Development with Organizational OpinionsAccelerating Development with Organizational Opinions
Accelerating Development with Organizational OpinionsVMware Tanzu
 
Building a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / SpringBuilding a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / Springsdeeg
 
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-InSteeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-InVMware Tanzu
 
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...cornelia davis
 
Building a Data Exchange with Spring Cloud Data Flow
Building a Data Exchange with Spring Cloud Data FlowBuilding a Data Exchange with Spring Cloud Data Flow
Building a Data Exchange with Spring Cloud Data FlowVMware Tanzu
 
Experience + Education = Empowerment
Experience + Education = EmpowermentExperience + Education = Empowerment
Experience + Education = EmpowermentVMware Tanzu
 
Highly Available and Resilient Multi-Site Deployments Using Spinnaker
Highly Available and Resilient Multi-Site Deployments Using SpinnakerHighly Available and Resilient Multi-Site Deployments Using Spinnaker
Highly Available and Resilient Multi-Site Deployments Using SpinnakerVMware Tanzu
 
Modernizing Digital APIs Platform to Cloud-Native Microservices
Modernizing Digital APIs Platform to Cloud-Native MicroservicesModernizing Digital APIs Platform to Cloud-Native Microservices
Modernizing Digital APIs Platform to Cloud-Native MicroservicesVMware Tanzu
 
Spring Cloud on Kubernetes
Spring Cloud on KubernetesSpring Cloud on Kubernetes
Spring Cloud on KubernetesVMware Tanzu
 
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ....NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...VMware Tanzu
 
Containerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for KubernetesContainerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for KubernetesVMware Tanzu
 
Policy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy AgentPolicy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy AgentVMware Tanzu
 
Fast 5 Things You Can Do Now to Get Ready for the Cloud
Fast 5 Things You Can Do Now to Get Ready for the CloudFast 5 Things You Can Do Now to Get Ready for the Cloud
Fast 5 Things You Can Do Now to Get Ready for the CloudVMware Tanzu
 

Similar a Running Spring Boot Applications as GraalVM Native Images (20)

P to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersP to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to Containers
 
riffing on Knative - Scott Andrews
riffing on Knative - Scott Andrewsriffing on Knative - Scott Andrews
riffing on Knative - Scott Andrews
 
Square Pegs, Square Holes: CI/CD That Fits
Square Pegs, Square Holes: CI/CD That FitsSquare Pegs, Square Holes: CI/CD That Fits
Square Pegs, Square Holes: CI/CD That Fits
 
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
 
How to Build More Secure Service Brokers
How to Build More Secure Service BrokersHow to Build More Secure Service Brokers
How to Build More Secure Service Brokers
 
SDLC for Pivotal Platform powered by Spring Initializr and Concourse
SDLC for Pivotal Platform powered by Spring Initializr and ConcourseSDLC for Pivotal Platform powered by Spring Initializr and Concourse
SDLC for Pivotal Platform powered by Spring Initializr and Concourse
 
Accelerating Development with Organizational Opinions
Accelerating Development with Organizational OpinionsAccelerating Development with Organizational Opinions
Accelerating Development with Organizational Opinions
 
Serverless Spring 오충현
Serverless Spring 오충현Serverless Spring 오충현
Serverless Spring 오충현
 
Building a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / SpringBuilding a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / Spring
 
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-InSteeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
 
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
 
Building a Data Exchange with Spring Cloud Data Flow
Building a Data Exchange with Spring Cloud Data FlowBuilding a Data Exchange with Spring Cloud Data Flow
Building a Data Exchange with Spring Cloud Data Flow
 
Experience + Education = Empowerment
Experience + Education = EmpowermentExperience + Education = Empowerment
Experience + Education = Empowerment
 
Highly Available and Resilient Multi-Site Deployments Using Spinnaker
Highly Available and Resilient Multi-Site Deployments Using SpinnakerHighly Available and Resilient Multi-Site Deployments Using Spinnaker
Highly Available and Resilient Multi-Site Deployments Using Spinnaker
 
Modernizing Digital APIs Platform to Cloud-Native Microservices
Modernizing Digital APIs Platform to Cloud-Native MicroservicesModernizing Digital APIs Platform to Cloud-Native Microservices
Modernizing Digital APIs Platform to Cloud-Native Microservices
 
Spring Cloud on Kubernetes
Spring Cloud on KubernetesSpring Cloud on Kubernetes
Spring Cloud on Kubernetes
 
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ....NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
 
Containerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for KubernetesContainerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for Kubernetes
 
Policy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy AgentPolicy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy Agent
 
Fast 5 Things You Can Do Now to Get Ready for the Cloud
Fast 5 Things You Can Do Now to Get Ready for the CloudFast 5 Things You Can Do Now to Get Ready for the Cloud
Fast 5 Things You Can Do Now to Get Ready for the Cloud
 

Más de VMware Tanzu

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItVMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleVMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductVMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready AppsVMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And BeyondVMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfVMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptxVMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchVMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishVMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - FrenchVMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootVMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerVMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeVMware Tanzu
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsVMware Tanzu
 

Más de VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Último

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Último (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

Running Spring Boot Applications as GraalVM Native Images

  • 1. Running Spring Boot Applications as GraalVM Native Images Andy Clement, Sébastien Deleuze October 7–10, 2019 Austin Convention Center
  • 2. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Safe Harbor Statement The following is intended to outline the general direction of Pivotal's offerings. It is intended for information purposes only and may not be incorporated into any contract. Any information regarding pre-release of Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal and is subject to change. This information is provided without warranty or any kind, express or implied, and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions regarding Pivotal's offerings. These purchasing decisions should only be based on features currently available. The development, release, and timing of any features or functionality described for Pivotal's offerings in this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to update forward looking information in this presentation.
  • 3. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Runtime efficiency 3
  • 4. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is GraalVM?
  • 5. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is GraalVM? GraalVM is an umbrella project that can be used for various purposes ● Seamless interoperability between languages ● Run JVM code as native images ● Embeddable high-performance JIT compiler 5
  • 6. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ CE versus EE GraalVM Community Edition ● Code source and issue tracker on GitHub ● GPL with classpath exception GraalVM Enterprise Edition ● Faster performance and smaller footprint ● Enhanced security features ● Managed capabilities for native code ● Commercial license 6
  • 7. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ How to generate a native image
  • 8. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Creating a native-image - DEMO 1. Compile application as normal 2. Run the native-image command, configuring it via any mix of: ● configuration options directly passed to the command ● resource files in your application ● dynamic configuration via a Feature - we’ll get to that… 3. Wait a while - building a native-image is RAM hungry 4. Run resultant self contained executable
  • 9. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Limitations https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md Supported ● Class Initializers ● Lambda Expressions ● Threads Mostly supported ● Java Native Interface (JNI) ● Unsafe Memory Access ● References
  • 10. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Limitations Supported with configuration ● Reflection ● Dynamic Proxies (JDK) ● Resource access Not supported ● Dynamic Class Loading / Unloading ● InvokeDynamic Bytecode and Method Handles ● Finalizers ● Security Manager ● JVMTI, other native VM interfaces
  • 11. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Configuring reflection access Class.forName() / clazz.getDeclaredMethod() Need to tell native-image what you will reflect on at runtime ● it can prepare the answers and include them in the image Native-image will infer what it can (e.g. string literals or constants) Static configuration provided via .json file
  • 12. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 12 [ { "name" : "com.example.Something", "allDeclaredConstructors" : true, "allPublicMethods" : true, }, { "name" : "com.example.SomethingElse", "fields" : [ { "name" : "value"} ], "methods" : [ { "name" : "<init>", "parameterTypes" : ["char[]"] } ] } ] Sample reflection configuration
  • 13. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Configuring resource access Which files (e.g. .properties files or even .class files) might be accessed at runtime via Class.getResource() / Class.getResourceAsStream() Expressed via patterns (wildcards allowed) Static configuration provided via .json file { "resources": [ {"pattern": "application.properties"}, {"pattern": "META-INF/spring.components"}, {"pattern": "org/example/DataSourcePublisher.Registrar.class"} ] }
  • 14. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Configuring dynamic proxy usage Which groups of types does the application create dynamic proxies for at runtime Specifying these groups at native image build time, the proxies are pre-built then available at runtime CGLIB not supported [ ["java.util.Comparator"], ["java.util.List"], ["java.lang.AutoCloseable", "java.util.Comparator"] ]
  • 15. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Configuring class initialization - DEMO Ideally initialize classes at native image build time and not runtime List the classes/packages and when they should be initialized Gets tricky when a group of types pull in other types unexpectedly // Command line: // Eagerly initialize classes in package p at build time --initialize-at-build-time=p // Initialize class C1 at run time --initialize-at-run-time=p.C1
  • 16. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Coping with limitations via substitutions Configuration not enough? Try a substitution Modify a class just before the native image is built ● Adjust any method or field (almost…) Feel like they should be temporary in our use cases
  • 17. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Static configuration Point at the config files directly with native-image options: -H:ReflectionConfigurationResources=myList.json Or, place files in well known locations on the classpath: META-INF/native-image/ META-INF/native-image/<groupId>/<artifactId> native-image.properties at that location can specify options, merged with any others discovered/supplied Args=-H:ReflectionConfigurationResources=${.}/reflection-config.json -H:DynamicProxyConfigurationResources=${.}/dynamic-proxies.json
  • 18. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Native image agent An agent can assist in generating these files, available with GraalVM java -agentlib:native-image-agent=config-output-dir=META-INF/native-image Demo Run application with agent attached to produce .json files Exercise all code paths (manually or via tests) - producing (merging) many of these Doesn’t address initialization though
  • 19. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Dynamic configuration via a Feature Create a class implementing the Graal Feature interface ● Accessible through the com.oracle.substratevm:graal-hotspot-library library Class called back to participate in image building processes ● Can register new entries for reflection/resource/proxies/initialization handling Add @AutomaticFeature to ensure picked up from classpath automatically Able to change existing (or create new) resources as image constructed Does not prevent static configuration also being supplied
  • 20. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Boot applications as native images
  • 21. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Timeline What we talked about in 2018 Dave Syer: “How fast is Spring?” Some functional registration based Spring apps compiled to native images Sébastien Deleuze: “Spring, the Kotlin and Functional Way” Kofu native-image built projects And now 2019 Spring Boot 2.2 Lots of performance work in general, unrelated to native-images Regular Spring apps now buildable into native-images Native-image building is a work in progress
  • 22. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ spring-graal-native https://github.com/spring-projects-experimental/spring-graal-native Provides a Graal @AutomaticFeature Includes some static configuration via JSON for elements common to all spring apps Dynamically analyses specific application to add other configuration Lots of sample projects showing Spring in action with a variety of technologies Webflux, netty, tomcat, Spring MVC, rabbit, thymeleaf, jpa, grpc Even PetClinic
  • 23. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Feature handling for Spring capabilities Spring typically scans a subset of the classpath Use spring-content-indexer to avoid the need for runtime classpath scanning Feature will synthesize a spring.components file if not found A new resource added to the image! <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-indexer</artifactId> </dependency> META-INF/spring.components: com.example.foo.Thing=org.springframework.stereotype.Component com.example.foo.ThingApplication=org.springframework.stereotype.Component
  • 24. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Feature handling for Spring capabilities Spring generates classes at runtime JDK Proxies are fine, just need to register that those will get created The feature will register necessary proxies CGLIB proxies are actually no longer necessary Boot 2.2 introduced proxyBeanMethods option to avoid CGLIB processing Boot already uses this internally @SpringBootApplication(proxyBeanMethods=false) public class MyApplication { … }
  • 25. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Feature handling for Spring capabilities Spring uses reflection That’s ok! GraalVM has great reflective support Feature knows what kinds of annotation or framework feature usage lead to reflection needs at runtime Feature chases down annotations (e.g. @Import) Spring accesses resources Not only .properties files but also walks .class bytecode so they must be accessible as resources
  • 26. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Feature handling for Spring capabilities Spring Boot has autoconfiguration enabled by presence of entries on classpath As image built, complete classpath is known. Feature analyses configuration checks (e.g. @ConditionalOnClass) A deeper look... Auto configuration is listed in spring.factories With a closed world, @ConditionalOnClass check can be evaluated If it won’t pass, remove it from the spring.factories list => even faster startup Resource modification as image constructed org.springframework.boot.autoconfigure.EnableAutoConfiguration= com.example.FooAutoConfiguration,com.example.BarAutoConfiguration
  • 27. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Examples!
  • 28. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Examples: CommandLineRunner CommandLineRunner example on Boot 2.2.0.RC1 Simple app implementing CommandLineRunner interface See compile script for native-image invocation Or use maven...
  • 29. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Examples: webflux-netty Bigger sample using more Spring facilities including embedded netty Netty includes their own configuration https://github.com/netty/netty/tree/4.1/transport/src/main/resources/META-INF/native -image/io.netty/transport https://github.com/netty/netty/blob/4.1/common/src/main/resources/META-INF/nativ e-image/io.netty/common/native-image.properties
  • 30. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Examples: springmvc-tomcat Standard web app with embedded tomcat Tomcat also include their own configuration https://github.com/apache/tomcat/tree/master/res/tomcat-maven https://ci.apache.org/projects/tomcat/tomcat9/docs/graal.html
  • 31. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Examples: webmvc-kotlin Kotlin web app with Spring MVC and embedded tomcat Note: WebFlux + Coroutines does not work yet due to oracle/graal#366
  • 32. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Examples: PetClinic PetClinic Flavour: webflux/netty There are benefits just upgrading boot: Spring PetClinic 2.1 Benchmark Mode Cnt Score Error Units MainBenchmark.jar avgt 10 3.040 ± 0.096 s/op MainBenchmark.main avgt 10 2.242 ± 0.033 s/op Spring PetClinic 2.2 Benchmark Mode Cnt Score Error Units MainBenchmark.jar avgt 10 2.675 ± 0.045 s/op MainBenchmark.main avgt 10 2.111 ± 0.028 s/op Spring PetClinic 2.2 (with -Ds) Benchmark Mode Cnt Score Error Units MainBenchmark.jar avgt 10 2.249 ± 0.017 s/op MainBenchmark.main avgt 10 1.731 ± 0.021 s/op
  • 33. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Want to try out the feature? https://github.com/spring-projects-experimental/spring-graal-native Can I just apply the feature to my project and it will work straightaway? ● mmmmmmmmmmaaaaybbbbeeeeeee Feel free to raise issues and work with us to explore them Project is experimental, a work in progress Feature is not yet the certain option, purely static configuration approach instead? Or mixed approach?
  • 34. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ GraalVM native versus OpenJDK JIT
  • 35. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ GraalVM native allows to start applications faster 3 5  Spring Boot 2.2 with Spring MVC startup time GraalVM native OpenJDK JIT
  • 36. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Beware of truncated point of views 3 6
  • 37. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Make sure to evaluate all the criteria 3 7  JIT GraalVM native CE GraalVM native EE
  • 38. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ And anticipate the evolution 3 8  Late 2020 projection JIT GraalVM native CE GraalVM native EE
  • 39. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Benchmarks ● Simple “hello world” HTTP endpoint ● Spring MVC with Tomcat and Spring WebFlux with Netty ● 2 min warmup, 30 seconds measurement ● Dell P5520 i7-7820HQ CPU @ 2.90GHz 32G Ubuntu 19.04 ● Heap settings : -Xms8g -Xmx8g ● wrk2 -t4 -c200 -d30s -R20000 --latency <host> ● Log scale due to the high tail latency 3 9
  • 40. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring MVC: native versus JIT 4 0  With the upcoming new GC and WIP optimization with Spring workload, GraalVM native EE could reach in the future OpenJDK JIT performances. GraalVM native CE lags behind, but it enables scale to 0 applications and is suitable for memory constraint environment.
  • 41. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring WebFlux: native versus JIT 4 1  More gap than with Spring MVC, and PGO not effective for that use case. Ongoing work with GraalVM team.
  • 42. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring MVC: OpenJDK JIT versus GraalVM JIT 4 2  5% lower median latency with GraalVM JIT EE.
  • 43. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring WebFlux: OpenJDK JIT versus GraalVM JIT 4 3  GraalVM JIT EE provides a significant boost on Reactor based stack, median latency is 10% lower with OpenJDK JIT.
  • 44. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 4 4  OpenJDK JIT with low Xmx Spring MVC: relative CPU and memory profiles GraalVM native
  • 45. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Roadmap
  • 46. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 3rd party libraries GraalVM native support needs to be sustainable and maintainable, that’s why we do not want to maintain fragile patches for the whole JVM ecosystem. The ecosystem of libraries needs to support it natively like Netty or Tomcat do Spring team plans to collaborate with GraalVM team actively on that (contact open source project maintainers, help for guidelines, even provide initial PR) In a nutshell, Spring should be a good GraalVM native citizen for its own codebase, and should support GraalVM native compatible libraries.
  • 47. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Collaborating with the Graal team Graal team has been very responsive on issues and enhancements. Collaboration is going to increase in upcoming months on: - Optimizing both GraalVM native and JIT for optimal performance with Spring workload - Improving JVM ecosystem compatibility with GraalVM native - Tooling - Testing
  • 48. Unless otherwise indicated, these slides are © 2013-2019 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring roadmap Spring Framework 5.3 should be able to configure reflection, proxies, resources, etc. dynamically with GraalVM native. Spring Framework test suite running on GraalVM native for supported features. Not decided yet ● Dedicated project or part of Spring Framework core? ● Level of support on Spring Boot side ● Tooling (Maven, Gradle) for running tests and building native images