Introduction to synchronous communication
In this section, we are going to cover the basics of synchronous communication and introduce you to some additional benefits of Protocol Buffers that we are going to use for our microservices.
Synchronous communication is the way of interaction between network applications, such as microservices, in which services exchange data using a request-response model. The process is illustrated in the following diagram:
Figure 5.1 – Synchronous communication
There are many protocols allowing applications to communicate in this way. HTTP is among the most popular protocols for synchronous communication. In Chapter 2, we already implemented the logic for calling and handling HTTP requests in our microservices.
The HTTP protocol allows you to send request and response data in different ways:
- URL parameters: In the case of the
https://www.google.com/search?q=portugal
URL,q=portugal
is a URL parameter.
...