Patterns for responsiveness
Responsiveness means how interactive the application is. Does it interact with its users in a timely manner? Does clicking a button do what it is supposed to do? Does the interface get updated when it is meant to? The idea is that the application should not make the user wait unnecessarily and should provide immediate feedback.
Let's look at some of the core patterns that help us implement responsiveness in an application.
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...