S90-09A · Question #5
Service A is a utility service that provides generic data access logic to a database that contains data that is periodically replicated from a shared database (1). Because the Standardized Service…
The correct answer is A. The Contract Centralization pattern can be applied to force all service consumers to access the. Option A is correct because the Contract Centralization pattern mandates that all service consumers must access a service exclusively through its official service contract - not through implementation internals. Since Consumer A bypasses the contract by invoking an internal…
Question
Service A is a utility service that provides generic data access logic to a database that contains data that is periodically replicated from a shared database (1). Because the Standardized Service Contract principle was applied to the design of Service A, its service contract has been fully standardized. The service architecture of Service A is being accessed by three service consumers. Service Consumer A accesses a component that is part of the Service A implementation by invoking it directly (2). Service Consumer B invokes Service A by accessing its service contract (3). Service Consumer C directly accesses the replicated database that is part of the Service A implementation (4). You've been told that the shared database will soon be replaced with a new database product that will have new data models and new replication technology. How can the Service A architecture be changed to avoid negative impacts that may result from the replacement of the database and to establish a service architecture in which negative forms of coupling can be avoided in the future?
Exhibit
Options
- AThe Contract Centralization pattern can be applied to force all service consumers to access the
- BThe Contract Centralization pattern can be applied to force Service Consumer C to access the
- CThe Standardized Service Contract principle can be applied to force Service Consumer B to
- DNone of the above.
How the community answered
(49 responses)- A78% (38)
- B6% (3)
- C12% (6)
- D4% (2)
Explanation
Option A is correct because the Contract Centralization pattern mandates that all service consumers must access a service exclusively through its official service contract - not through implementation internals. Since Consumer A bypasses the contract by invoking an internal implementation component directly (2), and Consumer C bypasses it by directly querying the replicated database (4), both create tight implementation coupling. When the database is replaced with new data models and replication technology, only Service A's internal implementation would need to change - but only if all consumers are shielded behind the contract.
Option B is wrong because it only addresses Consumer C's direct database access, ignoring Consumer A's equally problematic direct component access. Fixing only one source of coupling leaves the architecture still vulnerable.
Option C is wrong because Consumer B is already doing things correctly - it accesses Service A through the service contract, exactly as intended. The Standardized Service Contract principle was already applied to Service A's design; there is nothing to "fix" with Consumer B.
Option D is wrong because Option A fully solves the problem described.
Memory tip: "Contract Centralization = one door in, no back doors." If any consumer is sneaking in through a side entrance (internal components or direct DB access), Contract Centralization slams those shut and funnels everyone through the front door (the service contract).
Topics
Community Discussion
No community discussion yet for this question.
