Quarkus Denmark 2019

Max Andersen
Max AndersenSoftware Developer at Red Hat
1
Quarkus Hands-on
Just VM Development:
- Java 8 or 11
- Use code.quarkus.io to create your first
app
- Notepad (or VSCode, Eclipse, Intellij,...)
For Native:
- Java 8
- GraalVM 19.2.1
- Docker (if on Windows)
Ideas for things to do:
- quarkus.io/get-started
- quarkus.io/guides/
- quarkus.io/guides/writing-extensions
- Ascii Banner from png
- Quarkus enable your favorite framework
- Quarkus-coffeeshop-demo
- Docker compose, kafka
-
- quarkus.io/quarkus-workshops/super-heros
- 6-8 hours
-
- Your own idea…
bit.ly/dkquarkus2019 2
3
4
1. It is a surprise
2. It has a major impact
“
3. People contend that they
expected the event to happen
(in hindsight)
5
bit.ly/dkquarkus2019 6
The hidden truth about Java + containers
7
8
Reactive
Imperative
9
10
QUARK: elementary particle / US: hardest thing in computer science
12
A cohesive platform for optimized developer joy:
●
●
●
●
●
Benefit No. 1: Developer Joy
From monolith to...
bit.ly/dkquarkus2019 13
● 1 monolith ≈ 20 microservices ≈ 200 functions
● Scale to 1 vs scale to 0
● Start up time
MONOLITH
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
● Designed for throughputs (requests/s)
● Startup overhead
○ # of classes, bytecode, JIT
● Memory overhead
○ # of classes, metadata, compilation
bit.ly/dkquarkus2019 14
The hidden truth about Java + containers
RSS
bit.ly/dkquarkus2019 15
The hidden truth about Java + containers
16
Benefit No. 2: Supersonic Subatomic Java
Quarkus + AOT
19 MB
Quarkus + OpenJDK (JIT)
77 MB
Traditional Cloud-Native Stack
140 MB
17
Benefit No. 2: Supersonic Subatomic Java
Quarkus + AOT
35 MB
Quarkus + OpenJDK (JIT)
130 MB
Traditional Cloud-Native Stack
218 MB
18
Benefit No. 2: Supersonic Subatomic Java
Quarkus + AOT 0.014 Seconds
Quarkus + OpenJDK 0.75 Seconds
Quarkus + AOT 0.055 Seconds
Quarkus + OpenJDK (JIT) 2.5 Seconds
Traditional Cloud-Native Stack 9.5 Seconds
Traditional Cloud-Native Stack 4.3 Seconds
bit.ly/dkquarkus2019 19
Benefit No. 2: Supersonic Subatomic Java
CONTAINER ORCHESTRATION
NodeNode
Traditional Cloud-Native
Java Stack
Traditional Cloud-Native
Java Stack
Traditional Cloud-Native
Java Stack
Traditional Cloud-Native
Java Stack
Node
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Node
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
Quarkus
20
Benefit No. 3: Unifies Imperative and Reactive
●
●
●
@Inject
SayService say;
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
return say.hello();
}
@Inject @Channel(”kafka”)
Publisher<String> reactiveSay;
@GET
@Produces(MediaType.SERVER_SENT_EVENTS)
public Publisher<String> stream() {
return reactiveSay;
}
21
Benefit No. 4: Best of Breed Frameworks & Standards
22
Quarkus Denmark 2019
bit.ly/dkquarkus2019 24
What does a framework do at
startup time
Move startup time to build time
● Parse config files
● Classpath & classes scanning
○ for annotations, getters or other metadata
● Build framework metamodel objects
● Prepare reflection and build proxies
● Start and open IO, threads etc
bit.ly/dkquarkus2019 25
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
Build time benefits
26
JDK JIT - HotSpot AOTC - GraalVM Native Image
27
bit.ly/dkquarkus2019 28
An ahead-of-time, build-time, runtime
Quarkus Hands-on requirements
Just VM Development:
- Java 8 or 11
- Use code.quarkus.io to create your first
app
- Notepad (or VSCode, Eclipse, Intellij,...)
For Native:
- Java 8
- GraalVM 19.2.1
- Docker (if on Windows)
Ideas for things to do:
- quarkus.io/get-started
- quarkus.io/guides/
- quarkus.io/guides/writing-extensions
- Ascii Banner from png
- Quarkus enable your favorite framework
- Quarkus-coffeeshop-demo
- Docker compose, kafka
-
- quarkus.io/quarkus-workshops/super-hero
s
- 6-8 hours
-
- Your own idea…
bit.ly/dkquarkus2019 29
Closed-world assumption
bit.ly/dkquarkus2019 30
AOTC - GraalVM - Dead code elimination
bit.ly/dkquarkus2019 31
Not supported
The Dark Side of GraalVM
● Dynamic classloading
● InvokeDynamic & Method handles
● Finalizer
● Security manager
● JVMTI, JMX, native VM Interfaces
OK with caveats in usage
● Reflection (manual list)
● Dynamic proxy (manual list)
● JNI (manual list)
● Static initializers (eager)
● References (similar)
The “Good” Parts
bit.ly/dkquarkus2019 32
Drives the gathering of metadata
needed by GraalVM
GraalVM specific benefits
● based on framework knowledge
● Classes using reflection, resources, etc
Minimize dependencies
Help dead code elimination
33
JIT - OpenJDK HotSpot
When to use which VM with Quarkus
High memory density requirements
High request/s/MB
Fast startup time
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
Highest request/s/MB
for low heap size usages
Faster startup time
10s of ms for Serverless
When to use which VM with Quarkus
34
More is better
bit.ly/dkquarkus2019 36
@QuarkusTest
public class HelloResourceTest {
@Inject HelloService service;
@Test
public void testHelloEndpoint() {
assertEquals(
"Hello Quarkus",
service.greeting("Quarkus")
);
}
}
Fast start
Testing is running
Injection
Full start
bit.ly/dkquarkus2019 37
@Entity
public class Todo extends PanacheEntity {
// id is inherited
public String title;
public boolean completed;
public String url;
public static List<Todo> findNotCompleted() {
return list("completed", false);
}
}
@Path("/api")
public class TodoResource {
@GET
public List<Todo> getAll() {
return Todo.listAll(Sort.by("order"));
}
}
@Entity
public class Todo {
@Id @GeneratedValue public Long id;
public String title;
public boolean completed;
public String url;
}
@ApplicationScoped
public class TodoRepo extends
PanacheRepository<Todo> {
public List<Todo> findNotCompleted() {
return list("completed", false);
}
}
@Path("/api")
public class TodoResource {
@Inject TodoRepo repo;
@GET
public List<Todo> getAll() {
return repo.listAll(Sort.by("order"));
}
}
ActiveRecord or Repository pattern
38
39
Developer Joy
Quarkus Benefits
Supersonic Subatomic Java
Unifies
imperative and reactive
Best of breed
libraries and standards
40
41
1. It is a surprise
2. It has a major impact
“
3. People contend that they
expected the event to happen
(in hindsight)
42
43
Quarkus Hands-on
Just VM Development:
- Java 8 or 11
- Use code.quarkus.io to create your first
app
- Notepad (or VSCode, Eclipse, Intellij,...)
For Native:
- Java 8
- GraalVM 19.2.1
- Docker (if on Windows)
Ideas for things to do:
- quarkus.io/get-started
- quarkus.io/guides/
- quarkus.io/guides/writing-extensions
- Ascii Banner from png
- Quarkus enable your favorite framework
- quarkus.io/quarkus-workshops/super-hero
s
- 6-8 hours
- Own ideas ?
bit.ly/dkquarkus2019 44
1 of 44

Recommended

Quarkus k8s by
Quarkus   k8sQuarkus   k8s
Quarkus k8sGeorgios Andrianakis
729 views28 slides
Quarkus - a next-generation Kubernetes Native Java framework by
Quarkus - a next-generation Kubernetes Native Java frameworkQuarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkSVDevOps
606 views42 slides
Discover Quarkus and GraalVM by
Discover Quarkus and GraalVMDiscover Quarkus and GraalVM
Discover Quarkus and GraalVMRomain Schlick
638 views19 slides
Red Hat Java Update and Quarkus Introduction by
Red Hat Java Update and Quarkus IntroductionRed Hat Java Update and Quarkus Introduction
Red Hat Java Update and Quarkus IntroductionJohn Archer
687 views41 slides
Battle of the frameworks : Quarkus vs SpringBoot by
Battle of the frameworks : Quarkus vs SpringBootBattle of the frameworks : Quarkus vs SpringBoot
Battle of the frameworks : Quarkus vs SpringBootChristos Sotiriou
142 views17 slides
Quarkus tips, tricks, and techniques by
Quarkus tips, tricks, and techniquesQuarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniquesRed Hat Developers
1.3K views21 slides

More Related Content

What's hot

GraalVm and Quarkus by
GraalVm and QuarkusGraalVm and Quarkus
GraalVm and QuarkusSascha Rodekamp
509 views29 slides
Introduction to Apache Camel by
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache CamelClaus Ibsen
5.6K views111 slides
Vert.X: Microservices Were Never So Easy (Clement Escoffier) by
Vert.X: Microservices Were Never So Easy (Clement Escoffier)Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Vert.X: Microservices Were Never So Easy (Clement Escoffier)Red Hat Developers
4.7K views56 slides
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus by
D. Andreadis, Red Hat: Concepts and technical overview of QuarkusD. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of QuarkusUni Systems S.M.S.A.
346 views30 slides
GraalVM by
GraalVMGraalVM
GraalVMNexThoughts Technologies
926 views15 slides
Introduction to docker by
Introduction to dockerIntroduction to docker
Introduction to dockerFrederik Mogensen
2.2K views39 slides

What's hot(20)

Introduction to Apache Camel by Claus Ibsen
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
Claus Ibsen5.6K views
Vert.X: Microservices Were Never So Easy (Clement Escoffier) by Red Hat Developers
Vert.X: Microservices Were Never So Easy (Clement Escoffier)Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Red Hat Developers4.7K views
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus by Uni Systems S.M.S.A.
D. Andreadis, Red Hat: Concepts and technical overview of QuarkusD. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus
CI-CD Jenkins, GitHub Actions, Tekton by Araf Karsh Hamid
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton
Araf Karsh Hamid1.2K views
From Spring Framework 5.3 to 6.0 by VMware Tanzu
From Spring Framework 5.3 to 6.0From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0
VMware Tanzu2.6K views
Introduction to GraalVM by SHASHI KUMAR
Introduction to GraalVMIntroduction to GraalVM
Introduction to GraalVM
SHASHI KUMAR351 views
[2018] 오픈스택 5년 운영의 경험 by NHN FORWARD
[2018] 오픈스택 5년 운영의 경험[2018] 오픈스택 5년 운영의 경험
[2018] 오픈스택 5년 운영의 경험
NHN FORWARD2.7K views
Terraform 0.9 + good practices by Radek Simko
Terraform 0.9 + good practicesTerraform 0.9 + good practices
Terraform 0.9 + good practices
Radek Simko3.4K views
Spring Native and Spring AOT by VMware Tanzu
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
VMware Tanzu1.6K views
CI-Jenkins.pptx by MEDOBEST1
CI-Jenkins.pptxCI-Jenkins.pptx
CI-Jenkins.pptx
MEDOBEST167 views
Reactive Microservices with Quarkus by Niklas Heidloff
Reactive Microservices with QuarkusReactive Microservices with Quarkus
Reactive Microservices with Quarkus
Niklas Heidloff577 views
Introduction To Terraform by Sasitha Iresh
Introduction To TerraformIntroduction To Terraform
Introduction To Terraform
Sasitha Iresh240 views
Intégration continue des projets PHP avec Jenkins by Hugo Hamon
Intégration continue des projets PHP avec JenkinsIntégration continue des projets PHP avec Jenkins
Intégration continue des projets PHP avec Jenkins
Hugo Hamon20.1K views

Similar to Quarkus Denmark 2019

Commit to excellence - Java in containers by
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containersRed Hat Developers
5K views43 slides
[JOI] TOTVS Developers Joinville - Java #1 by
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1Rubens Dos Santos Filho
185 views74 slides
Drools, jBPM OptaPlanner presentation by
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationMark Proctor
338 views69 slides
Java and Containers - Make it Awesome ! by
Java and Containers - Make it Awesome !Java and Containers - Make it Awesome !
Java and Containers - Make it Awesome !Dinakar Guniguntala
214 views19 slides
DCSF19 Docker Containers & Java: What I Wish I Had Been Told by
DCSF19 Docker Containers & Java: What I Wish I Had Been ToldDCSF19 Docker Containers & Java: What I Wish I Had Been Told
DCSF19 Docker Containers & Java: What I Wish I Had Been ToldDocker, Inc.
2.6K views43 slides
Drupalcamp es 2013 drupal with lxc docker and vagrant by
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant Ricardo Amaro
3.8K views45 slides

Similar to Quarkus Denmark 2019(20)

Drools, jBPM OptaPlanner presentation by Mark Proctor
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
Mark Proctor338 views
DCSF19 Docker Containers & Java: What I Wish I Had Been Told by Docker, Inc.
DCSF19 Docker Containers & Java: What I Wish I Had Been ToldDCSF19 Docker Containers & Java: What I Wish I Had Been Told
DCSF19 Docker Containers & Java: What I Wish I Had Been Told
Docker, Inc.2.6K views
Drupalcamp es 2013 drupal with lxc docker and vagrant by Ricardo Amaro
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant
Ricardo Amaro3.8K views
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016 by Zabbix
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Zabbix1.5K views
VMware@Night Container and Virtualization by Opvizor, Inc.
VMware@Night Container and VirtualizationVMware@Night Container and Virtualization
VMware@Night Container and Virtualization
Opvizor, Inc.399 views
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015 by Datadog
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
Datadog 1.4K views
Automate drupal deployments with linux containers, docker and vagrant by Ricardo Amaro
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
Ricardo Amaro9.8K views
Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,... by Ivelin Yanev
Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...
Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...
Ivelin Yanev45 views
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days by Carlos Sanchez
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysUsing Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Carlos Sanchez1.1K views
Using Kubernetes for Continuous Integration and Continuous Delivery by Carlos Sanchez
Using Kubernetes for Continuous Integration and Continuous DeliveryUsing Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous Delivery
Carlos Sanchez623 views
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure by Patrick Chanezon
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Patrick Chanezon2.5K views

More from Max Andersen

Docker Tooling for Eclipse by
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for EclipseMax Andersen
1.3K views13 slides
OpenShift: Java EE in the clouds by
OpenShift: Java EE in the cloudsOpenShift: Java EE in the clouds
OpenShift: Java EE in the cloudsMax Andersen
1.6K views26 slides
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat... by
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Max Andersen
926 views12 slides
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7 by
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Max Andersen
1K views23 slides
Enterprise Maven Repository BOF by
Enterprise Maven Repository BOFEnterprise Maven Repository BOF
Enterprise Maven Repository BOFMax Andersen
823 views83 slides
Google analytics for Eclipse Plugins by
Google analytics for Eclipse PluginsGoogle analytics for Eclipse Plugins
Google analytics for Eclipse PluginsMax Andersen
1.8K views33 slides

More from Max Andersen(16)

Docker Tooling for Eclipse by Max Andersen
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for Eclipse
Max Andersen1.3K views
OpenShift: Java EE in the clouds by Max Andersen
OpenShift: Java EE in the cloudsOpenShift: Java EE in the clouds
OpenShift: Java EE in the clouds
Max Andersen1.6K views
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat... by Max Andersen
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Max Andersen926 views
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7 by Max Andersen
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Max Andersen1K views
Enterprise Maven Repository BOF by Max Andersen
Enterprise Maven Repository BOFEnterprise Maven Repository BOF
Enterprise Maven Repository BOF
Max Andersen823 views
Google analytics for Eclipse Plugins by Max Andersen
Google analytics for Eclipse PluginsGoogle analytics for Eclipse Plugins
Google analytics for Eclipse Plugins
Max Andersen1.8K views
JBoss Enterprise Maven Repository by Max Andersen
JBoss Enterprise Maven RepositoryJBoss Enterprise Maven Repository
JBoss Enterprise Maven Repository
Max Andersen1.9K views
Ceylon - the language and its tools by Max Andersen
Ceylon - the language and its toolsCeylon - the language and its tools
Ceylon - the language and its tools
Max Andersen1.4K views
Tycho - good, bad or ugly ? by Max Andersen
Tycho - good, bad or ugly ?Tycho - good, bad or ugly ?
Tycho - good, bad or ugly ?
Max Andersen1.6K views
Making Examples Accessible by Max Andersen
Making Examples AccessibleMaking Examples Accessible
Making Examples Accessible
Max Andersen380 views
OpenShift Express Intro by Max Andersen
OpenShift Express IntroOpenShift Express Intro
OpenShift Express Intro
Max Andersen1K views
JBoss AS 7 from a user perspective by Max Andersen
JBoss AS 7 from a user perspectiveJBoss AS 7 from a user perspective
JBoss AS 7 from a user perspective
Max Andersen978 views
How to be effective with JBoss Developer Studio by Max Andersen
How to be effective with JBoss Developer StudioHow to be effective with JBoss Developer Studio
How to be effective with JBoss Developer Studio
Max Andersen2.8K views
JBoss Asylum Podcast Live from JUDCon 2010 by Max Andersen
JBoss Asylum Podcast Live from JUDCon 2010JBoss Asylum Podcast Live from JUDCon 2010
JBoss Asylum Podcast Live from JUDCon 2010
Max Andersen546 views
How To Make A Framework Plugin That Does Not Suck by Max Andersen
How To Make A Framework Plugin That Does Not SuckHow To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not Suck
Max Andersen1.1K views

Recently uploaded

Microsoft Power Platform.pptx by
Microsoft Power Platform.pptxMicrosoft Power Platform.pptx
Microsoft Power Platform.pptxUni Systems S.M.S.A.
53 views38 slides
MVP and prioritization.pdf by
MVP and prioritization.pdfMVP and prioritization.pdf
MVP and prioritization.pdfrahuldharwal141
31 views8 slides
Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
36 views43 slides
Mini-Track: AI and ML in Network Operations Applications by
Mini-Track: AI and ML in Network Operations ApplicationsMini-Track: AI and ML in Network Operations Applications
Mini-Track: AI and ML in Network Operations ApplicationsNetwork Automation Forum
10 views24 slides
The Research Portal of Catalonia: Growing more (information) & more (services) by
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
80 views25 slides
HTTP headers that make your website go faster - devs.gent November 2023 by
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023Thijs Feryn
22 views151 slides

Recently uploaded(20)

Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman36 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely25 views
Future of AR - Facebook Presentation by ssuserb54b561
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
ssuserb54b56115 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc11 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi132 views
Powerful Google developer tools for immediate impact! (2023-24) by wesley chun
Powerful Google developer tools for immediate impact! (2023-24)Powerful Google developer tools for immediate impact! (2023-24)
Powerful Google developer tools for immediate impact! (2023-24)
wesley chun10 views
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva

Quarkus Denmark 2019

  • 1. 1
  • 2. Quarkus Hands-on Just VM Development: - Java 8 or 11 - Use code.quarkus.io to create your first app - Notepad (or VSCode, Eclipse, Intellij,...) For Native: - Java 8 - GraalVM 19.2.1 - Docker (if on Windows) Ideas for things to do: - quarkus.io/get-started - quarkus.io/guides/ - quarkus.io/guides/writing-extensions - Ascii Banner from png - Quarkus enable your favorite framework - Quarkus-coffeeshop-demo - Docker compose, kafka - - quarkus.io/quarkus-workshops/super-heros - 6-8 hours - - Your own idea… bit.ly/dkquarkus2019 2
  • 3. 3
  • 4. 4 1. It is a surprise 2. It has a major impact “ 3. People contend that they expected the event to happen (in hindsight)
  • 5. 5
  • 6. bit.ly/dkquarkus2019 6 The hidden truth about Java + containers
  • 7. 7
  • 9. 9
  • 10. 10
  • 11. QUARK: elementary particle / US: hardest thing in computer science
  • 12. 12 A cohesive platform for optimized developer joy: ● ● ● ● ● Benefit No. 1: Developer Joy
  • 13. From monolith to... bit.ly/dkquarkus2019 13 ● 1 monolith ≈ 20 microservices ≈ 200 functions ● Scale to 1 vs scale to 0 ● Start up time MONOLITH 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
  • 14. ● Designed for throughputs (requests/s) ● Startup overhead ○ # of classes, bytecode, JIT ● Memory overhead ○ # of classes, metadata, compilation bit.ly/dkquarkus2019 14 The hidden truth about Java + containers RSS
  • 15. bit.ly/dkquarkus2019 15 The hidden truth about Java + containers
  • 16. 16 Benefit No. 2: Supersonic Subatomic Java Quarkus + AOT 19 MB Quarkus + OpenJDK (JIT) 77 MB Traditional Cloud-Native Stack 140 MB
  • 17. 17 Benefit No. 2: Supersonic Subatomic Java Quarkus + AOT 35 MB Quarkus + OpenJDK (JIT) 130 MB Traditional Cloud-Native Stack 218 MB
  • 18. 18 Benefit No. 2: Supersonic Subatomic Java Quarkus + AOT 0.014 Seconds Quarkus + OpenJDK 0.75 Seconds Quarkus + AOT 0.055 Seconds Quarkus + OpenJDK (JIT) 2.5 Seconds Traditional Cloud-Native Stack 9.5 Seconds Traditional Cloud-Native Stack 4.3 Seconds
  • 19. bit.ly/dkquarkus2019 19 Benefit No. 2: Supersonic Subatomic Java CONTAINER ORCHESTRATION NodeNode Traditional Cloud-Native Java Stack Traditional Cloud-Native Java Stack Traditional Cloud-Native Java Stack Traditional Cloud-Native Java Stack Node NodeJS NodeJS NodeJS NodeJS NodeJS NodeJS NodeJS Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Node Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus
  • 20. 20 Benefit No. 3: Unifies Imperative and Reactive ● ● ● @Inject SayService say; @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { return say.hello(); } @Inject @Channel(”kafka”) Publisher<String> reactiveSay; @GET @Produces(MediaType.SERVER_SENT_EVENTS) public Publisher<String> stream() { return reactiveSay; }
  • 21. 21 Benefit No. 4: Best of Breed Frameworks & Standards
  • 22. 22
  • 24. bit.ly/dkquarkus2019 24 What does a framework do at startup time Move startup time to build time ● Parse config files ● Classpath & classes scanning ○ for annotations, getters or other metadata ● Build framework metamodel objects ● Prepare reflection and build proxies ● Start and open IO, threads etc
  • 25. bit.ly/dkquarkus2019 25 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 Build time benefits
  • 26. 26 JDK JIT - HotSpot AOTC - GraalVM Native Image
  • 27. 27
  • 29. Quarkus Hands-on requirements Just VM Development: - Java 8 or 11 - Use code.quarkus.io to create your first app - Notepad (or VSCode, Eclipse, Intellij,...) For Native: - Java 8 - GraalVM 19.2.1 - Docker (if on Windows) Ideas for things to do: - quarkus.io/get-started - quarkus.io/guides/ - quarkus.io/guides/writing-extensions - Ascii Banner from png - Quarkus enable your favorite framework - Quarkus-coffeeshop-demo - Docker compose, kafka - - quarkus.io/quarkus-workshops/super-hero s - 6-8 hours - - Your own idea… bit.ly/dkquarkus2019 29
  • 30. Closed-world assumption bit.ly/dkquarkus2019 30 AOTC - GraalVM - Dead code elimination
  • 31. bit.ly/dkquarkus2019 31 Not supported The Dark Side of GraalVM ● Dynamic classloading ● InvokeDynamic & Method handles ● Finalizer ● Security manager ● JVMTI, JMX, native VM Interfaces OK with caveats in usage ● Reflection (manual list) ● Dynamic proxy (manual list) ● JNI (manual list) ● Static initializers (eager) ● References (similar) The “Good” Parts
  • 32. bit.ly/dkquarkus2019 32 Drives the gathering of metadata needed by GraalVM GraalVM specific benefits ● based on framework knowledge ● Classes using reflection, resources, etc Minimize dependencies Help dead code elimination
  • 33. 33 JIT - OpenJDK HotSpot When to use which VM with Quarkus High memory density requirements High request/s/MB Fast startup time 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 Highest request/s/MB for low heap size usages Faster startup time 10s of ms for Serverless
  • 34. When to use which VM with Quarkus 34
  • 36. bit.ly/dkquarkus2019 36 @QuarkusTest public class HelloResourceTest { @Inject HelloService service; @Test public void testHelloEndpoint() { assertEquals( "Hello Quarkus", service.greeting("Quarkus") ); } } Fast start Testing is running Injection Full start
  • 37. bit.ly/dkquarkus2019 37 @Entity public class Todo extends PanacheEntity { // id is inherited public String title; public boolean completed; public String url; public static List<Todo> findNotCompleted() { return list("completed", false); } } @Path("/api") public class TodoResource { @GET public List<Todo> getAll() { return Todo.listAll(Sort.by("order")); } } @Entity public class Todo { @Id @GeneratedValue public Long id; public String title; public boolean completed; public String url; } @ApplicationScoped public class TodoRepo extends PanacheRepository<Todo> { public List<Todo> findNotCompleted() { return list("completed", false); } } @Path("/api") public class TodoResource { @Inject TodoRepo repo; @GET public List<Todo> getAll() { return repo.listAll(Sort.by("order")); } } ActiveRecord or Repository pattern
  • 38. 38
  • 39. 39 Developer Joy Quarkus Benefits Supersonic Subatomic Java Unifies imperative and reactive Best of breed libraries and standards
  • 40. 40
  • 41. 41 1. It is a surprise 2. It has a major impact “ 3. People contend that they expected the event to happen (in hindsight)
  • 42. 42
  • 43. 43
  • 44. Quarkus Hands-on Just VM Development: - Java 8 or 11 - Use code.quarkus.io to create your first app - Notepad (or VSCode, Eclipse, Intellij,...) For Native: - Java 8 - GraalVM 19.2.1 - Docker (if on Windows) Ideas for things to do: - quarkus.io/get-started - quarkus.io/guides/ - quarkus.io/guides/writing-extensions - Ascii Banner from png - Quarkus enable your favorite framework - quarkus.io/quarkus-workshops/super-hero s - 6-8 hours - Own ideas ? bit.ly/dkquarkus2019 44