SOA Pattern of the Week (#6): Canonical Schema

By Thomas Erl, SOASchool.com and Herbjörn Wilhelmsen, Objectware, SOAPatterns.org |  SOA, SOA pattern Add a new comment

Of all the patterns in the SOA design patterns catalog there is perhaps no other as simple to understand yet as difficult to apply in practice as Canonical Schema. There are also few patterns that spark as much debate. In fact, that application potential of Canonical Schema can become one of the fundamental influential factors that determine the scope and complexion of a service inventory architecture.

It all comes down to establishing baseline interoperability. The Canonical Schema pattern ensures that services are built with contracts capable of sharing business documents based on standardized data models (schemas). Unlike the well-known pattern Canonical Data Model (Hohpe, Woolf) which advocates that disparate applications be integrated to share data based on common data models, Canonical Schema requires that we build these common data models into our service contracts in advance. Hence, the successful application of this pattern almost always requires that we establish and consistently enforce design standards.

But before we discuss the standardization of data models and all of the enjoyable things that come with trying to make this happen, let’s first take a step back and describe what we mean by "baseline interoperability."

When services and service consumer programs interact, data is transmitted (usually in the form of messages) organized according to some structure and a set of rules. This structure and the associated rules constitute a formal representation (or model) of the data.

When different services are designed with different data models representing the same type of data, then they will have a problem sharing this data because the data models are simply incompatible. To address this problem, a technique called data model transformation is applied whereby data model mapping logic is developed so that data exchanged by such services is dynamically converted at runtime from compliance with one data model to another. So successful has this technique been that a corresponding Data Model Transformation pattern was developed.

However, with data model transformation comes consequences. And with the overuse of data model transformation comes real problems pertaining to architectural complexity, increased development effort, and runtime performance demands that can impact larger service compositions to such an extent that if you press your ear close enough to your middleware you can actually hear the churning and grinding of this extra runtime latency.

These and other details and issues will be discussed separately during an upcoming series article dedicated to the Data Model Transformation pattern. What's important for us to understand for now is that the primary goal of applying Canonical Schema is for us to avoid having to apply Data Model Transformation.

    Add a comment

    Post a comment using one of these accounts
    Or join now
    At least 6 characters

    Note: Comment will appear soon after you have activated your account.
    Obscene/spam comments will be removed and accounts suspended.
    The information you submit is subject to our Privacy Policy and Terms of Service.

    ITworld LIVE

    SOAWhite Papers & Webcasts

    White Paper

    Top Reasons to Implement an SOA Governance Strategy: A List for IT Executives

    Download this white paper, Top Reasons to Implement an SOA Governance Strategy: A List for IT Executives, for a guide to governance that will set you on the right path.

    White Paper

    Oracle SOA vs. IBM SOA - Customer Perspectives on Evaluating Complexity and Business Value

    With this white paper, Oracle SOA vs. IBM SOA, you'll get a healthy perspective on SOA and figure out which one is best for your organization.

    White Paper

    IDC MarketScape: Worldwide Business Process Platforms 2011 Vendor Analysis

    This IDC study uses the IDC MarketScape model to assess the capabilities of vendors to support midrange to complex process improvement scenarios using business process management software.

    See more White Papers | Webcasts

    Ask a question

    Ask a Question