Slide 1

Slide 1 text

@edeandrea for Developers Eric Deandrea Sr. Principal Developer Advocate 
 Red Hat

Slide 2

Slide 2 text

@edeandrea Eric Deandrea Who’s on stage today? 🤘 22+ years software development experience 🤘 Contributor to Open Source projects 🤘 Quarkus 🤘 Spring Boot 🤘 Spring Framework 🤘 Spring Security 🤘 Spring Session 🤘 Build & deliver cloud-native development training programs 🤘 Published author

Slide 3

Slide 3 text

Holly Cummins Sr. Principal Software Engineer Red Hat @holly_cummins Eric Deandrea Sr. Principal Developer Advocate Red Hat @edeandrea Avoiding common pitfalls with modern microservices testing

Slide 4

Slide 4 text

@edeandrea ● How Quarkus enables modern Java development & the Kubernetes-native experience 
 ● Introduce familiar Spring concepts, constructs, & conventions and how they map to Quarkus 
 ● Emphasis on testing patterns & practices https://red.ht/quarkus-spring-devs

Slide 5

Slide 5 text

@edeandrea Java, The Enterprise Workhorse

Slide 6

Slide 6 text

@edeandrea Java, The Enterprise Workhorse Monolith J2SE / J2EE Java / Jakarta EE

Slide 7

Slide 7 text

@edeandrea Java, The Enterprise Workhorse Monolith J2SE / J2EE Java / Jakarta EE Cloud-Native Microservices Spring Boot MicroProfile

Slide 8

Slide 8 text

@edeandrea Java, The Enterprise Workhorse Monolith J2SE / J2EE Java / Jakarta EE Cloud-Native Microservices Spring Boot MicroProfile

Slide 9

Slide 9 text

@edeandrea Java / Jakarta EE J2SE / J2EE Monolith Cloud-Native Microservices Serverless Event-Driven Microservices Cloud-Native Java, The Enterprise Workhorse Spring Boot MicroProfile

Slide 10

Slide 10 text

@edeandrea The Warmup Issue with Java https://youtu.be/bWmuqh6wHgE (Simon Ritter - Azul Systems)

Slide 11

Slide 11 text

@edeandrea 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 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

@edeandrea Unification of Imperative & Reactive Unification of Imperative and Reactive

Slide 15

Slide 15 text

@edeandrea 🤘Zero-config Live coding 🤘Auto-provision services 🤘Continuous testing 🤘Dev UI 🤘CLI Enhancing Developer Joy

Slide 16

Slide 16 text

@edeandrea IT’S STILL JAVA!

Slide 17

Slide 17 text

@edeandrea AOT/Native-image vs VM mode

Slide 18

Slide 18 text

@edeandrea 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 Traditional CLI

Slide 19

Slide 19 text

@edeandrea Jam Time!

Slide 20

Slide 20 text

@edeandrea 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 Quarkus Performance

Slide 21

Slide 21 text

@edeandrea JVM Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 2.13.7.CR2 2.7.9 Build time (s) 7.27 17.68 41.13% Av. RSS after startup (MB) 177.21 441.77 40.11% Av. time to 1st req (ms) 2,460.67 5,240.33 46.96% Av. RSS after 1st req (MB) 252.12 481.67 52.34% Av. throughput (req/sec) 17,940.55 6,808 263.52% Av. RSS for max throughput (MB) 523.82 665.58 78.7% Max throughput density (req/sec/ MB) 35.52 11.24 316.1% Native Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 2.13.7.CR2 2.7.9 Build time (s) 118.53 199.15 59.52% Av. RSS after startup (MB) 60.33 136.54 44.18% Av. time to 1st req (ms) 41.67 217.67 19.14% Av. RSS after 1st req (MB) 65.2 141.87 45.96% Av. throughput (req/sec) 27,326.59 10,799.41 253.04% Av. RSS for max throughput (MB) 453.34 625.67 72.46% Max throughput density (req/sec/ MB) 69.43 18.47 375.95% Quarkus Performance Some real numbers (8 cores, 12GB RAM, GraalVM 22.3.r11)

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

@edeandrea “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 https://quarkus.io/blog/tag/user-story Don’t Take Our Word For It!

Slide 25

Slide 25 text

@edeandrea “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 Don’t Take Our Word For It!

Slide 26

Slide 26 text

@edeandrea 🤘 Kubernetes-native inner loop development with Quarkus 🤘 Kubernetes-Native Development with Quarkus and Eclipse JKube 🤘 Spring Boot on Quarkus: Magic or Madness? 🤘 Why should I choose Quarkus over Spring for my microservices? 🤘 Quarkus for Spring Developers: Getting Started 🤘 Evolution of the Quarkus Developer Experience 🤘 Quarkus Insights: Quarkus for Spring Developers 🤘 Quarkus Insights: Quarkus Superheroes Additional Resources

Slide 27

Slide 27 text

@edeandrea Jam Time!

Slide 28

Slide 28 text

@edeandrea Jam Time! 🤘 Convert and run a full-featured Spring Boot application on Quarkus with no code changes 🤘 Spring Web 🤘 Spring Data JPA 🤘 Spring Actuator 🤘 Spring Boot Config 🤘 SpringDoc OpenAPI 🤘 Micrometer metrics 🤘 PostgreSQL (JDBC) 🤘 Hibernate Validator

Slide 29

Slide 29 text

@edeandrea 🤘 Replace Spring Boot starters with equivalent Quarkus extensions 🤘 Replace Spring configuration with equivalent Quarkus configuration 🤘 Little changes to get tests working 🤘 Bonus Track: No hassle native image generation Quarkus & native rocking the stage since 2019! Jam Time!

Slide 30

Slide 30 text

@edeandrea Jam Time! https://red.ht/spring-to-quarkus-todo

Slide 31

Slide 31 text

@edeandrea Thank You!