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 🤘 26+ 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 The Warmup Issue with Java Simon Ritter - Azul Systems - https://youtu.be/bWmuqh6wHgE (first 13 minutes)

Slide 5

Slide 5 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 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

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 🤘Dead code elimination / inlining 🤘Extensible build process so libraries can participate Holly Cummins - https://youtu.be/vnrXXvnqriA

Slide 19

Slide 19 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 20

Slide 20 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 21

Slide 21 text

@edeandrea What’s the Secret Sauce? 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 🤘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 23

Slide 23 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 24

Slide 24 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 25

Slide 25 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 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 🤘Jandex Indexing (offline reflection) 🤘Don’t make humans tell the computer what it knows 🤘Continuous profiling & shaving 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) 🤘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 29

Slide 29 text

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

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

@edeandrea IT’S STILL JAVA!

Slide 32

Slide 32 text

@edeandrea

Slide 33

Slide 33 text

@edeandrea Jam Time!

Slide 34

Slide 34 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.22.3 3.4.5 3.4.5 3.22.3 3.4.5 Build time (s) 13.13 7.6 172.95% 17.02 77.26% 178.99 279.45 64.05% Av. RSS after startup (MB) 192.31 298.09 64.51% 290.4 66.22% 71.22 205.74 34.62% Av. time to 1st req (ms) 4,652.67 8,770.33 53.05% 8,180.67 56.87% 135.67 916.67 14.8% Av. RSS after 1st req (MB) 244.61 339.52 72.05% 331.78 73.73% 79.12 208.21 38% Av. throughput (req/sec) 30,397.95 6,495.2 468.01% 6,427.64 472.93% 16,753.94 6,146.27 272.59% Max throughput density (req/sec/MB) 35.79 7.95 450.5% 7.89 453.88% 59.82 15.94 375.27% Build RSS (GB) 5.62 7.99 70.34% Binary Size (MB) 90.95 157.04 57.92% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 35

Slide 35 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.22.3 3.4.5 3.4.5 3.22.3 3.4.5 Build time (s) 13.13 7.6 172.95% 17.02 77.26% 178.99 279.45 64.05% Av. RSS after startup (MB) 192.31 298.09 64.51% 290.4 66.22% 71.22 205.74 34.62% Av. time to 1st req (ms) 4,652.67 8,770.33 53.05% 8,180.67 56.87% 135.67 916.67 14.8% Av. RSS after 1st req (MB) 244.61 339.52 72.05% 331.78 73.73% 79.12 208.21 38% Av. throughput (req/sec) 30,397.95 6,495.2 468.01% 6,427.64 472.93% 16,753.94 6,146.27 272.59% Max throughput density (req/sec/MB) 35.79 7.95 450.5% 7.89 453.88% 59.82 15.94 375.27% Build RSS (GB) 5.62 7.99 70.34% Binary Size (MB) 90.95 157.04 57.92% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 36

Slide 36 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.22.3 3.4.5 3.4.5 3.22.3 3.4.5 Build time (s) 13.13 7.6 172.95% 17.02 77.26% 178.99 279.45 64.05% Av. RSS after startup (MB) 192.31 298.09 64.51% 290.4 66.22% 71.22 205.74 34.62% Av. time to 1st req (ms) 4,652.67 8,770.33 53.05% 8,180.67 56.87% 135.67 916.67 14.8% Av. RSS after 1st req (MB) 244.61 339.52 72.05% 331.78 73.73% 79.12 208.21 38% Av. throughput (req/sec) 30,397.95 6,495.2 468.01% 6,427.64 472.93% 16,753.94 6,146.27 272.59% Max throughput density (req/sec/MB) 35.79 7.95 450.5% 7.89 453.88% 59.82 15.94 375.27% Build RSS (GB) 5.62 7.99 70.34% Binary Size (MB) 90.95 157.04 57.92% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 37

Slide 37 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.22.3 3.4.5 3.4.5 3.22.3 3.4.5 Build time (s) 13.13 7.6 172.95% 17.02 77.26% 178.99 279.45 64.05% Av. RSS after startup (MB) 192.31 298.09 64.51% 290.4 66.22% 71.22 205.74 34.62% Av. time to 1st req (ms) 4,652.67 8,770.33 53.05% 8,180.67 56.87% 135.67 916.67 14.8% Av. RSS after 1st req (MB) 244.61 339.52 72.05% 331.78 73.73% 79.12 208.21 38% Av. throughput (req/sec) 30,397.95 6,495.2 468.01% 6,427.64 472.93% 16,753.94 6,146.27 272.59% Max throughput density (req/sec/MB) 35.79 7.95 450.5% 7.89 453.88% 59.82 15.94 375.27% Build RSS (GB) 5.62 7.99 70.34% Binary Size (MB) 90.95 157.04 57.92% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 38

Slide 38 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.22.3 3.4.5 3.4.5 3.22.3 3.4.5 Build time (s) 13.13 7.6 172.95% 17.02 77.26% 178.99 279.45 64.05% Av. RSS after startup (MB) 192.31 298.09 64.51% 290.4 66.22% 71.22 205.74 34.62% Av. time to 1st req (ms) 4,652.67 8,770.33 53.05% 8,180.67 56.87% 135.67 916.67 14.8% Av. RSS after 1st req (MB) 244.61 339.52 72.05% 331.78 73.73% 79.12 208.21 38% Av. throughput (req/sec) 30,397.95 6,495.2 468.01% 6,427.64 472.93% 16,753.94 6,146.27 272.59% Max throughput density (req/sec/MB) 35.79 7.95 450.5% 7.89 453.88% 59.82 15.94 375.27% Build RSS (GB) 5.62 7.99 70.34% Binary Size (MB) 90.95 157.04 57.92% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 39

Slide 39 text

@edeandrea JVM Native Quarkus Spring Boot Ratio (Quarkus / SB) Spring Boot (w/AOT) Ratio (Quarkus / SB AOT) Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.22.3 3.4.5 3.4.5 3.22.3 3.4.5 Build time (s) 13.13 7.6 172.95% 17.02 77.26% 178.99 279.45 64.05% Av. RSS after startup (MB) 192.31 298.09 64.51% 290.4 66.22% 71.22 205.74 34.62% Av. time to 1st req (ms) 4,652.67 8,770.33 53.05% 8,180.67 56.87% 135.67 916.67 14.8% Av. RSS after 1st req (MB) 244.61 339.52 72.05% 331.78 73.73% 79.12 208.21 38% Av. throughput (req/sec) 30,397.95 6,495.2 468.01% 6,427.64 472.93% 16,753.94 6,146.27 272.59% Max throughput density (req/sec/MB) 35.79 7.95 450.5% 7.89 453.88% 59.82 15.94 375.27% Build RSS (GB) 5.62 7.99 70.34% Binary Size (MB) 90.95 157.04 57.92% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)

Slide 40

Slide 40 text

@edeandrea A Real Example

Slide 41

Slide 41 text

@edeandrea 🤘 Spring Boot 3 application contents: ○ 39,668 classes ○ 85,060 fields ○ 282,912 methods ○ Reflection: ○ 11,151 classes ○ 1,638 fields ○ 13,050 methods A Real Example

Slide 42

Slide 42 text

@edeandrea 🤘 Spring Boot 3 application contents: ○ 39,668 classes ○ 85,060 fields ○ 282,912 methods ○ Reflection: ○ 11,151 classes ○ 1,638 fields ○ 13,050 methods 🤘 Quarkus 3 application contents: ○ 23,974 classes ○ 47,662 fields ○ 191,219 methods ○ Reflection: ○ 6,820 classes ○ 205 fields ○ 5,945 methods A Real Example

Slide 43

Slide 43 text

@edeandrea 🤘 Spring Boot 3 application contents: ○ 39,668 classes ○ 85,060 fields ○ 282,912 methods ○ Reflection: ○ 11,151 classes ○ 1,638 fields ○ 13,050 methods 🤘 Quarkus 3 application contents: ○ 23,974 classes ○ 47,662 fields ○ 191,219 methods ○ Reflection: ○ 6,820 classes ○ 205 fields ○ 5,945 methods 🤘 The Quarkus application has: ○ 15,694 (40%) less classes ○ 37,398 (44%) less fields ○ 91,693 (32%) less methods ○ 4,331 (39%) less classes using reflection ○ 1,433 (87%) less fields using reflection ○ 7,105 (54%) less methods using reflection A Real Example

Slide 44

Slide 44 text

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

Slide 45

Slide 45 text

@edeandrea https://quarkus.io/blog/orange-telco-core-network-api-management-with-quarkus

Slide 46

Slide 46 text

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

Slide 47

Slide 47 text

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

Slide 48

Slide 48 text

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

Slide 49

Slide 49 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 50

Slide 50 text

@edeandrea

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

@edeandrea Thank You!