Question 3
The Client and Vendor services are agnostic services that are both currently part of multiple service compositions. As a result, these services are sometimes subjected to concurrent access by multiple service consumers.
The Client service is an entity service that primarily provides data access logic to a client database but also provides some calculation logic associated with determining a client's credit rating. The Vendor service is also an entity service that provides some data access logic but can also generate various dynamic reports.
After reviewing historical statistics about the runtime activity of the two services, it was discovered that the majority of concurrent runtime access is related to the processing of business rules. With the Client service, it is the calculation logic that is frequently required and with the Vendor service it is the dynamic reporting logic that needs to be accessed separately from the actual report generation.
Currently, due to the increasing amount of concurrent access by service consumers, the runtime performance of both the Client and Vendor services has worsened and has therefore reduced their effectiveness as service composition members. What steps can be taken to solve this problem without introducing new services?
The Rules Centralization pattern can be applied by extracting the business rule logic from the Client and Vendor services and placing it into a new Rules service. This will naturally improve the runtime performance of the Client and Vendor services because they will no longer be subjected to the high concurrent access of service consumers that require access to the business rules logic.
The Redundant Implementation pattern can be applied to the Client and Vendor services, thereby establishing duplicate implementations that can be accessed when a service reaches its runtime usage threshold. The Intermediate Routing pattern can be further applied to provide load balancing logic that can, at runtime, determine which of the redundant service implementations is the least busy for a given service consumer request.
The Rules Centralization pattern can be applied together with the Redundant Implementation pattern to establish a scalable Rules service that is redundantly implemented and therefore capable of supporting high concurrent access from many service consumers. The Service Abstraction principle can be further applied to hide the implementation details of the Rules service.
Correct answer: B