Dimitris Andreadis, Director of Engineering and Manager of the Quarkus Team at Red Hat, discusses the History, Concepts and Technical Overview of Quarkus framework. The webinar was delivered on June 25, 2020
5. Java Virtual Machine (Hotspot)
Application Server
App
Dynamic Application Frameworks
Architecture: Microservices
Deployment: Single App
App Lifecycle: Days
Memory: 100MBs+ RAM
Startup Time: Seconds
No
Change
“Modern” Enterprise Java Stack
6. A Deployment Continuum
● 1 monolith ≈ 20 microservices ≈ 200 functions
● Long running process(es), vs scale up/down, vs scale infinitely and back to 0
● Start up time and density becomes key
MONOLITH
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
MICRO
SERVICE
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
F FFFFFFFFF
9. Standards
Cloud native Java : a Red Hat journey
● Java EE streamlining
● Eclipse MicroProfile
Runtimes
● WildFly on Raspberry Pi
● WildFly on OpenShift
● WildFly-Swarm / Thorntail
Ahead of time compilation
● Lead gcj (GNU Compiler for Java)
● Looked at Dalvik, Avian, Excelsior JET
OpenJDK
● Container ergonomics
● JVM metadata reduction
10. Experts from cloud-native Java OS projects
Eclipse Vert.x Hibernate Eclipse MicroProfileRESTEasy WildFly Undertow OpenJDK
11. What is the best way to write
Cloud Native Applications
in Java
16. They load way too many classes
They are way too dynamic / reflective
They perform a lot of initialization at Runtime
What is Wrong with Java Frameworks
23. @
@</>
Runtime
Build Time
Do the work once, not at each start
Get rid of all bootstrap classes
Less time to start, less memory needed
Less or no reflection nor dynamic proxies
What if we Initialize at Build time?
25. Benefit No. 1: Supersonic Subatomic Java
REST + CRUD
Quarkus + AOT (via GraalVM)
28 MB
Quarkus + JDK (via OpenJDK)
145 MB
Traditional Cloud-Native Stack
209 MB
Boot + First Response Time (in seconds)
Quarkus + AOT (via GraalVM) 0.042 Seconds
Quarkus + JDK (via OpenJDK) 2.033 Seconds
Traditional Cloud-Native Stack 9.5 Seconds
Time to first response
26. Hotspot optimized Quarkus App
⇒ ½ the RSS space
⇒ x5 boot speed
Native optimized Quarkus App
⇒ ⅕ the RSS space
⇒ x50 boot speed
How faster/smaller? Rule of Thumb
27. Density Matters!
CONTAINER ORCHESTRATION
Server Node
EAP, WAS Liberty or
Spring Boot
EAP, WAS Liberty or
Spring Boot
EAP, WAS Liberty or
Spring Boot
EAP, WAS Liberty or
Spring Boot
Server Node
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
Server Node
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
https://developers.redhat.com/blog/2017/03/14/java-inside-docker/
Server Node
Quarkus on JVM
Quarkus on JVM
Quarkus on JVM
Quarkus on JVM
Quarkus on JVM
Quarkus on JVM
Quarkus on JVM
Server Node
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
Quarkus
Native
“We could run 3 times denser deployments without sacrificing availability and response times of services”
28. A cohesive platform for optimized developer joy:
● Based on standards and more
● Unified configuration
● Live coding
● Streamlined code for the 80% common usages,
flexible for the 20%
● No hassle native executable generation
Benefit No. 2: Developer Joy
“Our developers used to wait 2 to 3 mins to see their changes. Live coding does away with this.”
29. Benefit No. 3: Unifies Imperative and Reactive
● Combine both Reactive and imperative development in the same application
● Inject the EventBus or the Vertx context
● Use the technology that fits your use-case
● Key for reactive systems based on event driven apps
@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;
}
30. Benefit No. 4: Best of Breed Frameworks & Standards
Eclipse Vert.x Hibernate RESTEasy Apache Camel Eclipse MicroProfile Netty
Kubernetes OpenShift Jaeger Prometheus Apache Kafka Infinispan
Flyway Neo4j MongoDB MQTT KeyCloak Apache Tika
“When you adopt Quarkus, you will be productive from day one since you don’t need to learn new technologies.”