Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

@edeandrea Who’s on Stage Today? Eric Deandrea 🤘 25+ years software development experience Java Champion 🤘 Contributor to Open Source projects Quarkus Spring Boot, Spring Framework, Spring Security LangChain4j (& Quarkus LangChain4j) Wiremock Microcks 🤘 Boston Java Users ACM Chapter Board Member 🤘 Published author

Slide 3

Slide 3 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 4

Slide 4 text

@edeandrea Java,The Enterprise Workhorse

Slide 5

Slide 5 text

@edeandrea Java,The Enterprise Workhorse

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 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 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

@edeandrea What’s the Secret Sauce? Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 18

Slide 18 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 19

Slide 19 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 20

Slide 20 text

@edeandrea What’s the Secret Sauce? Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 21

Slide 21 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 22

Slide 22 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 23

Slide 23 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 24

Slide 24 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 25

Slide 25 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 26

Slide 26 text

@edeandrea What’s the Secret Sauce? Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 27

Slide 27 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 28

Slide 28 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate 🤘Jandex Indexing (offline reflection) Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 29

Slide 29 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate 🤘Jandex Indexing (offline reflection) Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 30

Slide 30 text

@edeandrea What’s the Secret Sauce? Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 31

Slide 31 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate 🤘Jandex Indexing (offline reflection) 🤘Don’t make humans tell the computer what it knows Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 32

Slide 32 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate 🤘Jandex Indexing (offline reflection) 🤘Don’t make humans tell the computer what it knows Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 33

Slide 33 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate 🤘Jandex Indexing (offline reflection) 🤘Don’t make humans tell the computer what it knows Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 34

Slide 34 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate 🤘Jandex Indexing (offline reflection) 🤘Don’t make humans tell the computer what it knows Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 35

Slide 35 text

@edeandrea What’s the Secret Sauce? Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 36

Slide 36 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate 🤘Jandex Indexing (offline reflection) 🤘Don’t make humans tell the computer what it knows 🤘Continuous profiling & shaving Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 37

Slide 37 text

@edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate 🤘Jandex Indexing (offline reflection) 🤘Don’t make humans tell the computer what it knows 🤘Continuous profiling & shaving 🤘Be reactive without forcing humans to do reactive Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

@edeandrea IT’S STILL JAVA!

Slide 41

Slide 41 text

@edeandrea AOT/Native vs JVM Mode

Slide 42

Slide 42 text

@edeandrea

Slide 43

Slide 43 text

@edeandrea Jam Time!

Slide 44

Slide 44 text

@edeandrea Migration Toolkit For Applications “Simplifies the Migration of Spring Apps to Quarkus” 🤘 Automate Application Analysis 🤘 Estimate Level of Effort 🤘 Accelerate Code Transformation & Migration 🤘 Includes Rules for DI, Metrics, Security, Web, Shell, & More https://developers.redhat.com/products/mta

Slide 45

Slide 45 text

@edeandrea https://www.techempower.com/benchmarks/#section=data-r22&test=db&f=zijunz-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-zik0zj-v2qiv3-xamxa7-zik0zj-zik0zj-zik0zj-zik0zj- zik0zj-1ekf&hw=ph&l=zik0vz-cn3 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 Don’t Take My Word For It!

Slide 46

Slide 46 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Ratio (SB AOT / SB) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.17.5 3.4.1 3.4.1 3.17.5 3.4.1 Build time (s) 12.88 7.82 164.75% 16.88 76.34% 215.81% 172.8 283.39 60.97% Av. RSS after startup (MB) 190.6 297.92 63.98% 293.88 64.86% 98.64% 71.09 206.47 34.43% Av. time to 1st req (ms) 4,684 8,885.33 52.72% 7,940 58.99% 89.36% 132.67 924.33 14.35% Av. RSS after 1st req (MB) 241.29 344.86 69.97% 335.76 71.86% 97.36% 78.95 208.87 37.8% Av. throughput (req/sec) 30,769.99 6,713.7 458.32% 6,750.04 455.85% 100.54% 16,189.26 6,024.12 268.74% Max throughput density (req/sec/MB) 41.77 8.58 487.08% 8.75 477.32% 102.04% 61.1 14.33 426.38% Build RSS (GB) 6.0 7.83 76.63% Binary Size (MB) 90.47 156.58 57.78% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 47

Slide 47 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Ratio (SB AOT / SB) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.17.5 3.4.1 3.4.1 3.17.5 3.4.1 Build time (s) 12.88 7.82 164.75% 16.88 76.34% 215.81% 172.8 283.39 60.97% Av. RSS after startup (MB) 190.6 297.92 63.98% 293.88 64.86% 98.64% 71.09 206.47 34.43% Av. time to 1st req (ms) 4,684 8,885.33 52.72% 7,940 58.99% 89.36% 132.67 924.33 14.35% Av. RSS after 1st req (MB) 241.29 344.86 69.97% 335.76 71.86% 97.36% 78.95 208.87 37.8% Av. throughput (req/sec) 30,769.99 6,713.7 458.32% 6,750.04 455.85% 100.54% 16,189.26 6,024.12 268.74% Max throughput density (req/sec/MB) 41.77 8.58 487.08% 8.75 477.32% 102.04% 61.1 14.33 426.38% Build RSS (GB) 6.0 7.83 76.63% Binary Size (MB) 90.47 156.58 57.78% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 48

Slide 48 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Ratio (SB AOT / SB) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.17.5 3.4.1 3.4.1 3.17.5 3.4.1 Build time (s) 12.88 7.82 164.75% 16.88 76.34% 215.81% 172.8 283.39 60.97% Av. RSS after startup (MB) 190.6 297.92 63.98% 293.88 64.86% 98.64% 71.09 206.47 34.43% Av. time to 1st req (ms) 4,684 8,885.33 52.72% 7,940 58.99% 89.36% 132.67 924.33 14.35% Av. RSS after 1st req (MB) 241.29 344.86 69.97% 335.76 71.86% 97.36% 78.95 208.87 37.8% Av. throughput (req/sec) 30,769.99 6,713.7 458.32% 6,750.04 455.85% 100.54% 16,189.26 6,024.12 268.74% Max throughput density (req/sec/MB) 41.77 8.58 487.08% 8.75 477.32% 102.04% 61.1 14.33 426.38% Build RSS (GB) 6.0 7.83 76.63% Binary Size (MB) 90.47 156.58 57.78% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 49

Slide 49 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Ratio (SB AOT / SB) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.17.5 3.4.1 3.4.1 3.17.5 3.4.1 Build time (s) 12.88 7.82 164.75% 16.88 76.34% 215.81% 172.8 283.39 60.97% Av. RSS after startup (MB) 190.6 297.92 63.98% 293.88 64.86% 98.64% 71.09 206.47 34.43% Av. time to 1st req (ms) 4,684 8,885.33 52.72% 7,940 58.99% 89.36% 132.67 924.33 14.35% Av. RSS after 1st req (MB) 241.29 344.86 69.97% 335.76 71.86% 97.36% 78.95 208.87 37.8% Av. throughput (req/sec) 30,769.99 6,713.7 458.32% 6,750.04 455.85% 100.54% 16,189.26 6,024.12 268.74% Max throughput density (req/sec/MB) 41.77 8.58 487.08% 8.75 477.32% 102.04% 61.1 14.33 426.38% Build RSS (GB) 6.0 7.83 76.63% Binary Size (MB) 90.47 156.58 57.78% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 50

Slide 50 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Ratio (SB AOT / SB) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.17.5 3.4.1 3.4.1 3.17.5 3.4.1 Build time (s) 12.88 7.82 164.75% 16.88 76.34% 215.81% 172.8 283.39 60.97% Av. RSS after startup (MB) 190.6 297.92 63.98% 293.88 64.86% 98.64% 71.09 206.47 34.43% Av. time to 1st req (ms) 4,684 8,885.33 52.72% 7,940 58.99% 89.36% 132.67 924.33 14.35% Av. RSS after 1st req (MB) 241.29 344.86 69.97% 335.76 71.86% 97.36% 78.95 208.87 37.8% Av. throughput (req/sec) 30,769.99 6,713.7 458.32% 6,750.04 455.85% 100.54% 16,189.26 6,024.12 268.74% Max throughput density (req/sec/MB) 41.77 8.58 487.08% 8.75 477.32% 102.04% 61.1 14.33 426.38% Build RSS (GB) 6.0 7.83 76.63% Binary Size (MB) 90.47 156.58 57.78% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 51

Slide 51 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Ratio (SB AOT / SB) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.17.5 3.4.1 3.4.1 3.17.5 3.4.1 Build time (s) 12.88 7.82 164.75% 16.88 76.34% 215.81% 172.8 283.39 60.97% Av. RSS after startup (MB) 190.6 297.92 63.98% 293.88 64.86% 98.64% 71.09 206.47 34.43% Av. time to 1st req (ms) 4,684 8,885.33 52.72% 7,940 58.99% 89.36% 132.67 924.33 14.35% Av. RSS after 1st req (MB) 241.29 344.86 69.97% 335.76 71.86% 97.36% 78.95 208.87 37.8% Av. throughput (req/sec) 30,769.99 6,713.7 458.32% 6,750.04 455.85% 100.54% 16,189.26 6,024.12 268.74% Max throughput density (req/sec/MB) 41.77 8.58 487.08% 8.75 477.32% 102.04% 61.1 14.33 426.38% Build RSS (GB) 6.0 7.83 76.63% Binary Size (MB) 90.47 156.58 57.78% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 52

Slide 52 text

@edeandrea A Real Example

Slide 53

Slide 53 text

@edeandrea 🤘 Spring Boot 3 application contents: ○ 39,533 classes ○ 84,792 fields ○ 285,156 methods ○ Reflection: ○ 11,143 classes ○ 1,637 fields ○ 13,032 methods A Real Example

Slide 54

Slide 54 text

@edeandrea 🤘 Spring Boot 3 application contents: ○ 39,533 classes ○ 84,792 fields ○ 285,156 methods ○ Reflection: ○ 11,143 classes ○ 1,637 fields ○ 13,032 methods 🤘 Quarkus 3 application contents: ○ 23,814 classes ○ 47,373 fields ○ 190,150 methods ○ Reflection: ○ 6,691 classes ○ 202 fields ○ 4,971 methods A Real Example

Slide 55

Slide 55 text

@edeandrea 🤘 Spring Boot 3 application contents: ○ 39,533 classes ○ 84,792 fields ○ 285,156 methods ○ Reflection: ○ 11,143 classes ○ 1,637 fields ○ 13,032 methods 🤘 Quarkus 3 application contents: ○ 23,814 classes ○ 47,373 fields ○ 190,150 methods ○ Reflection: ○ 6,691 classes ○ 202 fields ○ 4,971 methods 🤘 The Quarkus application has: ○ 15,719 (40%) less classes ○ 37,419 (44%) less fields ○ 87,519 (33%) less methods ○ 4,452 (40%) less classes using reflection ○ 1,435 (88%) less fields using reflection ○ 8,061 (62%) less methods using reflection A Real Example

Slide 56

Slide 56 text

@edeandrea Don’t Take Our Word For It! https://www.redhat.com/en/resources/etat-du-valais-customer-case-study

Slide 57

Slide 57 text

@edeandrea https://www.youtube.com/live/YNxz3KaTz5Y

Slide 58

Slide 58 text

@edeandrea https://quarkus.io/blog/tag/user-story Don’t Take Our Word For It!

Slide 59

Slide 59 text

@edeandrea https://quarkus.io/blog/tag/user-story Don’t Take Our Word For It!

Slide 60

Slide 60 text

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

Slide 61

Slide 61 text

@edeandrea

Slide 62

Slide 62 text

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

Slide 63

Slide 63 text

@edeandrea Thank You!