Creating a reactive RESTful API
Spring Reactive is the Spring initiative that provides reactive programming features and capabilities that can be used in our Spring Boot applications. It is designed to support asynchronous and non-blocking programming. But what are asynchronous and non-blocking programming? To understand these concepts, it is better to start with the traditional model, the non-reactive programming model.
In a traditional model, when a Spring Boot application receives a request, a dedicated thread processes that request. If that request requires communicating with another service, such as a database, the processing thread is blocked until it receives a response from the other service. The number of available threads is limited, so if your application requires high concurrency but mostly waits for its dependent services to finish, this synchronous blocking model may have limitations.
In the reactive model, asynchronous and non-blocking programming reuses the threads...