Request-response pattern

We will start with the simplest design pattern, the request-response pattern, which addresses the responsiveness pillar of reactive programming. This is one of the core patterns that we use in almost every application. It is our service that takes a request and returns a response. A lot of other patterns are directly or indirectly dependent on this, so it is worth spending a few minutes to understand this pattern.

The following diagram shows a simple request-response communication:

There are two parties to a request-response relationship. One entity makes a request and the second entity fulfills the request. A requester ...

Get Design Patterns and Best Practices in Java 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.