質問 1: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).
Services A, B, and C each contain logic that reads the content of the message and, based
on this content, determines which service to forward the message to. As a result, what is
shown in the Figure is one of several possible runtime scenarios.

You are told that the current service composition architecture is having performance
problems because of two specific reasons. First, too many services need to be explicitly
invoked in order for the message to arrive at its destination. Secondly, because each of the
intermediary services is required to read the entire message contents in order to determine
where to forward the message to, it is taking too long for the overall task to complete. What
steps can be taken to solve these problems without sacrificing any of the functionality that
currently exists?
A. The Intermediate Routing pattern can be applied together with the Service Agent pattern
in order to establish a set of service agents capable of intercepting and forwarding the
message based on pre-defined routing logic. To avoid the need for service agents to read
the entire message contents, the Rules Centralization pattern can be applied so that
content relevant to the routing logic is isolated into a separate Rules service. This way,
service agents are only required to access the Rules service in order to determine where to
forward messages to. The Standardized Service Contract principle will need to be applied
to ensure that the new Rules service and the new service agents provide service contracts
that are compliant to existing design standards.
B. The Intermediate Routing pattern can be applied together with the Service Agent pattern
in order to establish a set of service agents capable of intercepting and forwarding the
message based on pre-defined routing logic. To avoid the need for service agents to read
the entire message contents, the Messaging Metadata pattern can be applied so that
content relevant to the routing logic is placed in the header of a message. This way, only
the message header content needs to be read by the service agents.
C. The Intermediate Routing pattern can be applied together with the Service Agent pattern
in order to establish a set of service agents capable of intercepting and forwarding the
message based on pre-defined routing logic. The Service Discoverability principle can be
applied to improve the communications quality of message contents, which will reduce the
time required by service agents to read the message contents at runtime.
D. None of the above.
正解:B
質問 2: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, each of which provides standardized data access
capabilities.
Service A sends its first update request message to Service B (1), which then responds
with a message containing 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
a success or failure code (4). Finally, Service A sends a request message to Service D (5),
which responds with its own message containing a success or failure code (6).

You've been given a requirement that all database updates must either be completed
successfully or not at all. This means that if any of the three response messages received
by Service A contain a failure code, all of the updates carried out until that point must be
reversed. Note that if Service A does not receive a response message back from Services
B, C, or D, it must assume that a failure has occurred. How can this service composition
architecture be changed to fulfill these requirements?
A. The Atomic Service Transaction pattern can be applied individually to Services B, C,
and D so that each of these services performs its own database update within the scope of
an atomic transaction. If anyone update fails, that change can be rolled back on that
database. Furthermore, the Service Loose Coupling principle can be applied to ensure that
Service A is kept out of the scope of the atomic transaction so that it is not negatively
coupled to the proprietary database technologies that are required to enable the atomic
transaction functionality.
B. The Compensating Service Transaction can be applied to Service A so that when any
one response message containing a failure code is received by Service A, it can invoke
exception handling logic that will log the failed database updates. The Service Loose
Coupling principle can be further applied to ensure that Services B, C, or D are not
indirectly coupled to the exception handling logic, especially if Service A requires additional
access to Services B, C, or D in order to collect more information for logging purposes.
C. The Reliable Messaging pattern can be applied to guarantee the delivery of positive or
negative acknowledgements. This way, Service A will always be informed of whether a
failure condition has occurred with any of the database updates performed by Services B,
C, and D.
Furthermore, the Service Loose Coupling principle can be applied to ensure that
the request and response messages exchanged by the services do not contain any
implementation details that would indirectly couple Service A to any of the databases.
D. None of the above.
正解:D
質問 3: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 these three services reveals that each contains some agnostic logic, but
because it is bundled together with the non-agnostic logic, the agnostic logic cannot be
made available for reuse.
The assessment also determines that because Service A and 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.

You are asked to redesign this architecture in order to increase the opportunity for agnostic
service logic to be reused and in order to decrease the runtime processing demands so
that performance can be improved. What steps can be taken to achieve these goals?
A. None of the above.
B. The Process Abstraction pattern can be applied, resulting in a redesign effort where
agnostic logic is removed from the three task services so that they only encapsulate non-
agnostic logic. The agnostic logic is then moved to one or more new agnostic services that
are shaped into reusable services by the application of the Service Reusability principle.
The Orchestration pattern can be further applied to establish an environment whereby the
Process Centralization pattern is naturally applied to Services A and B and the State
Repository pattern in naturally applied to further help avoid remote communication by
providing a local and centralized state database that can be shared by both services.
C. The Process Centralization pattern can be applied, resulting in a redesign effort where
agnostic logic is removed from the three task services so that they only encapsulate non-
agnostic logic. The agnostic logic is then moved to one or more new agnostic services that
are shaped into reusable services by the application of the Service Reusability principle.
The Process Abstraction pattern is then applied to the redesigned task services Service A
and Service B, so that their logic is physically centralized, turning them into orchestrated
task services.
D. The Enterprise Service Bus pattern can be applied to establish an environment whereby
the Process Abstraction and Process Centralization patterns are naturally applied, resulting
in a clean separation of non-agnostic task services from newly designed agnostic services
that are further shaped into reusable services by the application of the Service Reusability
principle.
正解:B
質問 4:Service A is an entity service with a functional context dedicated to invoice-related
processing. Service B is a 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.
The data model used by Service Consumer A to represent the invoice document is based
on XML Schema A.
The service contract of Service A is designed to accept invoice documents based on XML Schema B.
The service contract for Service B is designed to accept invoice documents based on XML Schema A.
The database to which Service B needs to write the invoice record only accepts entire business documents in Comma
Separated Value (CSV) format.

Due to the incompatibility of XML schemas used by the services, the sending of the invoice
document from Service Consumer A through to Service B cannot be accomplished using
the services as they currently exist. Assuming that the Contract Centralization and Logic
Centralization patterns are being applied, what steps can be taken to enable the sending of
the invoice document from Service Consumer A to the database without adding logic that
will increase the runtime performance of the service composition?
A. The Data Model Transformation pattern can be applied so that the invoice document
sent by Service Consumer A is transformed into an invoice document that is compliant with
the XML Schema B used by Service A . The Data Model Transformation pattern can be
applied again to ensure that the invoice document sent by Service A is compliant with XML
Schema A used by Service B.
B. The Standardized Service Contract principle can be applied to the service contract of
Service A so that it is redesigned to use XML Schema A.
This would make it capable ofreceiving the invoice document from Service Consumer A and sending the invoice
document to Service B without the need to further apply the Data Model Transformation pattern.
C. The service composition can be redesigned so that Service Consumer A sends the
invoice document directly to Service B.
Because Service Consumer A and Service B use
XML Schema A, the need for transformation logic is avoided. This naturally applies the
Service Loose Coupling principle because Service Consumer A is not required to send the
invoice document in a format that is compliant with the database used by Service B.
D. None of the above.
正解:B