Synchronous versus asynchronous communication

In the previous section, we saw how communication between microservices can be triggered. It can be one service controlling another service (orchestration), or a microservice raising its voice when it needs to talk to another microservice (choreography). One can choose any pattern there, but irrespective of what they have chosen, the other question is whether the trigger of communication should be synchronous or asynchronous. There are two other ways to look at how communication is done first: does your microservice want to collect data from other microservices by giving them conditions and waiting for a result? Secondly, they may want to broadcast a message, to tell every other microservice that it has done its part, to please take over from here, and start doing its own next task. In the upcoming section we will explore both of these methods.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset