Styles of collaboration

In the preceding section, we discussed two different modes of how services intercommunicate. These modes are nothing but styles of collaborations, which are as follows:

  • Request/response: In this case, the client sends a request and waits for the response from the server. This is an implementation of synchronous communication. But it is not true that request/response is only an implementation of synchronous communication; we can use it for asynchronous communication as well.

Let's consider an example to understand the concept. In Chapter 2, Implementing Microservices, we developed ProductService. This service has the GetProduct method, which is synchronous. The client has to wait for a response whenever it calls this ...

Get Building Microservices with .NET Core 2.0 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.