Aggregation Pattern

 

Aggregation pattern as the name suggest aggregate the data from different system and merge them before processing the response where response can be insertion e.g. Reporting or as Response e.g. HTTP response.

Within Organization you can different system to hold different data e.g. CRM for customer related information, ERP for order processing and shipment and Inventory for holding product information. At any time if I need a report to get all the orders for a particular week.

For this we can have two approaches

First – Get Customers, Orders and Product information to third system say Database and query the Database to get the required information. This has his own overhead where we have to get sync Database with all other systems and then maintaining the Database itself.

Aggregation Pattern

 

Second – we can get the required data from all different system– e.g. get the orders for last week from ERP and then respective Customer and Product information from CRM and Inventory system. Once we have all the data then we can merge the data to provide the required response.

 

MuleSoft API led approach in Aggregation

Pattern can be realized as per below

  • Experience API – To provide the interface to get the aggregate data and this will call process API
  • Process API – Will call the respective System API to get the required data. Once it has the required data from all the system then it can aggregate and return as response to experience API
  • System APIs – APIs for all different System from where we want to extract the data

 

Activity to use in MuleSoft application for aggregation – Scatter Gather can be used to call all different System APIs in parallel. More info on Scatter Gather

 

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments