Microservice communication
Like in the chained design pattern, the branch design pattern uses the synchronous communication model between microservices. However, some ways to perform synchronous communication can be exploited.
The first of these is synchronous communication using some protocol or direct message. This is the simplest way to apply synchronous communication between microservices. As an example of protocol, there is the famous HTTP, and as a direct message, we can use Remote Procedure Call (RPC). However, the branch design pattern has a peculiarity—the pattern works with both orchestration and data composition.
In terms of data composition, the use of protocols is quite simple and acceptable. Differently, when we speak of orchestration, we cannot treat it in the same way because the orchestration of data occurs within the same microservice. Having said that, internal communication within a microservice can be worked on in the following three ways:
- Sequential: No concurrency or...