際際滷

際際滷Share a Scribd company logo
Quarkus Extensions:
Turbocharge for Java Microservices
Ivelin Yanev
Agenta
 GraalVM Native Image - Overview
 GraalVM Native Image Advantages
 Microframeworks Comparison
 Understanding Quarkus
 Quarkus Build Flow
 Extension Concept in Quarkus
GraalVM Native Image - Overview
Source: graalvm.org
GraalVM Architecture and Components
GraalVM Native Image - Overview
Source: oracle.com
Native Image Build Process
GraalVM Native Image Advantages
The native executables start up
almost 100X faster and
consume up to 5X less memory
compared to running on a JVM
- Oracle
Source: oracle.com
GraalVM Native Image Advantages
Startup Time and Memory Consumption
Source: techempower.com/benchmarks
GraalVM Native Image Advantages
Response Time Under Sustained Load
Source: techempower.com/benchmarks
GraalVM Native Image Advantages
Energy Efficiency
Source:https://www.igi-global.com/gateway/article/full-text-html/331401
Microframeworks Comparison
Source: developer.okta.com
Docker Startup Performance(AWS EC2 t2.micro)
Microframeworks Comparison
Source: developer.okta.com
Native Memory Used after 10 requests (M1)
Microframeworks Comparison
Source: developer.okta.com
Docker Memory Used after 10 requests (EC2 t2.micro)
Understanding Quarkus
Source: quarkus.io
Quarkus has been designed around a container-first philosophy.
Understanding Quarkus
Source: quarkus.io
Quarkus architecture
鐃
Quarkus Build Flow
Build item
Build item are communication
mechanism between build steps
1. Initial state build items
2. Intermediate state build item
3. Terminal state build item
Quarkus Build Flow
Build step
Build steps are methods annotated with @BuildStep annotation that performs a step in
the build process
Quarkus Build Flow
Build model
build item
build step
Extension Concept in Quarkus
Extensions
deployment runtime
bytecode
Framework
and
Build time augmentation
TOOLKIT
Key aspects of Quarkus extensions philosophy:
 Modularity: Extensions are designed to be self-contained units
of functionality
 Simplicity: Quarkus extensions aim to simplify the integration
of third-party libraries and technologies
 Configuration: Extensions often provide well-defined
configuration options that align with Quarkus' overall
configuration model
 Optimization: Extensions focused on optimization offer a
diverse range of benefits that elevate performance through the
utilization of recording bytecode
Extension Concept in Quarkus
Source: quarkus.io
jandex
 Find classes, methods, fields having
same annotation
 Find classes implementing an
interface
 Eliminates need for runtime classpath
scanning
 Closed world easy to build-time
optimise
Extension Concept in Quarkus
Bytecode recording
Extension Concept in Quarkus
Tools under the hood
Extension Concept in Quarkus
 Quarkus is part of the GraalVM test suite
 Mandrel is downstream distribution of GraalVM
Mandrel: A specialized distribution of GraalVM for Quarkus
 Red Hat contributes to GraalVM
Demo

More Related Content

Quarkus Extensions Turbocharge for Java Microservices.pdf