More Related Content
Similar to Ways to Level Up Your Java Application with GraalVM.pptx (20)
Ways to Level Up Your Java Application with GraalVM.pptx
- 1. Copyright © 2023, Oracle and/or its affiliates 23/11/2023
Copyright © 2023, Oracle and/or its affiliates
1
- 2. Ways to Level Up Your Java
Application with GraalVM
Olga Gupalo
Principal Technical Writer, GraalVM
Oracle
November 23, 2023
23/11/2023
2 Copyright © 2023, Oracle and/or its affiliates
2
- 3. 1. Use GraalVM and Native Image
2. Use GraalVM Native Build Tools
3. Statically link your application & make a small container
4. Use Github Actions
Top Things You Can Do
Copyright © 2023, Oracle and/or its affiliates
3
- 4. Copyright © 2023, Oracle and/or its affiliates
Why GraalVM Native Image?
4 23/11/2023
Compile a Java application ahead-of-time into a native executable so that it starts almost instantaneously, provides
peak performance with no warmup, and requires less memory and CPU resources
Perfect for containerized workloads and microservices
Adopted by Micronaut, Spring Boot, Helidon, and Quarkus
IDE and Java Tools
Use your favourite
Java IDE and
development tools
Develop Build
Native Build Tools
Use Maven and
Gradle plugins that
make it easy to
compile your
applications ahead-
of-time as part of a
build process
Test
JUnit 5 Support
Test your native
applications
with JUnit test
support compiled
ahead-of-time
Debug
Debugging with GDB
Set breakpoints, step
through Java sources
line-by-line, and
inspect variables in a
native executable with
GDB and in supported
IDEs
Support for JFR,
JMX, and more
Monitor with the
same JVM tools
such as JFR, JMX,
heap dumps,
jvmstat
Monitor
Container Images
Deploy in light-weight
container images. A
statically-linked native
executable can even
run in a scratch
container image
Package &
Deploy
- 5. Demo Part Objectives
1. Add a basic Spring Boot application to a container image and run it
2. Build a native executable from this application, using GraalVM Native Image
3. Add that native executable to a container image
4. Shrink the application container image size using Distroless containers
5. See how to use the GraalVM Native Build tools, Maven Plugin in particular
6. Use GitHub Actions to automate the build of a native executable as part of a CI/CD pipeline
5 Copyright © 2023, Oracle and/or its affiliates
- 7. Copyright © 2023, Oracle and/or its affiliates
Thank You
https://www.graalvm.org/
23/11/2023
7
- 8. Resources
Demo code repository: https://github.com/olyagpl/jibber-demo/
More online labs (search for: GraalVM): https://luna.oracle.com
GraalVM website: https://www.graalvm.org
GraalVM workshops: https://github.com/graalvm/workshops
GraalVM demos: https://github.com/graalvm/graalvm-demos
8 Copyright © 2023, Oracle and/or its affiliates