Java Reference
In-Depth Information
Creating Canonical Data Model
Problem
You want to create a canonical data model for your SOA, as discussed in Woolf and Hohpe's
EnterpriseIntegrationPatterns(Addison-Wesley Professional), but you aren't sure how to
proceed.
Solution
Read the discussion below. You may choose not to do this. If you do choose to employ a ca-
nonical data model, you probably want to have a data architect create this up-front, following
a detailed analysis of your organization's data from a master data management perspective,
and before you have lots of services in place.
In short, your mileage may vary, but the solution is probably to define schemas local to ser-
vices that reuse a separate layer of schemas, defined independently of services, at the enter-
prise level.
Discussion
Creating a canonical data model can be tough. You can do everything else right, but if you
get this wrong, you will have painted yourself into a corner that can take considerable effort
and restructuring to get out of. I know of one software company with dozens of interacting
products that spent 10 months working on its schema definition of Product. Let's proceed with
caution.
Perform your schema analysis and design in a separate, prior process from your service ana-
lysis. Your services will exchange business documents, and these business documents will be
composed of cross-domain entities. For example, a variety of services across different busi-
ness domains will potentially need to use certain core types, such as Customer or Product or
Invoice. So far everything seems fine.
But on a practical level, this immediately drops the problem of schema reuse into your lap.
You have the following choices:
▪ Maximize reuse of types and eliminate redundant type definitions. Define your Customer
and Product and Invoice schemas using a schema pattern that allows for recomposition.
Write schemas to represent core or general types that might be used in many places, such
as Address, or SSN, or CreditCard. Write service-specific schemas that reuse those core
types. You have a perfect, pristine design. All you have to do now is cross your fingers that
Search WWH ::




Custom Search