Slide 1

Slide 1 text

@kevindubois

Slide 2

Slide 2 text

@kevindubois Kevin Dubois Who’s on stage today? 🤘 Principal Developer Advocate at Red Hat 🤘 18+ years professional software development experience 🤘 Speak English, Dutch, French, Italian 🤘 Passionate about Dev Experience & Open Source @kevindubois@mastodon.social youtube.com/@thekevindubois linkedin.com/in/kevindubois

Slide 3

Slide 3 text

@kevindubois 3 “Traditional Java”

Slide 4

Slide 4 text

@kevindubois Java Designed For a Different Time Traditional ● Throughput at the expense of footprint ● Long running at expense of startup speed ● Rich, dynamic behaviour for mutable systems Cloud Native ● Throughput solved by scaling ● Ephemeral, immutable systems ● Footprint and performance matter

Slide 5

Slide 5 text

@kevindubois The Warmup Issue with Java https://youtu.be/bWmuqh6wHgE (first 13 minutes)

Slide 6

Slide 6 text

@kevindubois JVM Scaling on Kubernetes

Slide 7

Slide 7 text

@kevindubois 7 Cloud Native Java Stack + Containers “Lufthansa Technik AVIATAR experiences significant cloud resources savings by moving to Kubernetes-native Quarkus” - Quarkus.io Container Platform K8s 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 K8s Node NodeJS NodeJS NodeJS NodeJS NodeJS NodeJS NodeJS K8s Node Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go K8s Node Quarkus on JVM Quarkus on JVM Quarkus on JVM Quarkus on JVM Quarkus on JVM Quarkus on JVM Quarkus on JVM K8s 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”

Slide 8

Slide 8 text

@kevindubois Build Time Runtime Packaging (maven, etc) gradle…) Load config file from file system Parse it Classpath scanning to find annotated classes Attempt to load class to enable/disable features Build its model of the world. Start the management (thread, pool…) @ @ > How Does a Framework Start?

Slide 9

Slide 9 text

@kevindubois Build Time Runtime @ @ > The Quarkus Way Runtime Build Time @ @ > Package model Build Time Runtime @ @ >

Slide 10

Slide 10 text

@kevindubois The Quarkus Way enables Native Compilation JVM Build Time @ @ > Package model Native

Slide 11

Slide 11 text

@kevindubois Unification of Imperative & Reactive Unification of Imperative and Reactive

Slide 12

Slide 12 text

@kevindubois 🤘 Based on standards 🤘 Developer productivity ○ Zero-config Live coding ○ Developer services ○ Continuous testing ○ Dev UI ○ CLI 🤘 Streamlined for the 80% common usages, flexible for the rest 🤘 No hassle native executable generation Enhancing Developer Joy https://quarkus.io/developer-joy

Slide 13

Slide 13 text

@kevindubois IT’S STILL JAVA!

Slide 14

Slide 14 text

@kevindubois 🤘 Red Hat sits on the GraalVM advisory board 🤘 Red Hat contributes to GraalVM ○ Debugging support ○ ARM support ○ Java Flight Recorder 🤘 Quarkus is part of the GraalVM test suite Native Compilation

Slide 15

Slide 15 text

@kevindubois 🤘 Mandrel: direct downstream distribution of GraalVM 🤘 Combines best of GraalVM + OpenJDK to offer native builds 🤘 Makes GraalVM easier to consume 🤘 Open Source licensing & maintenance 🤘 Consumes patches & CVEs from OpenJDK 🤘 Near drop-in replacement for GraalVM 🤘 Focused on native compilation for Java only 🤘 No change for user experience with Quarkus 🤘 No need to pay Oracle for support Native Compilation with Mandrel

Slide 16

Slide 16 text

@kevindubois AOT/Native-image vs VM mode

Slide 17

Slide 17 text

@kevindubois Command Line Job Github App Cloud / Container Native Serverless & Functions Micro services EDA Kube Operator Traditional Apps CRUD Monoliths GitHub Actions Admin Tools Reactive Systems

Slide 18

Slide 18 text

@kevindubois Jam Time!

Slide 19

Slide 19 text

@kevindubois

Slide 20

Slide 20 text

@kevindubois

Slide 21

Slide 21 text

@kevindubois https://github.com/kdubois/CamelQuarkusVoter Camel Quarkus Voter App

Slide 22

Slide 22 text

@kevindubois 22 Quarkus Performance

Slide 23

Slide 23 text

@kevindubois Quarkus IDC Lab Validation https://www.redhat.com/en/blog/key-findings-idc-red-hat-quarkus-lab-validation

Slide 24

Slide 24 text

@kevindubois https://www.techempower.com/benchmarks/#section=data-r21&test=db&f=zijunz-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-v2qiv3-xamxa7-zik0zj-zik0zj-zik0zj-zik0zj-35r https://www.redhat.com/en/blog/key-findings-idc-red-hat-quarkus-lab-validation https://www.reddit.com/r/java/comments/o0ewar/do_quarkus_performance_benefits_scale 24

Slide 25

Slide 25 text

@kevindubois The importance of density JVM Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 2.7.5.ER4 2.6.3 Build time (s) 6.69 17.65 37.92% Av. RSS after startup (MB) 506.56 913.01 55.48% Av. time to 1st req (ms) 2,287.67 4,653.67 49.16% Av. RSS after 1st req (MB) 534.49 973.8 54.89% Av. throughput (req/sec) 28,904.46 10,758.41 268.67% Av. RSS for max throughput (MB) 1,933.16 2,578.3 74.98% Max throughput density (req/sec/MB) 14.97 4.54 329.8% Native Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 2.7.5.ER4 2.6.3 Build time (s) 89.25 213.78 41.75% Av. RSS after startup (MB) 58.3 160.17 36.4% Av. time to 1st req (ms) 37.33 175.33 21.29% Av. RSS after 1st req (MB) 63.79 167.4 38.1% Av. throughput (req/sec) 21,683.95 9,045.15 239.73% Av. RSS for max throughput (MB) 413.63 599.89 68.95% Max throughput density (req/sec/MB) 53.73 15.13 355.19% Some real numbers (8 cores, 12GB RAM, GraalVM 21.3.0.r11)

Slide 26

Slide 26 text

@kevindubois https://twitter.com/mraible/status/1585225154094764034 https://github.com/oktadev/native-java-examples/pull/54 Don’t take my word for it!

Slide 27

Slide 27 text

@kevindubois https://www.redhat.com/en/resources/greener-java-applications-detail (published 11/14/22) https://hollycummins.com/writing-greener-java-applications Setup / Assumptions 🤘 AWS (us-east-1) 🤘 SLA > 99% 🤘 800 req/sec over 20 days 🤘 50% load The Cost / Carbon Impact

Slide 28

Slide 28 text

@kevindubois 28 Additional Resources

Slide 29

Slide 29 text

@kevindubois https://github.com/quarkusio/quarkus-super-heroes Quarkus Superheroes

Slide 30

Slide 30 text

@kevindubois “We went from 1 min startup times to 400 ms.” RH Press Release Community “We became increasingly worried about resource consumption that Spring Boot was having while being deployed on the Kubernetes cluster… It became increasingly cumbersome to find ways to circumvent the methodology we were using just to squeeze every little bit of performance out of Spring Boot” - Christos Sotiriou DXL Backend Chapter Lead, Vodafone Greece Information Week Community “We could run 3x denser deployments without sacrificing availability and response times of service.” “Quarkus is close to what our developers are already doing with Spring and it’s familiar to them. This is a big benefit” Community “Before we introduced Quarkus, many of our customers had started to look at alternative stacks like Go and node.js to improve performance and efficiency. These customers were weary of selecting a new language and having to hire new developers or retrain their existing Java developers.” - Arijit Mazumdar “There was a low learning curve with Quarkus. It took one of our developers one week to get up to speed on Quarkus and another week to migrate a Spring application to Quarkus.” - Arijit Mazumdar “Quarkus and the Spring API compatibility reduced the migration time and complexity which is critically important for our customers.” - Arijit Mazumdar Community Orgs experiencing Quarkus Joy https://quarkus.io/blog/tag/user-story

Slide 31

Slide 31 text

@kevindubois Orgs experiencing Quarkus Joy “using Spring with AWS Lambda would have been prohibitive because the startup time of Spring in AWS Lambda is too big from my research” - Dennis Baerten “As costs increase, this is when the benefit of using Quarkus will be experienced due to its more efficient use of cloud resources and fast startup time compared to plain Java and Spring Boot” - Dennis Baerten “It took me about 3 days to get familiar with the Quarkus stack” - Dennis Berten, Spring Developer Blog “Some of Payair’s developers had mainly Spring experience, we were concerned that it would be difficult for them to “switch sides”. It turned out that our fear of the unknown was completely unfounded. Quarkus leverages some good old Jakarta EE standards that all Java developers are familiar with. We did not have to learn a bunch of new APIs.” - Hubert Lewandowski “As a long term Spring developer I realized that Spring is slowly becoming the very thing it swore to destroy. The initial premises of Spring (which basically can be summed up as a lightweight alternative to Jakarta EE) are way past the expiry date now. Spring is the undisputed heavyweight champion that can handle everything you imagine but is not your best option for fast and light services. And that applies to Spring Boot as well. - Hubert Lewandowski Blog “When you adopt Quarkus, you will be productive from day one since you don’t really need to learn new technologies.” -TalkDesk Blog “After deploying, we found that Quarkus used about 15% of the CPU, 12% of the memory compared to Spring Boot. So far, we are sticking with Quarkus!” - Sam Dacanay, Lead Software Engineer Blog https://quarkus.io/blog/tag/user-story

Slide 32

Slide 32 text

@kevindubois Had a good time? let everyone know! @kevindubois #quarkusrocks Want to know more? Links are in the jam doc below Web quarkus.io Talk quarkus.io/community Twitter @quarkusio More developers.redhat.com dn.dev/quarkus-tutorial

Slide 33

Slide 33 text

@kevindubois ● Showcase & explain Quarkus, how it enables modern Java development & the Kubernetes-native experience ● Introduce familiar Spring concepts, constructs, & conventions and how they map to Quarkus ● Equivalent code examples between Quarkus and Spring as well as emphasis on testing patterns & practices ● Chapters devoted to ○ Why the need for Quarkus in the first place? ○ Getting started ○ RESTful applications ○ Persistence ○ Event-driven services ○ Cloud environments, containers, and Kubernetes https://red.ht/quarkus-spring-devs

Slide 34

Slide 34 text

@kevindubois Thank You!