Java Reference
In-Depth Information
Determining a Data Ownership Scheme for Services
Problem
SOA presents a particular difficulty for determining ownership of data. A service must be
able to not only manage but to truly own the data that it represents, or chaos will ensue. But
an enterprise will frequently define services that must share common data such as customers,
products, and so forth. How can this be managed?
Solution
As you define your architecture, differentiate between services that ownobjects, and services
that referenceobjects owned by other services. Depending on the context, you may need to
use caching techniques or subscription patterns to handle updates to the data.
Every service must be self-sufficient and must be defined as being totally in control of its
own data. It is clearly preferable to never use data across business domains, as doing so can
destroy the loose coupling SOA attempts to achieve. In the real world, however, our business
domains sometimes do not match our data definitions as purely as we might like, especially
when we're dealing with large companies with lots of opportunities for legacy modernization.
You must make sure that a service only referencesdata from other domains so that only one
single domain is ever in control of a given business object.
Discussion
In your SOA, you have a CustomerDataService . This service represents the data for a funda-
mental aspect of your enterprise, and it can participate in many business processes or compos-
ite services. It will be used in a variety of contexts, including your Invoice service. Similarly,
an Employee data management service could be used within an HR process and a Payroll pro-
cess. Because service reuse is a chief aim of SOA and the reason it can realize significant ROI
(return on investment), it would appear that you are on the right track.
But the way you handle the referencing of data across these services presents a problem, one
that can become quite serious if not addressed clearly and decisively. The problem lies in data
ownership. Services must own the data that they manage. It is perfectly sensible that the Cus-
tomer service should be the ultimate decision maker and system-of-record or “gold copy” for
all customer data. But the Invoice service must refer to customer data as well. What if a cus-
tomer record needs to be updated, such as in the case of an address or phone number change?
Search WWH ::




Custom Search