SlideShare a Scribd company logo
1 of 49
Download to read offline
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

More Related Content

What's hot

Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 
GraalVM Overview Compact version
GraalVM Overview Compact versionGraalVM Overview Compact version
GraalVM Overview Compact versionscalaconfjp
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOTVMware Tanzu
 
RxJS Operators - Real World Use Cases (FULL VERSION)
RxJS Operators - Real World Use Cases (FULL VERSION)RxJS Operators - Real World Use Cases (FULL VERSION)
RxJS Operators - Real World Use Cases (FULL VERSION)Tracy Lee
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requestsBartosz Kosarzycki
 
GitHub Actions in action
GitHub Actions in actionGitHub Actions in action
GitHub Actions in actionOleksii Holub
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooksMaulik Shah
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache MavenRajind Ruparathna
 
SLF4J (Simple Logging Facade for Java)
SLF4J (Simple Logging Facade for Java)SLF4J (Simple Logging Facade for Java)
SLF4J (Simple Logging Facade for Java)Guo Albert
 
Kata: Hexagonal Architecture / Ports and Adapters
Kata: Hexagonal Architecture / Ports and AdaptersKata: Hexagonal Architecture / Ports and Adapters
Kata: Hexagonal Architecture / Ports and Adaptersholsky
 
Introduction to RxJS
Introduction to RxJSIntroduction to RxJS
Introduction to RxJSBrainhub
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub ActionsBo-Yi Wu
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerInstruqt
 

What's hot (20)

Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
GraalVM Overview Compact version
GraalVM Overview Compact versionGraalVM Overview Compact version
GraalVM Overview Compact version
 
Quarkus k8s
Quarkus   k8sQuarkus   k8s
Quarkus k8s
 
JVM++: The Graal VM
JVM++: The Graal VMJVM++: The Graal VM
JVM++: The Graal VM
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
RxJS Operators - Real World Use Cases (FULL VERSION)
RxJS Operators - Real World Use Cases (FULL VERSION)RxJS Operators - Real World Use Cases (FULL VERSION)
RxJS Operators - Real World Use Cases (FULL VERSION)
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
 
GitHub Actions in action
GitHub Actions in actionGitHub Actions in action
GitHub Actions in action
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooks
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache Maven
 
Angular vs. React
Angular vs. ReactAngular vs. React
Angular vs. React
 
SLF4J (Simple Logging Facade for Java)
SLF4J (Simple Logging Facade for Java)SLF4J (Simple Logging Facade for Java)
SLF4J (Simple Logging Facade for Java)
 
Kata: Hexagonal Architecture / Ports and Adapters
Kata: Hexagonal Architecture / Ports and AdaptersKata: Hexagonal Architecture / Ports and Adapters
Kata: Hexagonal Architecture / Ports and Adapters
 
Introduction to RxJS
Introduction to RxJSIntroduction to RxJS
Introduction to RxJS
 
Reactjs
ReactjsReactjs
Reactjs
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Helm 3
Helm 3Helm 3
Helm 3
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Github in Action
Github in ActionGithub in Action
Github in Action
 

Similar to 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 to 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
 

More from 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
 

More from 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
 

Recently uploaded

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
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
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
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
 
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
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
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
 
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
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 

Recently uploaded (20)

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
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
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
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
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
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
 
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
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
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
 
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
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 

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