Upgrade to Pro — share decks privately, control downloads, hide ads and more …

7-12-23 - [RivieraDev 2023] - Quarkus for Sprin...

7-12-23 - [RivieraDev 2023] - Quarkus for Spring Developers

Are you familiar with Spring and like learning new things?

In this session, I will show concepts and conventions familiar to Spring developers and how those same concepts and conventions can be implemented in Quarkus, all while highlighting similarities and differences between them. Additionally, I will show similarities and differences in how testing is done, highlighting Quarkus Dev Services and continuous testing.

This session will be mostly live coding while minimizing the number of slides. I will introduce an existing Spring application with a full test suite and build a Quarkus equivalent version of it, live. Content will come from my book, "Quarkus for Spring Developers." (https://red.ht/quarkus-spring-devs)

Eric Deandrea

July 12, 2023
Tweet

More Decks by Eric Deandrea

Other Decks in Technology

Transcript

  1. @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 Free copy (while they last)! Come see me at the Red Hat booth! 15:20 today!
  2. @edeandrea The Warmup Issue with Java Simon Ritter - Azul

    Systems - https://youtu.be/bWmuqh6wHgE (first 13 minutes)
  3. @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?
  4. @edeandrea JVM Build Time @ 
 @ </> Package 


    model Native The Quarkus Way enables Native Compilation
  5. @edeandrea JVM Quarkus Spring Boot Ratio (Quarkus / SB) Framework

    version 3.2.0.Final 3.1.1 Build time (s) 8.19 4.2 194.92% Av. RSS after startup (MB) 173.99 294.27 59.13% Av. time to 1st req (ms) 2,507 5,568 45.03% Av. RSS after 1st req (MB) 232.21 300.04 77.39% Av. throughput (req/sec) 28,032.95 7,090.84 395.34% Av. RSS for max throughput (MB) 418.09 470.98 88.77% Max throughput density (req/sec/ MB) 71.28 15.12 471.44% Native Quarkus Spring Boot Ratio (Quarkus / SB) Framework version 3.2.0.Final 3.11 Build time (s) 128.01 208.18 61.49% Av. RSS after startup (MB) 66.16 154.99 42.68% Av. time to 1st req (ms) 50 250.67 19.95% Av. RSS after 1st req (MB) 73.41 158.89 46.2% Av. throughput (req/sec) 16,969.29 6,382.53 265.87% Av. RSS for max throughput (MB) 343.23 430.8 79.67% Max throughput density (req/sec/ MB) 55.23 15.84 348.67% Don’t Take My Word For It! Some real numbers (8 cores, 12GB RAM, GraalVM 22.3.1.r17)
  6. @edeandrea 🤘 Compiling a Spring Boot 3 application: ◦ 37,764

    classes ◦ 79,957 fields ◦ 254,796 methods ◦ 1,656 classes, 732 fields, & 8,991 methods using reflection 🤘 Compiling a Quarkus 3 application: ◦ 22,673 classes ◦ 45,553 fields ◦ 182,093 methods ◦ 755 classes, 380 fields, & 4,205 methods using reflection 🤘 The Quarkus application has: ◦ 15,091 (39%) less classes ◦ 34,404 (43%) less fields ◦ 72,703 (29%) less methods ◦ 901 (55%) less classes using reflection ◦ 352 (48%) less fields using reflection ◦ 4,786 (53%) less methods using reflection A Real Example
  7. @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 Free copy (while they last)! Come see me at the Red Hat booth! 15:20 today!