QuestionQ11

VerifiedDesigning integration solutions to meet performance requirements

A bank is building a REST API in a Mule application that receives an array of accounts from an online banking platform user interface (UI), obtains the balances for those accounts from a backend Finance system, and returns the account balances for display in the online banking platform UI. During processing, the MuleSoft API must also insert the retrieved account data into an Audit Database for auditing; the auditing process must not add latency to the account-balance retrieval response sent back to the online banking platform UI.

The retrieveBalances flow in the Mule application is designed to use an operation in a connector to the Finance system (the Finance operation) that can look up only one account record at a time, and an operation from another connector to the Audit system (the Audit operation) that can insert only one account record at a time.

To best satisfy the performance-related requirements, which scope or scopes should be used, and how should they be used to incorporate the Finance operation and Audit operation into the retrieveBalances flow?

Explanation

A Parallel For-Each scope splits the account collection so each single-record Finance lookup can run concurrently, then aggregates the results for the balance response. An Async scope processes the audit insertion independently of the main flow, so its completion is not required before the UI response is returned.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!