Return to Home Page

The public review of the manuscript for "SOA Design Patterns" has concluded !
Thank you to all that participated. 234 reviews were received and over 30 new patterns have been contributed,
increasing the size of this book by over 50%. The second draft of the manuscript is currently in development.

About the Public Review
    History
    Podcasts (audio)
    Notification
    Submit Feedback
    Contribute a Proven Pattern
    Contribute a Candidate Pattern
    Acknowledgements
    Press Release

Introduction to SOA Types & Design Patterns
    The Architecture of
Service-Orientation
    Understanding SOA
Design Patterns

SOA Design Patterns
    Basic Service Inventory Design Pattern Language
    Architectural Design Patterns
    Basic Service Design
Pattern Language
    Service Design Patterns
    Common Compound
Design Patterns

Additional Resources
    View Entire TOC
    Symbol Legend
    Master Pattern List
(by category)
    Candidate Design Patterns
    Design Patterns Publications
    Download SOA Principles Poster (PDF)

About the Book



SOA Design Patterns
by Thomas Erl

For more information visit: www.soapatterns.com

Related Publications


Read the article "Introducing SOA Design Patterns" from the
June 2008 SOA World Magazine (High-Res PDF).

PLEASE NOTE

The content on this page is from the first draft of the manuscript for the upcoming book "SOA Design Patterns" by Thomas Erl. This version of the manuscript was authored in September, 2007. Since then, the manuscript has undergone significant content and structural changes as a result of an industry-wide review in which hundreds of SOA practitioners participated in addition to SOA vendors and experts from the design patterns community.

You are welcome to use the information on this page for research purposes, but you should assume that most of it will change in the final release of the "SOA Design Patterns" book.

Note also, that as a result of an industry-wide call for participation from December 2007 to February 2008, over 30 new design patterns have been contributed to this book. As they become finalized and are incorporated by the author, concise descriptions will be published on this site, and full descriptions with examples will be made available in the final, printed book.

Due to the volume of new content and changes, the release of the "SOA Design Patterns" book has been postponed to October, 2008. To learn more about the book, visit www.soapatterns.com. To be notified of updates to this site, use the notification form.

Chapter 6: Architectural Design Patterns

Home > Chapter 6 Overview > Data Format Transformation
Data Format Transformation

Data Format Transformation

How can services interact with programs that communicate with different data formats?

Problem

A service may be incompatible with resources it needs to access due to data format disparity. Furthermore, a service consumer that communicates using a data format different from a target service will be incompatible and therefore unable to invoke the service.

Solution

Intermediary data format transformation logic needs to be introduced in order to dynamically translate one data format into another.

Application

Data format transformation can be incorporated by adding internal service logic, service agents, or a dedicated transformation service.

Impacts

The use of data format transformation logic inevitably adds development effort, design complexity, and performance overhead.

Principles

Standardized Service Contracts, Service Loose Coupling

Architecture

Inventory, Composition, Service

Table 6.7 – Profile summary for the Data Format Transformation pattern.

Problem

Services can be fundamentally incompatible with resources or programs that only support disparate data formats. For example, the service may have been standardized to send and receive XML-formatted data, but is required to also retrieve data from a legacy environment that only supports the CSV format (Figure 6.x).

Figure 6.33 – Three different services accustomed to processing XML formatted data need to access a legacy application API that only accepts CSV formatted data.

Solution

A layer of data format transformation logic is introduced. This logic is specifically designed to convert one or more data formats into one or more different data formats (Figure 6.x).

Figure 6.34 – A Format Conversion utility service is added to the architecture. This service abstracts the Legacy Application API and provides XML-to-CSV and CSV-to-XML functions. Note that in the depicted architecture, the Format Conversion service exists as component being reused by multiple components that are part of Web services (as per the Dual Protocols pattern).

Application

Data format transformation logic can exist within a services internal logic, within a service agent, or (as shown earlier in Figure 6.x) as a separate service altogether. Middleware with brokerage features will often provide out-of-the-box services and agents that perform a variety of data format conversions.

Furthermore, because the conversion of one data format to another will naturally transform the source data model, the application of this design pattern can be seen as also applying the Data Model Transformation pattern. However, as explained in the corresponding pattern profile, the Data Model Transformation pattern is most commonly used separately for the conversion of one formal data model to another when both source and destination formats are the same.

Impacts

As with any of the three design patterns associated with the parent Broker compound pattern, the introduction of a transformation layer for data format conversion will introduce the following impacts:

     An increase in solution development effort when the required transformation logic needs to be custom-programmed. However, custom development effort may not be necessary when using a middleware platform already equipped with the required conversion functionality.

     An increase in design complexity, as this pattern will introduce a new layer in an already distributed environment.

     An increase in performance requirements because the format conversion will need to be executed every time interaction between disparate format sources is required. This is especially a concern with the transformation of data formats because of the tendency to carry out bulk or batch format conversions.

These impacts are often considered natural requirements that come with introducing a service layer into an enterprise with legacy applications and resources.

Relationships

As shown in Figure 6.x, Data Format Transformation is commonly utilized to help integrate custom service logic with legacy systems, which makes it commonly required when applying the Legacy Wrapper pattern. The actual transformation logic may be the responsibility of a faade component that is tasked with converting proprietary to standardized formats, as per the Service Faade pattern.

When protocols are standardized using the Canonical Protocol pattern, data formats are usually common as well. This is because most communication protocols are associated with common data formats. For example the CSV format is often used with FTP and SCP protocols, and XML is primarily associated with HTTP. Therefore, when Data Format Transformation is required, it is often in conjunction with the Protocol Bridging pattern.

The service established by the Inventory Endpoint pattern may very well be required to carry out the conversion of data formats and the overall logic introduced by the Data Format Transformation pattern can be encapsulated by event-driven agents produced by the Service Agent pattern.

Figure 6.35 – The Data Format Transformation pattern is commonly employed to deal with traditional integration issues resulting from legacy encapsulation, which is why this pattern relates to Legacy Wrapper and other broker-related patterns..

Also worth noting is that this pattern represents one of the three core patterns that represent the Broker compound pattern. Because Broker is a also a core part of the Enterprise Service Bus compound pattern, ESB platforms are fully expected to support the conversion of different data formats.

Figure 6.36The Data Format Transformation pattern is one of three transformation-related design patterns that comprise the Broker and Enterprise Service Bus compound patterns.

Case Study Example

Case study content is not available on this Web site.

Prev | Next
The Prentice Hall Service-Oriented Computing Series from Thomas Erl
Home    SOA Books    SOA Magazine    What is SOA?    SOA Principles    SOA Methodology    SOA Glossary Copyright © 2007-2008
SOA Systems Inc.