$30 off During Our Annual Pro Sale. View Details »

DevNexus 2023 - Quarkus for Spring Developers

DevNexus 2023 - Quarkus for Spring Developers

What if you asked your operations team if they wanted run all the same Java workloads they are running today for half the cost? What do you think they'd say?

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. This session will be mostly live coding while minimizing the amount of slides. I will introduce an existing Spring application with a full test suite and build a Quarkus equivalent version of it, live.

I will demonstrate how easy Quarkus is to learn while also showing how Quarkus makes Java applications more efficient, both on the JVM and as a native binary.

Source code used in the demos can be found at https://github.com/edeandrea/quarkus-for-spring-devs-examples/tree/quarkus-for-spring-devs-talk-sb3/chapter-4/chapter-4-spring-data-jpa

Eric Deandrea

April 06, 2023
Tweet

More Decks by Eric Deandrea

Other Decks in Programming

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 after this talk! 2:45 PM today!
  2. @edeandrea Monolith J2SE / J2EE Java / Jakarta EE Cloud-Native

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

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

    Microservices Serverless Event-Driven Microservices Cloud-Native Spring Boot MicroProfile Java, The Enterprise Workhorse
  5. @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?
  6. @edeandrea Build Time Runtime @ 
 @ </> The Quarkus

    Way Runtime Build Time @ 
 @ </> Package 
 model Build Time Runtime @ 
 @ </>
  7. @edeandrea JVM Build Time @ 
 @ </> Package 


    model Native The Quarkus Way enables Native Compilation
  8. @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% Don’t Take My Word For It! Some real numbers (8 cores, 12GB RAM, GraalVM 22.3.r11)
  9. @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 after this talk! 2:45 PM today!