Refer to Exhibit.
Service Consumer A sends a message to Service A (1), which then forwards the message to Service B (2). Service B forwards the message to Service C (3), which finally forwards the message to Service D (4). However, Services A, B and C each contain logic that reads the contents of the message to determine what intermediate processing to perform and which service to forward the message to. As a result, what is shown in the diagram is only one of several possible runtime scenarios.
Currently, this service composition architecture is performing adequately, despite the number of services that can be involved in the transmission of one message. However, you are told that new logic is being added to Service A that will require it to compose one other service to retrieve new data at runtime that Service A will need access to in order to determine where to forward the message to. The involvement of the additional service will make the service composition too large and slow.
What steps can be taken to improve the service composition architecture while still accommodating the new requirements and avoiding an increase in the amount of service composition members?
Answer : D
This solution addresses the issue of the service composition becoming too large and slow by introducing a new Routing service that is invoked by messages read from a messaging queue. This allows Service A and Service C to determine where to forward messages to at runtime without the need for additional services in the composition. The Service Loose Coupling principle is applied to ensure that the new Routing service remains decoupled from other services so that it can perform its routing functions independently from service contract invocation.
Refer to Exhibit.
Service A is a task service that sends Service B a message (2) requesting that Service B return data back to Service A in a response message (3). Depending on the response received, Service A may be required to send a message to Service C (4) for which it requires no response.
Before it contacts Service B, Service A must first retrieve a list of code values from its own database (1) and then place this data into its own memory. If it turns out that it must send a message to Service C, then Service A must combine the data it receives from Service B with the data from the code value list in order to create the message it sends to Service C. If Service A is not required to invoke Service C, it can complete its task by discarding the code values.
Service A and Service C reside in Service Inventory
Answer : B
The problem is that Service A and Service B are using different technologies and cannot communicate. Therefore, an intermediate processing layer can be established that can transform messages from one data format to another at runtime. This can be achieved using the Data Format Transformation pattern.
Additionally, Service C frequently reaches its usage thresholds and is not always available, so an Asynchronous Queuing pattern can be applied to establish an intermediate queue between Service A and Service C. This queue will store the messages sent by Service A to Service C and retransmit them until they are successfully delivered. This approach improves the reliability of the system.
Moreover, the Redundant Implementation pattern can be applied to Service C to ensure its availability and scalability, and the Service Autonomy principle can be applied to make Service C independent of other services.
Refer to Exhibit.
Service A is a SOAP-based Web service with a functional context dedicated to invoice-related processing. Service B is a REST-based utility service that provides generic data access to a database.
In this service composition architecture, Service Consumer A sends a SOAP message containing an invoice XML document to Service A (1). Service A then sends the invoice XML document to Service B (2), which then writes the invoice document to a database (3).
The data model used by Service Consumer A to represent the invoice document is based on XML Schema
Answer : A, A
The recommended solution is to use the Data Model Transformation pattern to transform the invoice XML document from Schema B to Schema A before passing it to Service B. This solution maintains the separation of concerns and allows each service to work with its own specific XML schema. Additionally, the Standardized Service Contract principle should be applied to Service B and Service Consumer A to ensure that unnecessary validation is avoided, thus optimizing the invoice XML document. This solution avoids adding logic that will increase the runtime performance requirements.
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.
Service Consumer A sends a message to Service
Answer : B
By separating the individual implementations of Service A onto different physical servers, they can be isolated from each other and from other clients and applications in the IT enterprise, which can help improve performance. Additionally, using the Service Data Replication pattern to give each implementation of Service A its own copy of the data it requires from the shared database can help reduce the load on the shared database and improve performance. This can be especially important when a new service capability is added that requires access to the shared database, as it can help ensure that the performance of Service A is not impacted by the additional demands placed on the shared database.
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.