Refer to Exhibit.
Service A, Service B, and Service C are entity services, each designed to access the same shared legacy system. Service A manages order entities, Service B manages invoice entities, and Service C manages customer entities. Service A, Service B, and Service C are REST services and are frequently reused by different service compositions. The legacy system uses a proprietary file format that Services A, B, and C need to convert to and from.
You are told that compositions involving Service A, Service B, and Service C are unnecessarily complicated due to the fact that order, invoice, and customer entitles are all related to each other. For example, an order has a customer, an invoice has an order, and so on. This results In calls to multiple services to reconstruct a complete order document. You are asked to architect a solution that will simplify the composition logic by minimizing the number of services required to support simple business functions like order management or bill payment. Additionally, you are asked to reduce the amount of redundant data transformation logic that is found in Services A, B, and C.
How will you accomplish these goals?
Answer : B
The Lightweight Endpoint pattern can be applied to establish lightweight capabilities that can return related entity data directly to service consumers, simplifying the composition logic by minimizing the number of services required to support simple business functions like order management or bill payment. This approach provides a standardized and simplified interface for the legacy system, reducing the complexity of the integration process with the entity services, and enabling them to focus on their core functionality.
Refer to Exhibit.
Services A, B, and C are non-agnostic task services. Service A and Service B use the same shared state database to defer their state data at runtime.
An assessment of the three services reveals that each contains some agnostic logic that cannot be made available for reuse because it is bundled together with non-agnostic logic.
The assessment also determines that because Service A, Service B and the shared state database are each located in physically separate environments, the remote communication required for Service A and Service B to interact with the shared state database is causing an unreasonable decrease in runtime performance.
How can the application of the Orchestration pattern improve this architecture?
Answer : B
The application of the Orchestration pattern can improve this architecture by cleanly separating the non-agnostic logic from the agnostic logic, allowing the design of new agnostic services with reuse potential. The State Repository pattern, which is supported by and local to the orchestration environment, provides a central state database that can be shared by Services A and B. The local state database avoids problems with remote communication. Additionally, the Orchestration pattern provides a central controller that can coordinate the interactions between Services A, B, and C, reducing the need for remote communication between services and improving runtime performance.
Refer to Exhibit.
Service A is a task service that is required to carry out a series of updates to a set of databases in order to complete a task. To perform the database updates. Service A must interact with three other services that each provides standardized data access capabilities.
Service A sends its first update request message to Service B (1), which then responds with a message containing either a success or failure code (2). Service A then sends its second update request message to Service C (3), which also responds with a message containing either a success or failure code (4). Finally, Service A sends a request message to Service D (5), which responds with its own message containing either a success or failure code (6).
Services B, C and D are agnostic services that are reused and shared by multiple service consumers. This has caused unacceptable performance degradation for the service consumers of Service A as it is taking too long to complete its overall task. You've been asked to enhance the service composition architecture so that Service A provides consistent and predictable runtime performance. You are furthermore notified that a new type of data will be introduced to all three databases. It is important that this data is exchanged in a standardized manner so that the data model used for the data in inter-service messages is the same.
What steps can be taken to fulfill these requirements?
Answer : B
This approach isolates the services used by Service A, allowing it to avoid the performance degradation caused by multiple service consumers. By creating redundant implementations of Services B, C, and D that are accessed only by Service A, the Composition Autonomy pattern also ensures that Service A's runtime performance is consistent and predictable. Applying the Canonical Schema pattern ensures that the new type of data is exchanged in a standardized manner, ensuring consistent representation of the data model used for the data in inter-service messages.
Refer to Exhibit.
Service A is a utility service that provides generic data access logic to a database containing 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 reason Service Consumers A and C bypass the published Service A service contract is because, for security reasons, they are not allowed to access a subset of the capabilities in the API that comprises the Service A service contract. How can the Service A architecture be changed to enforce these security restrictions while avoiding negative forms of coupling?
Answer : C
The Contract Centralization pattern can be applied to force service consumers to access the Service A architecture via its published service contract only. The Service Loose Coupling principle can then be applied to ensure that the centralized service contract does not contain any content that is dependent on or derived from the underlying service implementation. This will enforce the security restrictions while avoiding negative forms of coupling. By ensuring loose coupling, changes to the implementation of Service A will not require changes to its published service contract, making it easier to maintain and evolve the service.
Refer to Exhibit.
Service A is an entity service that provides a Get capability which returns a data value that is frequently changed.
Service Consumer A invokes Service A in order to request this data value (1). For Service A to carry out this request, it must invoke Service B (2), a utility service that interacts (3, 4) with the database in which the data value is stored. Regardless of whether the data value changed, Service B returns the latest value to Service A (5), and Service A returns the latest value to Service Consumer A (6).
The data value is changed when the legacy client program updates the database (7). When this change will occur is not predictable. Note also that Service A and Service B are not always available at the same time.
Any time the data value changes, Service Consumer A needs to receive It as soon as possible. Therefore, Service Consumer A initiates the message exchange shown In the figure several times a day. When it receives the same data value as before, the response from Service A Is ignored. When Service A provides an updated data value, Service Consumer A can process it to carry out its task.
The current service composition architecture is using up too many resources due to the repeated invocation of Service A by Service Consumer A and the resulting message exchanges that occur with each invocation.
What steps can be taken to solve this problem?
Answer : A
This solution is the most appropriate one among the options presented. By using the Event-Driven Messaging pattern, Service A can be notified of changes to the data value without having to be invoked repeatedly by Service Consumer A, which reduces the resources required for message exchange. Asynchronous Queuing ensures that the event notification message is not lost due to the unavailability of Service A or Service B. This approach improves the efficiency of the service composition architecture.
Refer to Exhibit.
Service Consumer A and Service A reside in Service Inventory
Answer : D
The Asynchronous Queuing pattern is applied to position a messaging queue between Service A, Service B, Service C, Service D, and Service Consumer A. This ensures that messages can be passed between these services without having to be in a stateful mode.
The Data Model Transformation and Protocol Bridging patterns are applied to enable communication between Service A and Service B, Service A and Service C, and Service A and Service D, despite their different data models and transport protocols.
The Redundant Implementation pattern is applied to bring a copy of Service D in-house to ensure that it can be accessed locally and reduce the unpredictability of its performance.
The Legacy Wrapper pattern is applied to wrap Service D with a standardized service contract that complies with the design standards used in Service Inventory B. This is useful for service consumers who want to use Service D but do not want to change their existing applications or service contracts.
Overall, this approach provides a comprehensive solution that addresses the issues with Service A, Service B, Service C, and Service D, while maintaining compliance with the Service Abstraction principle.
Refer to Exhibit.
When Service A receives a message from Service Consumer A (1), the message is processed by Component
Answer : B