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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.