Reactive Java REST APIs, FTW?
Matt Raible | @mraible
Photo by Lars Leber
https://www.instagram.com/p/C609JShLNY0
May 23, 2024
Slide 2
Slide 2 text
@mraible
Father, Husband, Skier, Mountain
Biker, Whitewater Rafter
Bus Lover
Web Developer and Java Champion
JHipster Project Co-Leader
Blogger on raibledesigns.com
Hi, I'm Matt Raible
Slide 3
Slide 3 text
@mraible
Slide 4
Slide 4 text
No content
Slide 5
Slide 5 text
@mraible
Slide 6
Slide 6 text
@mraible
Slide 7
Slide 7 text
@mraible
What is reactive programming?
Why Java?
Building Java REST APIs
Building with GraalVM
Containerizing with Docker
Performance
Community
Today's Agenda
https://unsplash.com/photos/JsTmUnHdVYQ
Slide 8
Slide 8 text
@mraible
The Reactive Manifesto
https://www.reactivemanifesto.org
FORM
MEANS
VALUE
Responsive
Maintainable Extensible
Resilient
Message Driven
Elastic
Published on September 16 2014. (v2.0)
Slide 9
Slide 9 text
@mraible
Is reactive programming better?
Slide 10
Slide 10 text
@mraible
Reactive Programming In
f
luencers
@_JamesWard @jboner @starbuxman
Slide 11
Slide 11 text
@mraible
Why Java?
25+ Years
of use, abuse, and improvements
Open Source
code is available; many popular open source
frameworks and tools
Hugely popular and widely used
by many enterprises and web-scale companies
Slide 12
Slide 12 text
@mraible
Get Started with Java 21
Download the Oracle builds of OpenJDK
https://jdk.java.net/archive
Or Eclipse builds from Adoptium
https://adoptium.net
Slide 13
Slide 13 text
@mraible
Use SDKMAN!
curl -s "https:
//
get.sdkman.io" | bash
sdk install java 21-open
Get Started with Java 21
@mraible
Imperative vs Reactive
Micronaut has no separate reactive web framework
Quarkus uses OIDC with reactive because MicroPro
f
ile is imperative
Spring Boot uses same code with different dependencies
Helidon has different dependencies and code
Slide 17
Slide 17 text
@mraible
Micronaut
gradle build
& &
java -jar build/libs/app-0.1-all.jar
Quarkus
gradle build
& &
java -jar build/quarkus-app/quarkus-run.jar
Spring Boot
gradle bootJar
&&
java -jar build/libs/spring-boot-0.0.1-SNAPSHOT.jar
Helidon
mvn package
&&
java -jar target/helidon.jar
Build and run on the JVM
Slide 18
Slide 18 text
@mraible
Build with GraalVM
https://www.graalvm.org
sdk install java 21.0.2-graalce