Reactive Spring

More info: https://stackify.com/reactive-spring-5/

As of spring 5, spring WebFlux project offers an implementation of reactor project.

WebFlux can be used in spring boot applications via:
<artifactId>spring-boot-starter-webflux</artifactId>
instead of spring boot starter web, and uses Netty as non-blocking webserver.

"Writing a non-blocking, reactive HTTP Client with Spring WebFlux is a case of using the new WebClient class instead of the RestTemplate class. This class allows us to make a request to the server, and apply transformations and actions to the response when it eventually comes back, all without blocking any other operations in our code....
Conversely, we can write reactive controllers that will read data from the client and process it as it comes in...
In a traditional server, the data would be loaded entirely from the database to the server before any of it was sent back from the server to the client...
In a reactive server, the data will be passed to the client the instant it’s available from the server, and as it flows out of the server it will flow through our application and down to the client"

From: https://stackify.com/reactive-spring-5/

Comments