/reactive-io

Reactive I/O Live Coding Presentation

Primary LanguageJava

Reactive I/O

Example of two end-to-end reactive, backpressure aware web applications utilising 3 modern reactive streams oriented drivers and I/O connectors:

The application streams integers from mongo, to an RSocket server which in turn sums them and streams them back via an RSocket channel to the Spring Boot WebFlux application which in turn streams them back to the client requester via JSON streaming.

All of this happens with single request backpressure with 1 second delay on the RSocket server.

Running

Run the Spring Boot (WebFlux) web application with:

mvn spring-boot:run

and startup the RSocket server implementation with:

mvn exec:java -Dexec.mainClass="reactive.demo.Client"

Request the streaming endpoint with:

curl localhost:8080/sum