In-Depth

Addressing SOA's Vulnerability

Get beyond the myths of service-oriented architecture. Learn how to leverage WCF to successfully implement SOA design patterns that can help deliver on the promises of SOA.

The question of whether service-oriented architecture (SOA) is more hype or essential gets quite a bit of coverage these days. It's a complex area that is getting more widespread attention across industries looking to make business processes more efficient, streamlined, and flexible. One aspect of software design that is becoming extremely important for the development community is the way in which services are built to deliver on the SOA promises of easier interoperability and integration.

Arguing that much of what was learned years ago from working with distributed object-oriented architectures has become today's antipatterns for trying to achieve the goals of SOAs, Rob Daigneau, director of architecture for Monster.com, told attendees at his VSLive! presentation, "Implementing SOA Design Patterns with WCF," that "WCF addresses the Achilles' heel of SOA."

And what is SOA's Achilles' heel? Daigneau said that essentially, it's the hype around its promises of business agility, high availability, and reusability. Daigneau's opening comments on SOA reinforced his published material at "Design Patterns for .Net" Web site that states the SOA architectural approach doesn't inherently ensure adaptability, productivity, efficiency, or reusability.

"Writing software is prone to error and very complex," Daigneau said. "It's not easy. We have the toolkits, but there is a lot to think about," and what is required is revolutionizing the manner in which developers architect solutions by giving thought to the complexities that are inherent in SOA to create software that delivers business requirements without breaking.

As Daigneau pointed out, developers have been hearing about reuse since the days of objects and before, and there are several good examples of business reuse in packaged applications from SAP, Siebel, and so on. However, in practice a lot of customization is required, and if service reuse is too generic, it might not be practical. High availability, Daigneau said, depends on the deployment architecture, and performance can be better optimized by co-locating services near consumers.

Daigneau assured his nearly standing-room only VSLive! audience that there are important benefits to SOA that warrant the discipline required to leverage Windows Communication Foundation (WCF) for architecting solutions in a new and different way. Among those benefits are separating concerns, independently evolving services and consumers, having smaller builds and memory footprints for applications, and emphasizing the need for IT governance.

Among the antipatterns that occur with today's approaches to design, Daigneau said, are services that are too much like objects and operations that appear to be the properties inherent in "chatty" interfaces. Also among this group are database table-oriented operations that expose database schemas and are tightly coupled to those schemas.

SOA Is All About the Contract
One way to employ best practices in services design, Daigneau said, is to think of services as gateways. Services, Daigneau said, are like conductors or mediators for business objects and are therefore "complementary." Instead of putting business logic in the services, he emphasized thinking of the service layer exclusively as the gateway to business logic and provide for the independent evolution of the service gateway from the logic and data.

To illustrate, Daigneau provided a slide of the service layer pattern. Daigneau pointed out that patterns for SOA can be thought of as a label for best practices for design solutions. One of the biggest challenges that developers face in architecting solutions is managing versioning, and Daigneau said that WCF provides the beginnings for addressing this challenge through the ability to version and extend message types. In defining data contracts, Daigneau expressed the advantages of message types that can be "amended" with new data types that emerge by adding them to the end of the messages. The messages can be used multiple times for different service operations, making them in effect "pluggable" and available for deferred processing.

Daigneau provided a simple but eloquent demo of a travel service application for retrieving and selecting flight and cost information to illustrate the way WCF can work with performance issues through different deployment mechanisms. As he moved through the different coding examples within the application he was able to show how the reusable data types served as the building blocks for the way in which the contracts are defined and exposed.

Daigneau capped his presentation by spending some time discussing versioning issues around strict or lax validation on the consumer and services side and multiple breaking changes that could influence minor releases versus major releases. He acknowledged that versioning isn't easy to manage and recommended avoiding deploying a major release for breaking changes, if possible. However, if that option isn't possible, then issue a major release by creating a new namespace and end point, deprecating older operations possibly, and distributing a new proxy.

Services, Daigneau said, are about how we manage objects for business, and leveraging the WCF can help developers create extensible, versioned, and easily maintainable services.

About the Author

Terrence O'Donnell is managing editor of Java Pro.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube