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

[dev2next] - Quarkus for Spring Developers

[dev2next] - Quarkus for Spring Developers

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, while showcasing similarities and differences between the two frameworks.

Eric Deandrea PRO

October 01, 2025

Transcript

40 slides
  1. @edeandrea Who’s on Stage Today? Eric Deandrea 🤘 26+ years

    software development experience 🤘 Java Champion 🤘 Contributor to Open Source projects • Quarkus • LangChain4j (& Quarkus LangChain4j) • Spring Boot, Spring Framework, Spring Security • Wiremock • Microcks 🤘 Boston Java Users ACM Chapter Vice Chair 🤘 Published author
  2. @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
  3. @edeandrea Java,The Enterprise Workhorse J2SE / J2EE Java / Jakarta

    EE Spring Boot MicroProfile Monolith Cloud-Native Microservices
  4. @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?
  5. @edeandrea JVM Build Time @ @ </> Package model Native

    The Quarkus Way enables Native Compilation
  6. @edeandrea What’s the Secret Sauce? 🤘Don’t be dynamic 🤘Dead code

    elimination / inlining Holly Cummins - https://youtu.be/vnrXXvnqriA
  7. @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
  8. @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
  9. @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
  10. @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.26.4 3.5.6 3.5.6 3.26.4 3.5.6 Build time (s) 8.87 5.29 167.63% 11.26 78.83% 136.04 211.78 64.25% Av. RSS after startup (MB) 195.97 270.92 72.33% 264.69 74.04% 73.23 163.05 44.91% Av. time to 1st req (ms) 3,240.67 5,559 58.3% 4,980 65.07% 216 243.67 88.65% Av. RSS after 1st req (MB) 255.34 312.32 81.75% 306.5 83.31% 82.09 165.29 49.66% Av. throughput (req/sec) 33,396.37 7,879.33 423.85% 7,931.99 421.03% 18,745.73 6,923.16 270.77% Max throughput density (req/sec/MB) 53.99 12.58 429.12% 13.63 396.02% 71.83 18.16 395.51% Build RSS (GB) 5.46 8.12 67.24% Binary Size (MB) 95.55 158.26 60.38% Don’t Take My Word For It! Some real numbers (8 cores, 14GB RAM, GraalVM CE 21.0.2)
  11. @edeandrea 🤘 Spring Boot 3 application contents: ◦ 39,971 classes

    ◦ 85,594 fields ◦ 284,561 methods ◦ Reflection: ◦ 11,211 classes ◦ 2,132 fields ◦ 13,154 methods 🤘 Quarkus 3 application contents: ◦ 25,454 classes ◦ 49,205 fields ◦ 201,210 methods ◦ Reflection: ◦ 7,353 classes ◦ 359 fields ◦ 6,338 methods 🤘 The Quarkus application has: ◦ 14,517 (36%) less classes ◦ 36,389 (42%) less fields ◦ 83,351 (29%) less methods ◦ 3,858 (34%) less classes using reflection ◦ 1,773 (83%) less fields using reflection ◦ 6,816 (52%) less methods using reflection A Real Example
  12. @edeandrea But I Already Know Spring… 🤘Can I do reactive/imperative/blocking?

    🤘What if there isn’t an extension for my library? 🤘Can I reuse my existing Spring code? 🤘GraalVM native compilation takes time & memory… 🤘What if I have my own framework on “top”? 🤘How do I migrate?

More Decks by Eric Deandrea

Other Decks in Technology