MULESOFT-PLATFORM-ARCHITECT-I practice question 5 of 25

An eCommerce company is adding a new Product Details feature to their website, A customer will launch the product catalog page, a new Product Details…

Full set: 152 questions

Domain Architecting for Reuse

An eCommerce company is adding a new Product Details feature to their website, A customer will launch the product catalog page, a new Product Details link will appear by product where they can click to retrieve the product detail description. Product detail data is updated with product update releases, once or twice a year, Presently the database response time has been very slow due to high volume. What action retrieves the product details with the lowest response time, fault tolerant, and consistent data?
Answer options
A: Select the product details from a database in a Cache scope and return them within the API response
B: Select the product details from a database and put them in Anypoint MQ; the Anypoint MO subseriber will receive the product details and return them within the API response
C: Use an object store to store and retrieve the product details originally read from a database and return them within the API response Correct answer
D: Select the product details from a database and return them within the API response
Correct Answer:
C. Use an object store to store and retrieve the product details originally read from a database and return them within the API response
Explanation

The primary requirements are low response time, fault tolerance, and data consistency for infrequently updated data from a slow database. Using a shared Anypoint Object Store (OSv2) is the optimal solution. The product details can be loaded from the database into the Object Store once. Subsequent API requests can then retrieve this data directly from the high-performance Object Store, bypassing the slow database entirely. In a multi-worker environment like CloudHub, the Object Store is shared across all workers, ensuring data consistency and fault tolerance, as the cache is external to the individual Mule runtimes.

Why Incorrect

A. Select the product details from a database in a Cache scope and return them within the API response: The default Cache scope uses an in-memory store, which is not shared across workers in a multi-worker deployment. This leads to inconsistent caches and reduced fault tolerance.
B. Select the product details from a database and put them in Anypoint MQ; the Anypoint MQ subscriber will receive the product details and return them within the API response: Anypoint MQ is for asynchronous messaging. Using it for a synchronous request-response pattern like fetching product details would introduce significant latency and architectural complexity, failing the "lowest response time" requirement.
D. Select the product details from a database and return them within the API response: This approach directly queries the database for every request, which is the root cause of the performance problem ("database response time has been very slow") and does not solve the issue.

References

1. MuleSoft Documentation - Object Store Connector: "You can use Object Store to persist data for later use... A common use case is to use an object store as a cache." This document establishes the Object Store as a primary tool for caching. (MuleSoft Docs, "Object Store Connector", Use Cases section).

2. MuleSoft Documentation - Caching Strategies: "By default, a cache is an in-memory store that is not shared among the nodes in a cluster... To share a cache among the nodes in a cluster, you must configure a global caching strategy that references an Object Store." This highlights the limitation of the default Cache scope (Option A) and points to Object Store (Option C) for distributed, consistent caching. (MuleSoft Docs, "Cache Scope", Caching Strategies section).

3. MuleSoft Documentation - Object Store in CloudHub: "In CloudHub, Object Store v2 is always enabled and shared between all the workers of an application." This confirms that using an Object Store provides the required consistency and fault tolerance across a multi-worker application deployment. (MuleSoft Docs, "Use Object Store v2", CloudHub Applications section).

4. MuleSoft Documentation - Anypoint MQ: "Anypoint MQ is a multi-tenant, cloud messaging service that enables customers to perform advanced asynchronous messaging scenarios..." This defines MQ's purpose as asynchronous, making it unsuitable for the synchronous data retrieval required in the scenario. (MuleSoft Docs, "Anypoint MQ", Overview section).

Scroll to Top