7/27/2019 SOA Anti Patterns
1/28
Copyright IBM Corporation 2006
SOA Anti-Patterns
Paul Ashley and Tony CarratoEnterprise Integration SolutionsIBM Software Group
7/27/2019 SOA Anti Patterns
2/28
Copyright IBM Corporation 2006
Presentation Agenda
Objectives
What are patterns
And, thus, what are anti-patterns
Why patterns & anti-patterns are important
SOA Anti-patterns for SOA
The project Im working on about anti-patterns
And how you can contribute Where to learn more
7/27/2019 SOA Anti Patterns
3/28
Copyright IBM Corporation 2006
Objectives
Identify common obstacles facing SOA from adoption torealization
Describe the obstacles and provide suggestions for solutions
Solicit input to add to the discovered AntiPatterns
Publish the findings for the benefit of the practitionercommunity
7/27/2019 SOA Anti Patterns
4/28
Copyright IBM Corporation 2006
A Pattern is a "generalized, named problem to solutionmapping
A Pattern captures a successful solution to a repeatingproblem in a particular context
In general, a Pattern is documented using the following:
Name: A name used for identification
Problem: A repeating problem that occurs in a
domain
Solution: Best practice solution to that problem
Consequences: Advantages and disadvantages of therecommended solution
Examples: A few examples where therecommended solution has already been applied
Christopher Alexanders research on buildings and town
design is often considered the pioneering work on Pattern-based thinking.
7/27/2019 SOA Anti Patterns
5/28
Copyright IBM Corporation 2006
Provide a mechanism to capture knowledge and experience
Provide a common vocabulary among architects anddesigners
Facilitate reuse of approaches that have been successfulelsewhere and, thus, contribute towards the following
aspects of a project :
Reducing risk
Increasing quality
Improving delivery time
Why Patterns are important?
7/27/2019 SOA Anti Patterns
6/28
Copyright IBM Corporation 2006
Several Levels of Patterns
Business patterns that identify the interaction between users,businesses, and data.
Integration patterns that tie multiple Business patterns togetherwhen a solution cannot be provided based on a single Businesspattern.
Composite patterns that represent commonly occurringcombinations of Business patterns and Integration patterns.
Runtime patterns that define the logical middleware structuresupporting an Application pattern. Runtime patterns depict themajor middleware nodes, their roles, and the interfaces betweenthese nodes.
* Source: IBM Redbook: Patterns: Applying Pattern Approaches V2, May 2004
7/27/2019 SOA Anti Patterns
7/28
Copyright IBM Corporation 2006
Several Levels of Patterns
Product mappings that identify proven and tested softwareimplementations for each Runtime pattern.
Best-practice guidelines for design, development, deployment, andmanagement of e-business applications
Will have:
A name
The problem solved (goal) & forces which apply
A description of how the pattern works
Usually with a diagram (architects love diagrams)
An implementation section, e.g. a UML model
Examples of use
Source: IBM Redbook: Patterns: Applying Pattern Approaches V2, May 2004 http://www.redbooks.ibm.com
7/27/2019 SOA Anti Patterns
8/28
Copyright IBM Corporation 2006
AntiPatterns what went wrong
A frequently used, but largely ineffective solution to aproblem
The term was originally used to refer to a design pattern gonewrong
Document commonly recurring solutions that havecounterproductive effect
Typically capture refactored solution description, showinghow to change the AntiPattern into a healthier solution
Described by template or language and include identifying:
symptoms,
consequences root causes, and
potential solutions
7/27/2019 SOA Anti Patterns
9/28
Copyright IBM Corporation 2006
A Tool to Prevent Problems
Helps to identify a problem before it becomesa problem
Provides knowledge to prevent or recoverfrom problems
Documents what does not work
Provides a common vocabulary
Provides detailed remedyProvides awareness of situation and alternative
solutions
Todays hot solution can be tomorrowsAntiPattern
Why AntiPatterns are Important?
7/27/2019 SOA Anti Patterns
10/28
Copyright IBM Corporation 2006
An anti-pattern is a known-not-to-worksolution to a problem
Like patterns, anti-patterns come at various levels:
ModellingProject Management & Methodology
Architecture/Design
Assembly/Development
Performance ManagementTesting/QA
Deployment
System Management
Problem determination
Why AntiPatterns are Important?
7/27/2019 SOA Anti Patterns
11/28
Copyright IBM Corporation 2006
Greater flexibility is required from the business
models and the supporting IT Architecture
Flexible Business
TransformationBusiness Process Outsourcing
Mergers, Acquisitions & Divestitures
Flexible IT
Cost ContainmentGreater ROI for IT dollars
Better Use if IT Assets
Improved Quality of Deployed Systems
Requires
On Demand Operating Environment
Development Infrastructure Management
Service Oriented Architecture (SOA)
SoftwareDevelopment Integration
InfrastructureManagement
Composable
Services(SOA)
ComposableProcesses
(IBMComponent
Business Modeling)
Servic
e-
Oriented
Modeling
7/27/2019 SOA Anti Patterns
12/28
Copyright IBM Corporation 2006
SOA in context
a set of services that a business wants to expose to their customers
and partners, or other portions of the organization
an architectural style which requires a service provider, requestor anda service description
a set of architectural principles, patterns and criteria which addresscharacteristics such as modularity, encapsulation, loose coupling,separation of concerns, reuse, composability and singleimplementation
a programming model complete with standards, tools andtechnologies such as Web Services
Business
Architecture
Implementation
What is Service-Oriented Architecture?
7/27/2019 SOA Anti Patterns
13/28
Copyright IBM Corporation 2006
A SOA is composed of processes, services and
components. At the heart of the SOA is the Service Modelthat defines services and components that realize them.
serv
icemodeling
serv
icemodeling
Composite service
Atomic service
QoS,Security,Management&
MonitoringInfrastructureService)
Data
Architecture
&BusinessIntelligen
ce
IntegrationArchitecture
(Enterpris
eService
Bus)
OperationalExisting Application Resources
PackageCustom
Application
Services
Business Processes
Components
Process Choreography
Atomic and Composite Services
4
3
2
1
6 7
Enterprise Components
Custom
Application Package
S
erviceConsumer
ServiceProvider
Consumers
85
JService Portlet WSRP B2B
QoS,Security,Management&
MonitoringInfrastructureService)
Data
Architecture
&BusinessIntelligen
ce
IntegrationArchitecture
(Enterpris
eService
Bus)
OperationalExisting Application Resources
PackageCustom
Application
Services
Business Processes
Components
Process Choreography
Atomic and Composite Services
4
3
2
1
6 7
Enterprise Components
Custom
Application Package
S
erviceConsumer
ServiceProvider
Consumers
85
JService Portlet WSRP B2B
7/27/2019 SOA Anti Patterns
14/28
Copyright IBM Corporation 2006
Example: A pattern for successful transition to SOA
Build internal agreement for the investigation
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:
An initial exercise to scope the work and the 1st project
Followed by, concurrently
Governance development
Competency development
An initial, manageable project
In other words patterns arent alwaysalwaystechnical
7/27/2019 SOA Anti Patterns
15/28
Copyright IBM Corporation 2006
Some SOA Anti-Patterns or ways wealready know to get it wrong!
Don't do any performance engineering (Perf)
Do Web Services point to point connectionswithout an ESB (Arch)
Use the data model of an underlyingproduct, rather than the data model thatsupports the business (Arch)
Try to build an SOA with back-level softwareversions (Assemble)
Don't train your team on proper use of thetools and middleware (PM)
Don't inspect the code (PM)
Don't follow modern design practices, e.g.don't use Use Case, express architecture aspatterns, etc (PM)
Plan to deliver the project in a big bang,rather than incrementally (PM)
Don't stress-test the system (Test)
Don't do proper business changemanagement (PM)
Don't understand the number of
interfaces/data formats/user types/.... you'llhave to deal with (Arch)
Don't incorporate performance testing,prototyping during application design (Test)
Don't model business processes (Model)
Don't model in a formal way, i.e. usePowerPoint or Visio instead of a tool thatproduces UML & BPEL (Model)
Don't model the services i.e. don't use SOMAtechniques. (Model)
Don't model the software implementation(Arch)
Write Code from scratch instead ofassembling (Assemble)
Don't have tooling training & support
including both development tools &middleware (PM)
Don't plan testing early; don't include testersearly in the development process (Test)
Dont do performance testing and memoryanalysis for both footprint analysis andmemory leak analysis (Perf)
Don't plan for SOA-style (rapid, frequentlyupdated) deployment and model thedeployment infrastructure (Deploy)
Don't plan to use tooling for deployment(Deploy)
Don't plan/architect for manageability (SysMgt)
Don't involve IT operations early (applies to"deploy" too) (Sys Mgt)
Don't plan for problem determination in acomplex environment, including log analysis& correlation (as does this one) (PD)
Dont plan for light weight monitoring tomonitor system in production (Sys Mgt)
Dont allow for enough development & testinginfrastucture (PM)
7/27/2019 SOA Anti Patterns
16/28
Copyright IBM Corporation 2006
Problem
Equating SOA with Web Services
Symptoms
Replacing existing APIs with Web Services withoutproper architecture
Services are not business aligned
Consequences
Proliferation of Web Services
It is likely those existing systems will not have interfaces that reflect therequirements of the service requestor
Root Cause
Haste: I can take short-cuts and do this SOA stuff quickly and cheaply
Ignorance
Solution
Develop a viable SOA transition plan with defined SOA value proposition Education on SOA vs. Web Services
Apply good Service Modeling (e.g, SOMA)
AntiPattern Name: Web Service = SOA
(also known as Service Proliferation Syndrome)I1
7/27/2019 SOA Anti Patterns
17/28
Copyright IBM Corporation 2006
Web Services can be a part of the answer ...
Service-Oriented Architecture (SOA) is another part
The two are not the same thing:
Most of today's production Web Services systems aren't serviceoriented architectures - they're simple remote procedure calls or point-to-point messaging via SOAP or well structured integration
architectures.
Most of today's production service oriented architectures don'tprimarily use Web Services - they use ftp, batch files, asynchronousmessaging etc. - mature technologies.
Achieving the promoted benefits of SOA and Web Services,requires both
Solution: Education on SOA vs. Web Services
Are Web services the answer?
I1
7/27/2019 SOA Anti Patterns
18/28
Copyright IBM Corporation 2006
Solution: Apply good service modeling method like IBMs SOMA
Ultimately, the goal of SOMA* is to build a SOA.
QoS,Security,M
anagement&
MonitoringInfrastr
uctureService)
Data
Architecture&B
usinessIntelligence
IntegrationArchitecture
(EnterpriseSe
rvice
Bus)
OperationalExisting Application Resources
PackageCustom
Application
Services
Business Processes
Components
Process Choreography
Atomic and Composite Services
4
3
2
1
6 7
Enterprise Components
CustomApplication
Package
ServiceConsumer
ServiceProvider
Consumers
85
JService Portlet WSRP B2B
QoS,Security,M
anagement&
MonitoringInfrastr
uctureService)
Data
Architecture&B
usinessIntelligence
IntegrationArchitecture
(EnterpriseSe
rvice
Bus)
OperationalExisting Application Resources
PackageCustom
Application
Services
Business Processes
Components
Process Choreography
Atomic and Composite Services
4
3
2
1
6 7
Enterprise Components
CustomApplication
Package
ServiceConsumer
ServiceProvider
Consumers
85
JService Portlet WSRP B2B
>
RealizationDecisions
Specificationof Services, Components, Flows
Identificationof candidateServices, Components, Flows
>
At the heart of SOMA is the identification and specification of services.
I1
* See http://www-128.ibm.com/developerworks/webservices/library/ws-soa-design1/formore information on SOMA
7/27/2019 SOA Anti Patterns
19/28
Copyright IBM Corporation 2006
AntiPattern Name: Chatty Services
Problem
Realize a service by implementing a number of Web Services whereeach communicate a tiny piece of data
Symptoms
Implementation of a large number of services
Consequences
Degradation in performance
Costly development
Burden the consumer with the task of aggregating these services to
realize any benefit Root Cause
Mimic API implementation
Excitement: everythingbecomes a BPEL-defined business service,with no benefit and excessive cost
Solution
Refactor design to combine individual pieces of data in one document
Education on difference between API & service; granularity
Apply Litmus test
Map services back to business goals
R1
7/27/2019 SOA Anti Patterns
20/28
Copyright IBM Corporation 2006
Solution: Refactor Design to combine pieces of data in one document
Do Not Use Fine-Grained Calls
SOAP Engine
Generated SOAPstub
EJB
(controller/model)
Swing
(view/controller)
Java Application
SOAP
over
HTTP
WebSphereApplication Server
Presentation
Layer
Business
Layer
SOAP Engine
Web Service
Examples of badServices
getFirstNamegetLastName
getOfficePhone
Bad: Using WSbetween WASapplication servers(no firewall issues,
fine grainedinteraction)
Source: SOA/WS bootcamp
R1
7/27/2019 SOA Anti Patterns
21/28
Copyright IBM Corporation 2006
Solution: Apply Litmus Test
Support only those that pass the Litmus Tests
SLT1: BusinessAlignment
Services to beExposed
SLT2:Composability
SLT3:
ExternalizedService
Description
Service Model:candidate services
SLT4: RedundancyElimination
S0
S1
S2
S3
Business Goals Candidate Services
SLT 1-1 : Does the service provide arequired unit of business functionality that
supports business processes and goals?
each composed of multiple criteria
From all candidate services,which should we expose?
R1
7/27/2019 SOA Anti Patterns
22/28
Copyright IBM Corporation 2006
Problem
Replacing middleware with point to point web services as an integration approach
Symptoms
Using XML or SOAP over HTTP between Applications
Consequences
Point-to-point integration emerges as the defacto integration pattern
Root Cause
Excitement about using services everywhere
A lack of consideration for the long-term maintenance and evolution of the overallsystem
Solution
Use an intelligent connector such as a Service Bus
Known Exceptions When quick, short-lived integration is required to solve immediate business
problems, but tend to be in production for a long time
Name: Point-to-Point Services
R2
7/27/2019 SOA Anti Patterns
23/28
Copyright IBM Corporation 2006
Solution: Use an intelligent connector such as a Service Bus
Service Bus enables applications to work togethersimply and efficiently to support business needs
AA BB
HH
DD
FF
CC
EE
GG
AA BB
HH
DD
FF
CC
EE
GG
ESBESB
ApplicationsApplications
Tight coupling and complex - Each
application has to be aware of the details ofother applications it has to collaborate with.
Loose coupling and simpler - The service bus
shields each application from the details ofother applications it has to collaborate with.
R2
7/27/2019 SOA Anti Patterns
24/28
Copyright IBM Corporation 2006
Out SOA anti-patterns project
Working with an IBM team to:
Identify SOA anti-patterns
Catalogue them for future reference
Develop education on anti-patterns
And plan to publish our results on IBM DeveloperWorks(http://www.ibm.com/developerworks)
7/27/2019 SOA Anti Patterns
25/28
Copyright IBM Corporation 2006
Wed like to hear from you about SOA anti-patterns
Were very interested in anti-patterns you
observe
Ideally, they will be from real projects
With some sense of the impact of the anti-pattern
If you discover some, send a note to Tony or Paul
7/27/2019 SOA Anti Patterns
26/28
Copyright IBM Corporation 2006
Where to learn more
AntiPatterns: Refactoring Software, Architectures, and Projects inCrisis by William J. Brown, Raphael C. Malveau, Hays W. "Skip"McCormick, and Thomas J. Mowbray (Paperback - Mar 20, 1998)
Service-Oriented Architecture (SOA) Compass : Business Value,Planning, and Enterprise Roadmap (Developerworks) (Hardcover)Norbert Bieberstein, Sanjay Bose, Marc Fiammante, Keith Jones, Rawn
Shah IBM Press
Perspectives on Web Services : Applying SOAP, WSDL and UDDI toReal-World Projects (Springer Professional Computing) (Hardcover) byOlaf Zimmermann, Mark R. Tomlinson, Stefan Peuser ISBN 3540009140
SOA Anti-Patterns article by Steve Jones, CGI
http://www.infoq.com/articles/SOA-anti-patterns
Also check out Steves Blog @ http://service-architecture.blogspot.com/ Search for anti-patterns or patterns
7/27/2019 SOA Anti Patterns
27/28
Copyright IBM Corporation 2006
Where to learn more
AntiPatterns.com www.antipatterns.com
Has a nice briefing on anti-patterns
Rational Software Architect or Rational Application Developer
Check the help file both can support searching for anti-patterns
DeveloperWorks SOA Anti-Patterns page:ww.ibm.com/developerworks/webservices/library/ws-antipatterns/
And many others; search foranti-patterns
IBM Redbooks
http://www.redbooks.ibm.com
7/27/2019 SOA Anti Patterns
28/28
Copyright IBM Corporation 2006
Japanese
English
French
Russian
German
Italian
Spanish
Brazilian PortugueseArabic
Traditional Chinese
Simplified Chinese
Thai
Korean