Service Consumer A sends a message with a business document to Service A (1), which
writes the business document to Database A (2). Service A then forwards the business
document to Service B (3), which writes the business document to Database B (4).
Service B then responds to Service A with a message containing a failure or success code
(5) after which Service A responds to Service Consumer A with a message containing a
failure or success code (6). Upon receiving the message, Service Consumer A updates a
log table in Database B (7). The log entry is comprised of the entire business document.
Database A is dedicated to the Service A service architecture and Database B is a shared
database.

You are told that the database updates performed by Service A and Service B must be
either both successful or they cannot happen at all. The database update performed by
Service Consumer A must happen after it is given the outcome of the database updates
performed by Service A and Service B . Given that Service Consumer A must also update
Database B as part of this service composition architecture, how is it possible to fulfill these
requirements?
Service A is an entity service that provides a Get capability that 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 happens 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?
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.

How can the application of the Orchestration pattern improve this architecture?
Service Consumer A sends a message to Service A.
There are currently three duplicate implementations of Service A (Implementation 1, Implementation 2, Implementation 3).
The message sent by Service Consumer A is intercepted by Service Agent A (1), which
determines at runtime which implementation of Service A to forward the message to.
All three implementations of Service A reside on the same physical server.

You are told that after Service A was deployed, each of its three implementations was
claimed by a different IT department, which means each implementation of Service A has a
different owner. You are informed that a new service capability will soon need to be added
to Service A . This service capability will introduce new business logic specific to Service A
as well as logic required to access a shared database. What steps can be taken to ensure
that the service owners will each add the service capability in a consistent manner to their
respective implementations of Service A?