For years, the client-server architecture has been the de-facto standard to build applications. But a major shift happened. The one model rules them all age is over. A new range of applications and architectures has emerged and impacts how code is written and how applications are deployed and executed. HTTP microservices, reactive applications, message-driven microservices, and serverless are now central players in modern systems.
Quarkus has been designed with this new world in mind and provides first-class support for these different paradigms. Developers using the Red Hat build of Quarkus can now choose between deploying natively compiled code or JVM-based code depending on an application’s needs. Natively compiled Quarkus applications are extremely fast and memory-efficient, making Quarkus a great choice for serverless and high-density cloud deployments.
Speakers
1) Shanna Chan, Senior Solutions Architect at Red Hat
2) Mark Baker, Senior Solutions Architect at Red Hat
Speaker Bios
Shanna Chan - Shanna is passionate about how open source solutions help others in their journey of application modernization and transformation of their business into cloud infrastructures. Her background includes application developments, DevOps, and architecting solutions for large enterprises. More about Shanna at http://linkedin.com/in/shanna-chan
Mark Baker - Mark’s experiences coalesce around solution /business architecture and leadership bringing together people in both post / pre-sales software projects bridging traditional legacy systems (i.e. Jakarta (JEE) MVC) with Cloud tolerant and Cloud native open source in the journey of modernization and transformation. More about Mark at http://linkedin.com/in/markwbaker-tsl
2. ● Brief History and evolution to Quarkus
○ Business Drivers
○ Technical Drivers
● What is Quarkus?
● Demo
● What is behind the screen?
● Intent and best uses
● Use cases
● Q&A
Agenda
5. 5
● Monolithic style in containers:
● Tightly bound logic, Infrastructure but less so, Resilience and Availability partially managed
● Platform ecosystem still tends toward waterfall, brittleness partially managed
● Opportunity to decompose , architect partially or fully, a way to partially standardize some
operation and infrastructure
Cloudable?
Cloud
Tolerant
Cloud
Ready
Cloud
Native
● JEE/Jakarta
○ Java
Monolithic to
12 Factor App Journey
6. 6
● Micro Services in containers: Intent is better, size in the right direction
● Independent logic, Resilience built from ground up
● Platform ecosystem is fully Kubernetes ,Infrastructure is virtualized
● Bus = Tech , reiterate fast through CI/CD , minimal business disruption , Agile , fit for CI/CD
● JEE/Jakarta
○ Java
○ MicroService
Profile
Monolithic to
12 Factor App Journey
7. 7
Inv
Inventory Customer Catalog Order
Browser
Client Mobile
API Gateway
UI-1 UI-2
Cust Cat Ord
Cloud
Native
12 Factor Solution
Monolithic to
12 Factor App Journey
Process Automation- decision/optimization
Integration-API mgt, Msg, Transform
Runtimes-polyglot -server to serverless
Cloud Native
● Microservices and beyond in containers: High application density and very small size for containers
● Independent logic, Best runtime container for the job, Server, Serveless, Stateless, Stateful (Middleware Services)
● All aspects of Code and infrastructure virtualized for the solution, API mgt and Mesh
● Continued Agile , fit for CI/CD (Blue/green, Canary) ,Open Source: Runtime, Integration,Process Automation
● Quarkus
○ Java
○ MicroService
Profile
8. Supersonic, Subatomic Java with Quarkus
• Optimized Java framework with
low memory consumption and
blazingly fast first response times.
• Allows developers to get their job
done faster with a low learning
curve.
• Unifies imperative and reactive
programming models
• Compatible with popular
frameworks like Eclipse
MicroProfile, select Spring APIs,
Hibernate, and more
Quarkus provides an effective solution
for running Java applications that deal
in serverless, microservices, containers,
Kubernetes, Serverless, or cloud in
general.
8
9. Java For the Hybrid-Cloud
9
QUARKUS
EVERYWHERE
(COMING SOON)
(APRIL 2021)
Blog
v 11
10. Container First
“We went from 1-min startup times to 400 milliseconds”
Quarkus
+ Native
12 MB
Quarkus + JVM
73 MB
Traditional
Cloud-Native Stack
136 MB
Reduced Memory
Footprint
Quarkus + Native (.016 secs)
Quarkus + JVM (0.943 secs)
Traditional
Cloud-Native
Stack (4.3 secs)
Fast Startup Time Smaller Disk
Footprint
Developer Joy
Best of Breed
Hardened
Open Source Standards
with unified configuration
Live coding
Quarkus Differentiators and Benefits
90+ Extensions
Best of Breed Standards
and Libraries
Both Imperative and Reactive Programming Models
Optimized for cloud native container use cases
For non blocking Asynchronous
Perfect for Event Driven Architecture
Have what you have already mastered
part of your tool box
11. Kubernetes-Native Development with Quarkus
Solid Foundation
Java consistently ranks in the Top 3
of programming languages in use
today with a community of 7-10
million developers.
Stunning Performance
Optimized to provide native-level
memory footprint and startup time,
allowing for increased density,
performance and elasticity at lower
cost.
Toolchain
End-to-end toolchain including
OpenShift Developer Console,
Code Ready Workspaces, project
generators in IDE and web,
live-reload for lightning fast inner
loop workflow, and CI/CD
integration.
Community
Massive catalog of extensions
connects your applications with best
of breed-technologies including
Camel, Jaeger, Prometheus, Istio,
Kafka and more.
TIOBE : #1
IEEE : #1
SlashData : #2
RedMonk : #2
14. @
@
</>
Load config file from file system
Parse it
Build Time
Runtime
How does a framework start?
15. @
@
</>
Classpath scanning to find
annotated classes
Attempt to load class to
enable/disable features
Build Time
Runtime
How does a framework start?
16. How does a framework start?
@
@
</>
Build its model of
the world.
Build Time
Runtime
17. How does a framework start?
@
@
</>
Start the
management
(thread, pool…)
Build Time
Runtime
18. @
@
</>
The Quarkus Way Runtime
Build Time
Do the work once, not at each start
All the bootstrap classes are no longer loaded
Less time to start, less memory used
Less or no reflection nor dynamic proxy
22. Live Demo
Flow of Demo:
1 Live Coding and Dev Mode
2 Building the Native Exe
3 Local to Container Platform
4 Directly build to OpenShift (Kube/Container)
Points to walk away with:
1 Instant feedback for Developers
2 Code everywhere with Quarkus
3 Build processes
4 Deploy to a Cloud Kubernetes
CLI
VS-Code
/
1-3 4
OpenShift
23. Quarkus Unifies Imperative and Reactive
● Combines both Reactive and imperative development in the same application
● Reactive Messaging - Apache Kafka, MQTT, AMQP…
● Reactive Services
@Inject
SayService say;
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
return say.hello();
}
@Inject @Stream(”kafka”)
Publisher<String> reactiveSay;
@GET
@Produces(MediaType.SERVER_SENT_EVENTS)
public Publisher<String> stream() {
return reactiveSay;
}
Coding Style
An Illustrative Story
24. Quarkus uses Best of Breed Frameworks & Standards
Don’t be an army, have an army!
24
Eclipse Vert.x Hibernate RESTEasy Apache Camel Eclipse MicroProfile Netty
Kubernetes OpenShift Jaeger Prometheus Apache Kafka Infinispan
Flyway Neo4j MongoDB MQTT KeyCloak Apache Tika
26. GraalVM
Polyglot, Native of JVM, Embeddable-Upstream
Building for Crazy Small
and Fast for Cloud
Native-12 Factor
27. Drives the gathering of metadata needed by GraalVM
GraalVM specific benefits
● based on framework knowledge
● Classes using reflection, resources, etc
● No need for agent + prerun, long JSON metadata or manual command lines
Minimize dependencies
Help dead code elimination
100% of the ecosystem supported on GraalVM
28. 28
Not supported (Why?)
Trade-off & Considerations
● Dynamic classloading
● InvokeDynamic & Method handles
● Finalizer
● Security manager
● JVMTI, JMX, native VM Interfaces
OK with caveats in usage
● Reflection
● Dynamic proxy
● JNI
● Static initializers
● Lambda, Threads (OK, pfff!)
● References (similar)
29. JIT - OpenJDK HotSpot
When to use which VM with Quarkus
More memory requirements
Build for throughput
Longer startup time, but can be
optimized overtime
Best raw performance (CPU)
Best garbage collectors
Higher heap size usage
Known monitoring tools
Compile Once, Run anywhere
Libraries that only works in standard JDK
AOT - GraalVM native image
Highest memory density requirements
Low memory usages
Low memory footprint
Faster startup time
10s of ms for Serverless
30. Next Step for Spring Boot?
easy to develop with an easy CDI, REST, …
long startup times, eternal tests
heavyweight
too many things happen under the hood
easy to develop applications
fast
lightweight
GraalVM compatible
QUARKUS
✅ FaaS compatible ( lambdas
)
✅ less money on public cloud
31. Quarkus Use Cases
Greenfield development Mono to micro
Serverless Event-driven/reactive
Low memory footprint,
lightning fast startup time and
small disk footprint is an ideal
runtime for Kubernetes-native
microservices
Quarkus can help modernize
existing monolithic
applications by breaking it
into smaller, loosely coupled
microservices.
Quarkus utilizes an
asynchronous, reactive event
loop that makes it easy to create
reactive applications.
Scaling up or down (to zero)
is extremely fast with
Quarkus making it an ideal
runtime for creating
serverless applications.
IoT (Edge)
Small footprint make
Quarkus is an ideal Java
framework for IoT Edge
Gateways. Now included in
RHEL
Spring Migration
Migration of inefficient
Spring applications running
on Kubernetes/OpenShift
32. 32
QUARKUS WORKSHOP
Customers using Quarkus Today
“We could run 3 times
denser deployments
without sacrificing
availability and
response times of
service”
“When you adopt
Quarkus, you will be
productive from day
one since you don’t
really need to learn
new technologies.”
“Quarkus seemed to
provide the performance
boost we needed while at
the same time having a
good backer (Red Hat)
and relying on
battle-tested
technologies”
Thorsten Pohl
Lufthansa Technik AVIATAR
Product Owner Automation &
Platform Architect
Roberto Cortez
Talkdesk Principal Architect
Christos Sotiriou
DXL technical lead at Vodafone Greece
35. Red Hat Summit Virtual Experience
Two-part virtual experience. One registration. Zero cost.
APRIL 27-28
What to expect:
● Keynotes from Red Hat thought leaders
● Exciting news and announcements
● Global customer and partner spotlights
● Live demo
● Access to Red Hat experts
● Games and entertainment
JUNE 15-16
What to expect:
● 7 channels of breakout sessions
● Technical, deep-dive content
● Even more access to Red Hat experts
● Customer stories and global content
● Demos, chat lounges & community
engagement
Registration is now open!
Visit our website or read the blog for more information.
Registration: bitly.com/rht-summit