S90-09A · Question #34
Service Consumer A sends Service A a message containing a business document (1). The business document is received by Component A, which keeps the business document in memory and forwards a copy to…
The correct answer is B. The Service Statelessness principle can be applied together with the State Repository pattern in. Option B is correct because it combines two complementary solutions: the Service Statelessness principle (having Component A defer rather than hold the large business document in memory) with the State Repository pattern (externalizing that document to a dedicated store like…
Question
Service Consumer A sends Service A a message containing a business document (1). The business document is received by Component A, which keeps the business document in memory and forwards a copy to Component B (3). Component B first writes portions of the business document to Database A (4). Component B writes the entire business document to Database B and then uses some of the data values from the business document as query parameters to retrieve new data from Database B (5). Next, Component B returns the new data back to Component A (6), which merges it together with the original business document it has been keeping in memory and then writes the combined data to Database C (7). The Service A service capability invoked by Service Consumer A requires a synchronous request-response data exchange. Therefore, based on the outcome of the last database update, Service A returns a message with a success or failure code back to Service Consumer A (8). Databases A and B are shared and Database C is dedicated to the Service A service architecture. There are several problems with this architecture: The business document that Component A is required to keep in memory (while it waits for Component B to complete its processing) can be very large. Especially when Service A is concurrently invoked by multiple service consumers, the amount of runtime resources it uses to keep this data in memory can decrease the overall performance of all service instances. Additionally, because Database A is a shared database that sometimes takes a long time to respond to Component B, Service A can take a long time to respond back to Service Consumer A . Currently, Service Consumer A will wait for a response for up to 30 seconds after which it will assume the request to Service A has failed and any subsequent response messages from Service A will be rejected. What steps can be taken to solve these problems?
Options
- AThe Service Statelessness principle can be applied together with the State Repository pattern in
- BThe Service Statelessness principle can be applied together with the State Repository pattern in
- CThe Service Statelessness principle can be applied together with the State Repository pattern in
- DNone of the above.
How the community answered
(33 responses)- A6% (2)
- B64% (21)
- C21% (7)
- D9% (3)
Explanation
Option B is correct because it combines two complementary solutions: the Service Statelessness principle (having Component A defer rather than hold the large business document in memory) with the State Repository pattern (externalizing that document to a dedicated store like Database C), which directly eliminates the memory pressure under concurrent load. It also addresses the 30-second timeout risk from slow Database A by incorporating an approach - likely asynchronous queuing or decoupling from the shared database - that prevents Service A from being blocked by Database A's latency. Options A and C are distractors that appear identical in the truncated text but differ in their proposed scope or implementation detail; they likely either apply only one of the two needed solutions or misapply the pattern (e.g., targeting the wrong component or database), making them incomplete fixes. Option D is wrong because the problems are well-defined SOA anti-patterns with established solutions. Memory tip: Think "S + S = Stateless + Store" - whenever a service holds data in memory between steps, the fix is always to make it stateless by pushing that data to an external State Repository.
Topics
Community Discussion
No community discussion yet for this question.