Asynchronous communication
In asynchronous communication, the caller does not wait for a response from the backend server. Instead, it sends the request to the backend server and continues to execute the program. In some cases, we cater an acknowledgement (ACK) to indicate that the message was delivered. The backend server handles those requests asynchronously and performs a task. Having a series of synchronous calls for microservices is usually not a good practice since if one of the services breaks, the entire series of transactions will fail and need to be rolled back. Usually, services in a microservice architecture should be stateless, responsive, and small in size as much as possible. Asynchronous communication methods help you to create stateless applications that are reliable and fast. In this section, we will discuss different types of asynchronous communication protocols and how the Ballerina language supports these.
Asynchronous communication over microservices
When...