Microservices Expo Authors: Elizabeth White, Pat Romanski, Dalibor Siroky, Scott Davis, Stackify Blog

Related Topics: Microservices Expo

Microservices Expo: Article

Learning from SOA Mistakes

A guide to SOA anti-patterns - how to benefit from known unworkable solutions

Today, global businesses are increasingly turning to Service Oriented Architecture (SOA) for their information technology infrastructure and applications. SOA is becoming an increasingly practiced approach to building software solutions as it can support integration and consolidation of activities in complex enterprise systems.

This year the percentage of functioning SOAs has almost doubled, according to Evans Data Corporation's latest Web Services development survey: "Twenty-four percent of respondents (the sample data set being 400) are saying they currently implement SOA, an 85% increase from last year." The survey also shows that Web Services are now experiencing more comprehensive implementation, with 30% of respondents predicting they will be using more than 20 services in the next year - a 58% increase from current levels. Twenty-five percent of respondents also said the leading problem in implementing Web Services are changing or lack of industry standards, a 67% increase from last year. A July 2006 article in SDA Asia Magazine reported that "The awareness of service-oriented architecture benefit as an IT enabler is now extensive. There is a growing and widespread acceptance of SOA technology, especially in large enterprises." And according to a recent Aberdeen Group survey, at least 90% of companies are on their way to adopting SOA today."

Despite these reports, SOA is still a relatively new approach, which many businesses are deploying for the first time. How can they avoid the pitfalls that are inherent in treading on any new technology path? One answer is to share the experience of the IT community. In the few years of SOA adoption, a number of best and worst practices have already emerged, and these lessons learned map not to just application (code) development but also to other phases of SOA solution construction.

What Is SOA?
The Open Group defines SOA as an architectural style that supports service orientation, a way of thinking in terms of services, service-based development, and the outcomes of services where a service:

  • Is a logical representation of a repeatable business activity that has a specified outcome (e.g., check customer credit, provide weather data, or consolidate drilling reports);
  • Is self-contained;
  • May be composed of other services; and
  • Is a "black box" to consumers of the service.

    An architectural style is the combination of distinctive features in which architecture is performed or expressed. The SOA architecture has the following distinctive features:

  • It's based on the design of the services - which mirror real-world business activities comprising the enterprise (or inter-enterprise) business processes.
  • Service representation uses business descriptions to provide context (i.e., business process, goal, rule, policy, service interface, and service component) and implements services using service orchestration.
  • It places unique requirements on the infrastructure - it's recommended that implementations use open standards to realize interoperability and location transparency.
  • Implementations are environment-specific - they're constrained or enabled by context and must be described in that context.
  • It requires strong governance of service representation and implementation.
  • It requires a "litmus test" that determines a "good service."

    SOA projects are complex in that they span layers from business goals and processes down to low-level technical implementation details as described in the excellent paper by Ali Asranjani and illustrated in Figure 1. Successful SOA implementation is hard. The key points to remember are:

  • Build an internal agreement for using a SOA as an approach for an initial project
  • Start with something useful but manageable
  • Business and IT need to agree on an area of focus
  • Plan for governance and skills development
  • Plan to deliver success early and control costs
A useful approach is to have an initial exercise to scope the work and the first project followed by, concurrently, i) governance development, ii) competency development, and iii) an initial manageable project. However, even when this approach is adopted, there can be problems. Many groups in an organization are involved in building the solution for a SOA project. In addition, because SOA is so new, it's almost guaranteed to involve technologies and techniques that organizations have inadequate experience of. This combination solution involves much of an organization and the requirement to take on many new technologies and methodologies causes several opportunities for trouble, many of which are known and can be avoided with good planning.

Patterns and Anti-Patterns
Architects know how to use patterns that represent known workable solutions to given problems to develop the solution architecture. But SOA projects can also benefit from anti-patterns, or known unworkable solutions. Anti-patterns are the design choices to avoid and, while people can often learn more from failures than successes, they are less frequently discussed. In fact, knowing about anti-patterns can be useful across many project roles, including project managers, analysts, and developers as well as architects.

A pattern is a known-to-work solution to some problem. An excellent analysis by Jonathan Adams and others identifies several levels of patterns:

  • Business patterns that identify the interaction between users, businesses, and data.
  • Integration patterns that tie multiple business patterns together when a solution can't be provided based on a single business pattern.
  • Composite patterns that represent commonly occurring combinations of business and integration patterns.
  • Application patterns that provide a conceptual layout describing how the application components and data in a business pattern or integration pattern interact.
  • Runtime patterns that define the logical middleware structure supporting an application pattern. Runtime patterns depict the major middleware nodes, their roles, and the interfaces between these nodes.
  • Product mappings that identify proven and tested software implementations for each runtime pattern.
  • Best-practice guidelines for design, development, deployment, and management of e-business applications.
A pattern specification typically includes the name of the pattern, the problem solved by the pattern and forces that apply, a description of how the pattern works, a diagram (e.g., a sequence diagram) that illustrates the pattern, an implementation section (e.g., a UML model) and, finally, examples of how the pattern can be used.

An anti-pattern is an attractive apparent solution to a problem that is known not to work. The term was originally used to refer to a design pattern gone wrong. More precisely, an anti-pattern specification describes a poor solution to a problem, explains why this solution looks attractive and why it turns out to be bad, and offers better solution(s) to the same problem.

Anti-pattern descriptions provide a common vocabulary and an awareness of pitfall situations. They identify the symptoms, consequences, root causes, and potential replacement solutions for anti-patterns. An operational definition of an anti-pattern involves specifying the problem, the symptoms, the root-cause(s) of the problem, the consequences of building a solution using the anti-pattern, and a solution that presents a remedy to using the exposed anti-pattern.

Example Anti-Patterns for SOA
To illustrate the concept, let's look at a few SOA anti-patterns in detail equating SOA with Web Services, chatty services, and point-to-point services.

Example SOA Anti-Pattern: Equating SOA with Web Services
A common mistake made by architects of SOA solutions is to equate a SOA solution to one that simply has Web Services. If the Web Services aren't aligned with the business reason why a SOA solution was desirable in the first place, the solution isn't service-oriented. The following is a description of the anti-pattern using the terminology described above:

  • Problem: Equating SOA with Web Services
  • Symptoms: Symptoms of this anti-pattern include replacing existing APIs with Web Services without proper architecture and when services aren't business-aligned.
  • Consequences: The consequence of adopting this bad practice is the eventual proliferation of Web Services. It's also likely that those existing systems won't have interfaces that reflect the requirements of the service requestors. When services aren't aligned with business processes, the resulting solution greatly reduces the opportunities for reuse, for example, in composing new processes using existing services.
  • Root Cause: The main cause of this anti-pattern is haste, i.e., an architect assuming "I can take shortcuts and do this SOA stuff quickly and cheaply." This also results from ignorance in the area of transforming an IT architecture to a Service Oriented Architecture that's driven by business needs.
  • Solution: The solution is to apply proper service modeling techniques such as IBM's Service-Oriented Modeling and Architecture (SOMA) methodology, which will help in effectively mapping the business processes to SOA by identifying and specifying services. This approach (shown in Figure 2) facilitates the development of a viable transition plan from the current architecture to a Service Oriented Architecture with a defined SOA value proposition. Education on the difference between a Service Oriented Architecture and Web Services is also important. Most of today's production Web Service systems aren't based on Service Oriented Architectures - they're based on simple remote procedure calls, or point-to-point messaging via SOAP, or well-structured integration architectures. Most of today's Service Oriented Architectures not only use Web Services - they also use mature technologies such as FTP and batch files. Asynchronous messaging and Web Services technology are principally used in newer systems being integrated into a SOA. Hence, Web Services can be only part of the answer.
Example SOA Anti-Pattern: Chatty Services
Another commonly seen anti-pattern is to realize a business service by implementing a number of Web Services where each Web Service exchanges a tiny piece of data with the others. We refer to such services as chatty services. Figure 3 shows an example of chatty services between the presentation and business layers of the SOA architecture. The following is a description of this anti-pattern:
  • Problem: Realize a service by implementing a number of Web Services where each communicates a tiny piece of data.
  • Symptoms: The symptom of this bad practice is that the implementation will eventually have a large number of services.
  • Consequences: Chatty services result in degradation in performance and costly development. This anti-pattern also burdens the consumer with the task of aggregating these services to realize any benefit.
  • Root Cause: The root causes of such an implementation are mimicking an API implementation, and being so excited by the service concept that everything becomes a BPEL-defined business service, with no benefit and excessive cost. Chatty services can also be a consequence of too rigid service interfaces. This typically happens when client/server technology is simply being replaced by services with rigid interfaces in the process of transformation to a Service Oriented Architecture. Such a naïve transformation to SOA typically introduces operations that haven't been modeled with variability, resulting in a multiplication of operations and hence chatty services
  • Solution: The most effective solution is to refactor the design to combine individual pieces of data into one document. It's important not to use fine-grained calls. For example, to get the employee data that includes the employee's first name, last name, and office phone number, it would be a bad practice (that results in chatty services) to invoke a Web Service for each of these three elements. A better solution is to encapsulate the first name, last name, and office number in a single document and invoke a single Web Service to retrieve the employee data.
Here again, education on the difference between API and service and on the granularity of services is important. A recommendation to identify the exposed services is to apply litmus tests on the candidate services. A litmus test for a service is one that will answer all of the following questions:
  • Does the service provide a required unit of business functionality that supports business processes and goals?
  • Does the service promote composability with other services?
  • Can the service description be externalized?
  • Does the existence of the service help in eliminating redundant implementations, i.e., promote reuse?
  • Does the candidate service have a long enough lifecycle to be considered useful?
Example SOA Anti-Pattern: Point-to-Point Services
Implementing point-to-point services is an alternative to having a middleware layer that will route the service calls to service implementations. In such an approach, each requestor must individually access the corresponding service provider. Such practice is an anti-pattern and the following description of the anti-pattern explains why:
  • Problem: Replacing middleware with point-to-point Web Services as an integration approach.
  • Symptoms: Using XML or SOAP over HTTP between applications to effect communication between applications.
  • Consequences: Point-to-point integration emerges as the de facto integration pattern. This pattern promotes an integration complexity of the order of N*(N-1), where N is the number of services, resulting in error-prone management of the architecture.
  • Root Cause: The root cause for this anti-pattern is usually a view that an integration layer, usually called an Enterprise Service Bus (ESB), adds:
    - Complicated new technology
    - A single point of failure
    - Cost (for the ESB software and supporting hardware)
In fact, an ESB can be a key component, which enables much greater flexibility and reduces the complexity of the solution by providing a common point for interconnection to services. ESB technology has also proven to be robust and scaleable.
  • Solution: The solution that scales and results in more manageability (with order N complexity) is to use an intelligent connector such as an Enterprise Service Bus (Figure 4). An ESB enables applications to work together simply and efficiently to support business needs. Point-to-point integration results in tight coupling where each application has to be aware of the details of all other applications with which it can potentially collaborate. In the Enterprise Service Bus case, on the other hand, the coupling is loose and simpler. The bus also allows an application to be unaware of the details of the other applications that it collaborates with.
Solution Levels
The examples described all relate to architecture/design but, as experience with SOA accumulates, anti-patterns are beginning to emerge at all levels of the SOA solution process. The following table shows an example at each level.

SOA solution levelExample(s)
Project Management & MethodologyNot planning incremental build cycles
ModelingNot formally modeling business processes
Architecture/DesignNot understanding the full scope of included systems/interfaces in the solution

Security can be added later after system design

Assembly/DevelopmentFalling into the build-from-scratch rather than reuse existing services trap
Performance ManagementFailing to start verifying performance early in the project
Testing/QAFailure to test business process requirements
DeploymentNot planning for incremental and continuous deployments
System ManagementNot allowing for SLA management at the process level
Problem determinationNot planning for problem determination across a process

Example SOA Anti-Pattern: No Incremental Builds of the SOA Solution
This SOA anti-pattern is an example of a bad practice that can be exercised by a project manager:

  • Problem: Assembling the complete solution, only late in the lifecycle.
  • Symptoms: Each sub-team works independently but the whole end-to-end solution is only tested in a system integration test at the end of the development.
  • Consequences: Point-to-point integration emerges as the de facto integration pattern. This pattern promotes an integration complexity of the order of N*(N-1), where N is the number of services, resulting in error-prone management of the architecture.
  • Root Cause: Problem determination and problem isolation are left until the system integration test stage, when they are very hard to do. Performance problems in individual sub-teams' efforts and in end-to-end integration aren't seen and resolved early.
  • Solution: Build the solution in stages:
    - Build 0: Install the vendor-supplied software, e.g., middleware, and validate that all components install successfully. This will confirm that the required products have all been assembled and should also verify that patch level, operating system; disk space, and memory requirements have been met.
    - Build 1: Create a few simple end-end services. There should be no more than one or two, and it's important that they are truly end-to-end. An example might be to look up a customer, assuming that the customer database is part of the solution. This can be done from a portlet in the solution portal. It should exercise the portal, the ESB, the back-end database, and the services it exposes. Ideally, this would also exercise the security subsystem, at least to the extent of validating a single initial user. This step will prove that all the solution components can work together or will highlight problems among them at an early stage in the project.
    - Build 2...Build n: Build more solution elements, releasing them to testing in meaningful increments. A key part of a SOA is that it supports being able to assemble services into processes. This capability must be exercised early in the project to confirm that services are indeed composable into the required processes.

More Stories By Tony Carrato

Tony Carrato is the worldwide chief operations architect for the SOA Advanced Technology team in IBM's Software Group, focusing on SOA delivery. In this role, he is responsible for a team of IT architects who help IBM clients define and implement SOA projects around the world. Tony has over 30 years of IT experience, concentrating in financial services and telecommunications. He has held a variety of senior technical positions in Australia, Hong Kong, and the U.S.

More Stories By Harini Srinivasan

Dr. Harini Srinivasan is on the SOA design requirements team at IBM Software Group – a team that works with customers and IBM architects to capture SOA specific requirements and articulate them to relevant IBM SOA technology groups including the SOA product divisions. Before joining the SOA design requirements team, she spent 10 years at IBM Research as a Research Staff Member and has worked on customer-focused research topics such as performance analysis tools, JVM runtimes (including instrumentation) and C++ object models. . Her background is program analysis (static and dynamic analysis for performance and debugging), parallel and distributed systems including compiling explicitly parallel programs and runtimes for Java and C++.

More Stories By Chris Harding

Dr. Chris Harding leads the SOA Working Group at The Open Group - an open forum of customers and suppliers of IT products and services. In addition, he is a director of the UDEF Forum and manages The Open Group?s work on semantic interoperability. He has been with The Open Group for over 10 years. Dr. Harding began his career in communications software research and development. He then spent nine years as a consultant, specializing in voice and data communications, before moving to his current role. Recognizing the importance of giving enterprises quality information at the point of use, he sees information interoperability as the next major challenge, and frequently speaks or writes on this topic. Dr. Harding has a PhD in mathematical logic, and is a member of the British Computer Society (BCS) and of the Institute of Electrical and Electronics Engineers (IEEE).

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

@MicroservicesExpo Stories
As DevOps methodologies expand their reach across the enterprise, organizations face the daunting challenge of adapting related cloud strategies to ensure optimal alignment, from managing complexity to ensuring proper governance. How can culture, automation, legacy apps and even budget be reexamined to enable this ongoing shift within the modern software factory? In her Day 2 Keynote at @DevOpsSummit at 21st Cloud Expo, Aruna Ravichandran, VP, DevOps Solutions Marketing, CA Technologies, was jo...
You know you need the cloud, but you’re hesitant to simply dump everything at Amazon since you know that not all workloads are suitable for cloud. You know that you want the kind of ease of use and scalability that you get with public cloud, but your applications are architected in a way that makes the public cloud a non-starter. You’re looking at private cloud solutions based on hyperconverged infrastructure, but you’re concerned with the limits inherent in those technologies.
The nature of test environments is inherently temporary—you set up an environment, run through an automated test suite, and then tear down the environment. If you can reduce the cycle time for this process down to hours or minutes, then you may be able to cut your test environment budgets considerably. The impact of cloud adoption on test environments is a valuable advancement in both cost savings and agility. The on-demand model takes advantage of public cloud APIs requiring only payment for t...
The cloud era has reached the stage where it is no longer a question of whether a company should migrate, but when. Enterprises have embraced the outsourcing of where their various applications are stored and who manages them, saving significant investment along the way. Plus, the cloud has become a defining competitive edge. Companies that fail to successfully adapt risk failure. The media, of course, continues to extol the virtues of the cloud, including how easy it is to get there. Migrating...
For DevOps teams, the concepts behind service-oriented architecture (SOA) are nothing new. A style of software design initially made popular in the 1990s, SOA was an alternative to a monolithic application; essentially a collection of coarse-grained components that communicated with each other. Communication would involve either simple data passing or two or more services coordinating some activity. SOA served as a valid approach to solving many architectural problems faced by businesses, as app...
It has never been a better time to be a developer! Thanks to cloud computing, deploying our applications is much easier than it used to be. How we deploy our apps continues to evolve thanks to cloud hosting, Platform-as-a-Service (PaaS), and now Function-as-a-Service. FaaS is the concept of serverless computing via serverless architectures. Software developers can leverage this to deploy an individual "function", action, or piece of business logic. They are expected to start within milliseconds...
Some journey to cloud on a mission, others, a deadline. Change management is useful when migrating to public, private or hybrid cloud environments in either case. For most, stakeholder engagement peaks during the planning and post migration phases of a project. Legacy engagements are fairly direct: projects follow a linear progression of activities (the “waterfall” approach) – change managers and application coders work from the same functional and technical requirements. Enablement and develo...
Gone are the days when application development was the daunting task of the highly skilled developers backed with strong IT skills, low code application development has democratized app development and empowered a new generation of citizen developers. There was a time when app development was in the domain of people with complex coding and technical skills. We called these people by various names like programmers, coders, techies, and they usually worked in a world oblivious of the everyday pri...
While some developers care passionately about how data centers and clouds are architected, for most, it is only the end result that matters. To the majority of companies, technology exists to solve a business problem, and only delivers value when it is solving that problem. 2017 brings the mainstream adoption of containers for production workloads. In his session at 21st Cloud Expo, Ben McCormack, VP of Operations at Evernote, discussed how data centers of the future will be managed, how the p...
From manual human effort the world is slowly paving its way to a new space where most process are getting replaced with tools and systems to improve efficiency and bring down operational costs. Automation is the next big thing and low code platforms are fueling it in a significant way. The Automation era is here. We are in the fast pace of replacing manual human efforts with machines and processes. In the world of Information Technology too, we are linking disparate systems, softwares and tool...
DevOps is good for organizations. According to the soon to be released State of DevOps Report high-performing IT organizations are 2X more likely to exceed profitability, market share, and productivity goals. But how do they do it? How do they use DevOps to drive value and differentiate their companies? We recently sat down with Nicole Forsgren, CEO and Chief Scientist at DORA (DevOps Research and Assessment) and lead investigator for the State of DevOps Report, to discuss the role of measure...
Is advanced scheduling in Kubernetes achievable?Yes, however, how do you properly accommodate every real-life scenario that a Kubernetes user might encounter? How do you leverage advanced scheduling techniques to shape and describe each scenario in easy-to-use rules and configurations? In his session at @DevOpsSummit at 21st Cloud Expo, Oleg Chunikhin, CTO at Kublr, answered these questions and demonstrated techniques for implementing advanced scheduling. For example, using spot instances and co...
DevOps is under attack because developers don’t want to mess with infrastructure. They will happily own their code into production, but want to use platforms instead of raw automation. That’s changing the landscape that we understand as DevOps with both architecture concepts (CloudNative) and process redefinition (SRE). Rob Hirschfeld’s recent work in Kubernetes operations has led to the conclusion that containers and related platforms have changed the way we should be thinking about DevOps and...
"As we've gone out into the public cloud we've seen that over time we may have lost a few things - we've lost control, we've given up cost to a certain extent, and then security, flexibility," explained Steve Conner, VP of Sales at Cloudistics,in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
These days, APIs have become an integral part of the digital transformation journey for all enterprises. Every digital innovation story is connected to APIs . But have you ever pondered over to know what are the source of these APIs? Let me explain - APIs sources can be varied, internal or external, solving different purposes, but mostly categorized into the following two categories. Data lakes is a term used to represent disconnected but relevant data that are used by various business units wit...
With continuous delivery (CD) almost always in the spotlight, continuous integration (CI) is often left out in the cold. Indeed, it's been in use for so long and so widely, we often take the model for granted. So what is CI and how can you make the most of it? This blog is intended to answer those questions. Before we step into examining CI, we need to look back. Software developers often work in small teams and modularity, and need to integrate their changes with the rest of the project code b...
"I focus on what we are calling CAST Highlight, which is our SaaS application portfolio analysis tool. It is an extremely lightweight tool that can integrate with pretty much any build process right now," explained Andrew Siegmund, Application Migration Specialist for CAST, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Cloud4U builds software services that help people build DevOps platforms for cloud-based software and using our platform people can draw a picture of the system, network, software," explained Kihyeon Kim, CEO and Head of R&D at Cloud4U, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project. Kubernetes has been widely adopted by the community, supported on all major public and private cloud providers, and is gaining rapid adoption in enterprises. However, Kubernetes may seem intimidating and complex ...
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm. In their Day 3 Keynote at 20th Cloud Expo, Chris Brown, a Solutions Marketing Manager at Nutanix, and Mark Lav...