Chapter 5: Asynchronous API Design

So far, we have developed RESTful web services based on the traditional model, where calls are synchronous. What if you want to make code async and non-blocking? This is what we are going to do in this chapter. You'll learn about asynchronous API design in this chapter, where calls are asynchronous and non-blocking. We'll develop these APIs using Spring WebFlux, which is itself based on Project Reactor (https://projectreactor.io).

First, we'll walk through the Reactive programming fundamentals, and then we'll migrate the existing e-commerce REST API (which we learned about in Chapter 4, Writing Business Logic for APIs) to an asynchronous (Reactive) API to make things easier by co-relating and comparing the ...

Get Modern API Development with Spring and Spring Boot now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.