What is Branch or Branching design pattern?

 Today we will see what is an What is Branch or Branching Design Pattern is.

Previously we saw about What is Microservice? and the principles followed while developing MSA and the available design patterns. also, we saw the Shared database design pattern. 

Branch or Branching design pattern?

Branch Design pattern extends the Aggregator design pattern and allows us to perform simultaneous response to be processed from two likely mutual exclusive chained services .

This pattern also be called as different chain or Single chain based on the business needs. This design pattern is also known as Branching design pattern.

 

What is Branch or Branching design pattern?

Example:

Consider the client is booking the Cab. The Trip Service makes call to the Dispatcher service.

Dispatcher service then makes two calls to Passenger & Driver Service, Then these two service calls Notification service.

Business Flow starts like the Client books a Trip, Trip dispatches the request to driver and passenger, then Both Passenger and Driver are notified using the Notification service.

 

In the next article, we will see the CQRS (Command query responsibility segregator) design pattern.

LIKE | SHARE | SUBSCRIBE

WeCanCode-Author

WeCanCode-Author

November 23, 2021

Senior Developer | Java & C#.NET | 10++ years of IT experience.

Planning to learn ReactJS or Angular or Flutter.!

Please disable your adblocker or whitelist this site! We Provide Free content and in return, all we ask is to allow serving Ads.

Pin It on Pinterest

Share This
%d bloggers like this: