In this article I'd like to discuss asynchronous REST and approaches to implementing it.
Why do we need asynchronous REST? Simply put - answering the request takes too much time. While most requests usually can be satisfied immediately, some can't. The reasons are varied:
- You need to perform time-consuming calculations
- Performing action actually takes time (for example container creation)
The solution to these problems is asynchronous REST. Asynchronous REST works by separating request and real response. Here's an example, let's consider the following simple async REST broker: