© 2013 IBM Corporation
Fundamental Integration and Service Patterns
Kim Clark (kim.clark@uk.ibm.com), IBM UK
Brian Petrini (petrini@us.ibm.com), IBM US
TSS-2971
IBM Software Group
© 2013 IBM Corporation2
Objective
Improve consistency of integration implementations
§  Do you have a common language for integration
characteristics and patterns shared between the
architects, designers, and implementers?
§  Can you mechanically assess the patterns required for
integration and SOA in a given solution?
§  Where does orchestration fit within the layers of an
enterprise architecture?
IBM Software Group
© 2013 IBM Corporation3
Contents
§ Capturing interface complexity
§ Basic integration pattern evolution
§ What differentiates the SOA patterns
§ Categorizing orchestration
IBM Software Group
© 2013 IBM Corporation4
Example integration challenges from projects
§  The service must appear event driven, but
actually is a batch process on the back end
§  We can only make 10 requests per hour to the
back end, but can contain as many events in
a single request as you like.
§  Connection pooling is required but we want to
preserve the identity of the caller
§  The data format is “similar” to Comma
Separated Values
§  We must never call the back end system
when it is down. The availability of the
backend system can be determined by the
xxx function call.
§  We don’t know what the request is until we
inspect various aspects of the message
header and body. In some cases even the
data format is unknown at this stage.
§  Due to optimistic locking, the backend system
requires the exact timestamp/rowid that was
returned in the retrieve at the beginning of the
business process.
§  For testing, we need to be able to wire in our
(proprietary) test harness mechanism
§  We have written our own security mechanism
§  Any changes to code require a lengthy
validation process. We want everything
possible to be configurable.
§  The backend system is often not available.
Retries should happen automatically and
should not be considered an error condition.
§  We used powerful features of XML Schema in
definition of our object model.
§  We have our own integration framework. Most
of the work is done by a few common classes
and applications. New services are added via
configuration rather than code.
§  Due to acquisitions, customer accounts
are spread across multiple systems. We
need to provide a unified customer view
§  The adapter was missing one feature that we
needed, so we’ve decided to integrate using
custom code instead.
§  We only want to send the changes/deltas to
the back end system, not the whole original
message
IBM Software Group
© 2013 IBM Corporation5
Characterising the interface
Requester Provider
Interface Characteristics
Integrity
Security
Reliability
Error handling
Data
Technical interface
Interaction type
Performance
Capturing integration complexity for BPM and SOA solutions
http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
IBM Software Group
© 2013 IBM Corporation6
Interface Characteristics
Data
Principal data objects
Operation/function
Read or change
Request/response objects
Technical Interface
Transport
Protocol
Data format
Interaction type
Request-response or fire-forget
Thread-blocking or asynchronous
Batch or individual
Performance
Response times
Throughput
Volumes
Concurrency
Message size
Integrity
Validation
Transactionality
Statefullness
Event Sequence
Idempotence
Security
Identity/Authentication
Authorisation
Data Ownership
Privacy
Reliability
Availability
Delivery assurance
Error Handling
Error Management capabilities
Known exception conditions
http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
IBM Software Group
© 2013 IBM Corporation7
Solution Context Diagram with Integration Detail
Process
OrderBilling
System
Data
Warehouse
Credit
Checking
Shipping
Product
Catalogue Order
Management
Printing
Order
(JDBC)
Customer/Credit Rating
(Web Service/HTTP)
Order Confirmation
(Web service/JMS)
Order Summary
(JDBC)
Customer/Order
(Flat file, batch)
Customer/Order
(Flat file, XML)
Product Details
(RMI/IIOP)
Order Details
(WebSphere MQ)
Customer
Relationship
Managemen
t
Customer
Relationship
Management
Interface Characteristics
IBM Software Group
© 2013 IBM Corporation8
Resolving differences in interface characteristics
Interface Characteristics
Integrity
Security
Reliability
Error handling
Data
Technical interface
Interaction type
Performance
Interface Characteristics
Integrity
Security
Reliability
Error handling
Data
Technical interface
Interaction type
Performance
Integration
is about handling
the differences between
requester and provider
Integration Patterns
IBM Software Group
© 2013 IBM Corporation9
Evolving Integration Design Patterns – a sample
§  Data handling
§  Data model translation
§  Data synchronisation
§  Publish subscribe
§  Routing
§  Content based routing
§  Data enrichment
§  Protocol and transport translation
§  Large object management
§  Correlation
§  Assured delivery
§  Canonical data model
§  Relationships/cross referencing
§  Once only delivery
§  Scatter gather
§  Aggregation
§  Store and forward
§  Flow control/throttling
§  Service exposure
§  Failed event management
§  Idempotence resolution
§  Retry
§  Health check
§  Prioritization
§  Optimistic/pessimistic locking
§  Event sequencing
§  Verb conversion
§  Existence checking
§  Compensation
§  Batch processing (various)
§  Command controller (various)
§  Error handling (various)
§  Composition (various)
§  Orchestration (various)
§  …many more
The “EAI Patterns” book (http://www.eaipatterns.com/toc.html) covers the initial set of
primarily message based integration patterns, many of which have now been productised.
This list extends into the next level of complexity in integration patterns.
IBM Software Group
© 2013 IBM Corporation10
Contents
§ Capturing interface complexity
§ Basic integration pattern evolution
§ What differentiates the SOA patterns
§ Categorizing orchestration
IBM Software Group
© 2013 IBM Corporation11
Point to point integration – connection spaghetti
Operational Systems
(Applications & Data)
Requesters
IBM Software Group
© 2013 IBM Corporation12
Capabilities required in data point to point integration
Adaptation
Connection Management
Application Programming Interface
Protocol conversion
Transport communication
Data Handling
Requester
System
Provider
System
Adaptatio
n code
Adaptatio
n code
Interaction Framework
IBM Software Group
© 2013 IBM Corporation1313
11/14/13 Service and Integration Maturity
Hub and Spoke architecture with basic one to one integration
Operational
Systems
(Applications & Data)
Requesters
Integration
Hub
Adapter Adapter Adapter
Adapter AdapterAdapter
Adapter
Adapter
One-to-one
IBM Software Group
© 2013 IBM Corporation14
Patterns/capabilities for hub-based basic one to one integration
Canonical Integration
Integration
Hub
Adapter Adapter
Adaptation
Connection Management
Application Programming Interface
Protocol conversion
Transport communication
Data Handling
Interaction Framework
Data Translation
IBM Software Group
© 2013 IBM Corporation15
Interface Characteristics driving interaction styles
Data
Principal data objects
Operation/function
Read or change
Request/response objects
Technical Interface
Transport
Protocol
Data format
Interaction type
Request-response or fire-forget
Thread-blocking or asynchronous
Batch or individual
Performance
Response times
Throughput
Volumes
Concurrency
Message size
Integrity
Validation
Transactionality
Statefullness
Event Sequence
Idempotence
Security
Identity/Authentication
Authorisation
Data Ownership
Privacy
Reliability
Availability
Delivery assurance
Error Handling
Error Management capabilities
Known exception conditions
http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
IBM Software Group
© 2013 IBM Corporation16
Integration Hub
Hub and spoke interaction styles – basic one to one
Integration Hub
AdapterAdapter
AdapterAdapter
1) Non-blocking (message-based) transport
(shown using an open arrowhead)
2) Blocking (synchronous) transport
(shown using a closed arrowhead)
IBM Software Group
© 2013 IBM Corporation17
Basic Interaction Types
ProviderRequester
getCustomer(CustomerID)
returns Customer
ProviderRequester
submitOrder(Order)a)  Fire and forget,
non-blocking transport
ProviderRequester
getCustomer(CustomerID)
returns Customer
b) Request-response,
blocking transport
c) Request-response,
non-blocking transport
A messaging transport is used. The request is “one-way” sending data to the provider, but with no response.
The requester need only wait for the message to be received by the transport – i.e. it is non-blocking.
A synchronous transport is used. The requester requires response data, and must wait for the provider to
respond. The provider must be available at the time of the request and must process the request
immediately.
A messaging transport is used. The requester need only wait for the message to be received by the transport.
It is then freed up to do other work. It must however provide a way in which it can receive messages from a
response queue at a later time and be able to correlate this with the original request.
IBM Software Group
© 2013 IBM Corporation18
Advanced Interaction Types
ProviderRequester
getCustomer(CustomerID)
returns Customer
e) Request-response
blocking caller API,
non-blocking transport
ProviderRequester
getCustomer(CustomerID)
Callback with Customer
f) Request-response by
call-back, using blocking
transport
ProviderRequester
submitOrder(OrderID)d) Request with
acknowledgement,
blocking transport returns Acknowledgement
A synchronous transport is used. The provider must be present to receive the request, but it provides only an
acknowledgement that the action will be performed at a later time. This is similar to fire-forget as the actual
business task required by the requester is performed after the acknowledgement is returned, but this is more
tightly coupled.
This is a hybrid between transport types. A messaging transport is used to communicate with the provider, but
the requestor interacts with the messaging using a synchronous API. Many messaging transports provide this
type of API to simplify requester interaction with the messaging layer. The provider can process the message at
its convenience but the requester is blocked waiting.
A synchronous transport (such as HTTP) is used to make two separate interactions for request and call-back.
Each interaction individually is blocking, but releases the block as soon as an acknowledgement is received.
This is similar to request response non-blocking but the requester and provider interact more directly.
returns Acknowledgement
returns Acknowledgement
IBM Software Group
© 2013 IBM Corporation1919
11/14/13 Service and Integration Maturity
Hub and Spoke architecture
typical of Enterprise Application Integration (EAI)
Operational
Systems
(Applications & Data)
Requesters
Integration
Hub
Adapter Adapter Adapter
Adapter AdapterAdapter
Adapter
Adapter
One-to-many
IBM Software Group
© 2013 IBM Corporation20
Patterns/capabilities for basic multi-provider integration
Integration
Hub
Adapter
Adapter
Adapter
Adaptation
Connection Management
Application Programming Interface
Protocol conversion
Transport communication
Data Handling
Interaction Framework
Canonical Integration
Data Translation
Routing/Distribution
IBM Software Group
© 2013 IBM Corporation21
Integration Hub
Integration Hub
Hub and spoke interaction styles – brokerage
Adapter
Adapter
Adapter
Adapter
Adapter
Adapter
OR
AND
a) Routing
b) Distribution
IBM Software Group
© 2013 IBM Corporation22
Patterns/capabilities for advanced multi-provider integration
Integration
Hub
Adapter
Adapter
Adapter
Adaptation
Connection Management
Application Programming Interface
Protocol conversion
Transport communication
Data Handling
Interaction Framework
Canonical Integration
Data Translation
Routing/Distribution
Orchestration
IBM Software Group
© 2013 IBM Corporation23
Hub and spoke interaction styles – orchestration
A selection of the possible types
Adapter
Adapter
Adapter
Read-only orchestration
Parallel aggregation
Updating orchestration
Stateful orchestration
Adapter
Adapter
Adapter
Adapter
Adapter
Adapter
Adapter
Adapter
Adapter
IBM Software Group
© 2013 IBM Corporation24
The importance of orchestration types
§  Orchestration is not new. It has been occurring in
applications and middleware solutions for decades.
§  Orchestration is becoming a critical architectural decision
point in large enterprises due to the increased need to
automate functionality distributed across an increasingly
larger number of enterprise systems.
§  Categorizing the different types of orchestration is critical
to ensure it:
– occurs in the right layers within the architecture
– is performed by products with the right capabilities
– is visible and changeable by the right audience
IBM Software Group
© 2013 IBM Corporation25
A high level “interaction pattern” notation for integration?
§  Provides a way to describe the
high level intent of an
integration solution without
being bound to technology
§  This is a subset of the overall
notation based on what we’ve
used in the presentation so far.
§  It is not a standardised
notation, but it does borrow
from notations that have come
before it.
(e.g. www.eaipatterns.com)
§  The notation would need to be
specialised to a given
environment.
Read-only
orchestration
Parallel
aggregation
Multi-invocation
Brokerage
Route Distribute
Updating
orchestration
Stateful
orchestration
Synchronous “request/reply interaction
One-way “fire/forget” interaction
Direct
IBM Software Group
© 2013 IBM Corporation26
Technology agnostic high-level design notation for integration
§  Learnable sub-set of the patterns the
technology should be used for.
§  Common language between solution
design and service design.
§  Highlights when we step beyond
regularly used capabilities
§  Maps to specific, documented
implementation standards
§  Enables pattern based design and
development
§  Downstream benefits in monitoring,
diagnostics and dependency analysis
IBM Software Group
© 2013 IBM Corporation27
Orchestration/Composition in the integration layer
Operational Systems
(Applications & Data)
Integration
Requesters
Data
synchronization
Microflow
Stored procedure
Straight-through
processing
IBM Software Group
© 2013 IBM Corporation28
Contents
§ Capturing interface complexity
§ Basic integration pattern evolution
§ What differentiates the SOA patterns
§ Categorizing orchestration
IBM Software Group
© 2013 IBM Corporation29
Service Oriented Architecture (SOA) Reference Architecture
https://collaboration.opengroup.org/projects/soa-ref-arch
IBM Software Group
© 2013 IBM Corporation30
Silo Services
Composite
Services
Virtualized
Services
Dynamically
Re-Configurable
ServicesComponentizedIntegrated
Level 1 Level 4 Level 5 Level 6 Level 7Level 3Level 2
Applications
Methods
Organization
Infrastructure
Architecture
Business View
Modules Services
Process
Integration via
Services
Dynamic
Application
Assembly
ComponentsObjects
Structured
Analysis &
Design
Service
Oriented
Modeling
Service
Oriented
Modeling
Grammar
Oriented
Modeling
Component
Based
Development
Object
Oriented
Modeling
Ad hoc IT
Governance
Emerging SOA
Governance
SOA and IT
Governance
Alignment
SOA and IT
Governance
Alignment
Ad hoc IT
Governance
Ad hoc IT
Governance
SOA and IT
Governance
Alignment
Service
Oriented
Modeling
Process
Integration
via Services
Platform
Specific
Platform
Specific
Platform
Neutral
Dynamic
Sense &
Respond
Platform
Specific
Platform
Specific
Monolithic
Architecture
Emerging
SOA
Grid Enabled SOA
Dynamically Re-
Configurable
Architecture
Component
Architecture
Layered
Architecture
SOA
Platform
Specific
Function
Oriented
Service
Oriented
Service
Oriented
Service
Oriented
Function
Oriented
Function
Oriented
Service
Oriented
Open Service Integration Maturity Model (OSIMM)
https://collaboration.opengroup.org/projects/osimm
IBM Software Group
© 2013 IBM Corporation31
Service Oriented Landscape
Introducing standardised service exposure
Operational
Systems
(Applications & Data)
Requesters
Integration Hub
Service Exposure Gateway
Adapter AdapterAdapter
IBM Software Group
© 2013 IBM Corporation32
Capabilities to components – service exposure
Integration
Hub
Adapter
Adapter
Adaptation
Connection Management
Application Programming Interface
Protocol conversion
Transport communication
Data Handling
Interaction Framework
Canonical Integration
Data Translation
Routing/Distribution
Orchestration
Service
Exposure
Gateway
Service Exposure
Traffic Management
Security
Virtualisation
Visibility
IBM Software Group
© 2013 IBM Corporation33
Contents
§ Capturing interface complexity
§ Basic integration pattern evolution
§ What differentiates the SOA patterns
§ Categorizing orchestration
IBM Software Group
© 2013 IBM Corporation34
BPM in a Service Oriented Architecture
Operational Systems
(Applications & Data)
Requesters
Integration Hub
Adapter AdapterAdapter
Business Process
Manager
Service Exposure Gateway
So where should
we do orchestration?
IBM Software Group
© 2013 IBM Corporation35
What highlights a “business process”
in a business process management solution?
§  Performing the process provides value to the business
§  The process follows a relatively structured path
§  The process contains individually business relevant steps
§  The steps within the process are performed by multiple roles/teams.
§  Business relevant data flows through the process
§  The process changes over time as a result of changes in the business
Create
Account
Capture
Details
Send
Documents
Sign
Documents
Activate
Account
Customer
Call centre
Back office
Notify
Customer
New
revenue!
Existing customer
New customer
-- ------------------------------- -
-- ------------------------------- -
-- ------------------------------- -
-- ------------------------------- -
-- ------------------------------- -
-- ------------------------------- -
IBM Software Group
© 2013 IBM Corporation36
Orchestration/Composition
Where could it occur / Where should it occur?
Service Exposure
Operational Systems
(Applications & Data)
Integration
Consumers
Business Process
Data
synchronization
Microflow
In-app.
workflow
Screenflow/
page navigation
Stored procedure
Straight-through
processing
Business process
IBM Software Group
© 2013 IBM Corporation37
Single Transaction
for all invocations
Multiple Transactions
across invocations
Human Tasks
Terminology: Orchestration – “Composition” vs. “Process”?
§  Appear to the business as a single
step.
§  Do not include human interaction from
the business.
Business ProcessComposition
§  Take long enough that the business
need to be aware of their intermediate
in-progress states.
§  Include human interaction, or
interaction with slow responding
systems.
Orchestration
(A sequence of “invocations” of systems, or humans)
“Process Implementation Types: Patterns based design for process based solutions”
http://www.ibm.com/developerworks/websphere/library/techarticles/1004_clark/1004_clark.html
IBM Software Group
© 2013 IBM Corporation38
Types of orchestration in relation to transactionality
Do any of the requests perform critical changes*?
No
Aggregation Enriched update
Yes
Can all critical changes* be
performed in one transaction?
State-free
Orchestration
Stateful
Orchestration
Yes No
How many critical changes*?
=1 >1
*Definition: “Critical Change”
Any request that performs a change
(create, update, delete) that MUST be
resolved in the case of a failure, either with
a transactional rollback, or with
compensatory actions if the update has
already been committed.
Non-transactional Isolated transaction Global transaction Multi-transaction
IBM Software Group
© 2013 IBM Corporation39
Types of Orchestration: Process vs. Composition
§  Process
– Makes calls to mature high level services
– Often triggered (i.e. one way call) rather than invoked as a two way call
– Where it is invoked as a two way interaction, the caller is typically asynchronous
(i.e. not a user) and therefore the service level agreement is throughput based
rather than response time based
– Stateful persistence of the steps in the process
– Events can correlate with the running process
– Often involves human interaction to perform some tasks within the process
§  Composition
– Grouping of relatively granular interactions
– Response time is the primary driver for the service level agreement
– Common for aggregation functions
– Some or all the granular interactions may not themselves be exposed as re-usable
services
– Generally state free
– Never involves human interaction during the composition
IBM Software Group
© 2013 IBM Corporation40
Integration orchestration vs. business orchestration
A “litmus test”
§  Imagine an ideal enterprise information system.
– It is a single system of record for all business data.
– All the data is normalized.
– It has appropriate APIs for every type of data access required.
– It is infinitely fast and completely reliable.
§  In this ideal system, if you find yourself doing multiple
actions, you are performing business orchestration.
§  Any orchestration done to manage the fact that the real
systems are not as perfect as the ideal system above, is
integration orchestration.
IBM Software Group
© 2013 IBM Corporation41
Interface Characteristics that drive functional orchestration
Data
Principal data objects
Operation/function
Read or change
Request/response objects
Technical Interface
Transport
Protocol
Data format
Interaction type
Request-response or fire-forget
Thread-blocking or asynchronous
Batch or individual
Performance
Response times
Throughput
Volumes
Concurrency
Message size
Integrity
Validation
Transactionality
Statefullness
Event Sequence
Idempotence
Security
Identity/Authentication
Authorisation
Data Ownership
Privacy
Reliability
Availability
Delivery assurance
Error Handling
Error Management capabilities
Known exception conditions
http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
IBM Software Group
© 2013 IBM Corporation42
Common functional orchestration patterns
§  Data synchronization
§  Aggregation
§  Enriched updates
§  Straight through processing
§  Complex error handling
§  Compensation
§  …and an infinite number more
IBM Software Group
© 2013 IBM Corporation43
Interface Characteristics that drive infrastructural orchestration
Data
Principal data objects
Operation/function
Read or change
Request/response objects
Technical Interface
Transport
Protocol
Data format
Interaction type
Request-response or fire-forget
Thread-blocking or asynchronous
Batch or individual
Performance
Response times
Throughput
Volumes
Concurrency
Message size
Integrity
Validation
Transactionality
Statefullness
Event Sequence
Idempotence
Security
Identity/Authentication
Authorisation
Data Ownership
Privacy
Reliability
Availability
Delivery assurance
Error Handling
Error Management capabilities
Known exception conditions
http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
IBM Software Group
© 2013 IBM Corporation44
Common infrastructural orchestration patterns
§  Data Consistency
– Once only delivery
– Optimistic/pessimistic locking
– Event sequencing
– Idempotence resolution
§  Large object
– Claim check
– Move by command
– Response by reference
§  Reliability
– Failed event management
– Retry
– Health check
– Store and forward
§  Batch management
– Batch splitter
– Batch processing
– Batch aggregator
Infrastructural integration orchestration pattern are those that concern the completion of
one primary request to one system, and are therefore essentially functionally agnostic.
These patterns are more likely to be productized.
IBM Software Group
© 2013 IBM Corporation45
Summary of dimensions for categorising orchestration
§  Composition vs. process
–  Beware. Loose terms, used relatively inconsistently.
§  Human involvement vs. system only
–  Are humans involved in the happy path?
–  Workforce management capabilities are critical
§  Single transaction vs. multi-transaction
–  Consider the number of “critical changes” performed
–  Directs us to the correct implementation technology
§  Integration orchestration vs. business orchestration
–  Try the “litmus test” of whether you would need multiple requests on a perfect system?
–  Who owns the requirements? Who can change them?
§  Infrastructural orchestration vs. functional orchestration?
–  Is it only one primary function on one system?
–  Is there a product feature that provides this capability?
IBM Software Group
© 2013 IBM Corporation46
Interface Characteristics relating to cross cutting concerns
Data
Principal data objects
Operation/function
Read or change
Request/response objects
Technical Interface
Transport
Protocol
Data format
Interaction type
Request-response or fire-forget
Thread-blocking or asynchronous
Batch or individual
Performance
Response times
Throughput
Volumes
Concurrency
Message size
Integrity
Validation
Transactionality
Statefullness
Event Sequence
Idempotence
Security
Identity/Authentication
Authorisation
Data Ownership
Privacy
Reliability
Availability
Delivery assurance
Error Handling
Error Management capabilities
Known exception conditions
http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
IBM Software Group
© 2013 IBM Corporation47
Key messages
§  Interface characteristics provide a mechanical way to
assess the required integration patterns.
§  A standard integration vocabulary and notation improve
communication between architect, designer and
implementer.
§  Categorization of orchestration enables correct
placement within the architecture.
§  Formalization of integration improves consistency,
and velocity in implementation.
IBM Software Group
© 2013 IBM Corporation48
Thank You
Merci
Grazie
Gracias
Obrigado
Danke
Japanese
English
French
Russian
GermanItalian
Spanish
Brazilian Portuguese
Arabic
Traditional Chinese
Simplified Chinese
Thai
© 2013 IBM Corporation
IBM Software Group
Background
IBM Software Group
© 2013 IBM Corporation50
How would we resolve differences in Characteristics?
Data (Functionality)
<Provider><Requester>
Characteristic Example Conflict Resolution options
Principal data
objects
The interface does not respond with
all the required data
Data Aggregation, Data Enrichment: More than one
operation call may be required, and the resulting data
aggregated.
Request/ response
objects
The request/response objects are not
the same structure as the objects in
the requester
Mapping: The requesters data must be mapped to/from the
structure of the provider
Operation/ function The provider does not offer an
operation that performs the exact
action required by the requester.
Orchestration/Composition, or Command Pattern. A
combination of existing operations must be found that
provide the same functionality. If not, a new operation must
be made available by the provider, or else the interface is
untenable.
Differences in
Interface Characteristics
IBM Software Group
© 2013 IBM Corporation51
How would we resolve differences in Characteristics?
Integrity (Functionality)
Characteristic Example Conflict Resolution options
Validation The requester’s request, sometimes
provides data that is considered invalid to
the requester, or indeed whether the
response data is valid.
We will need to perform either Data Enrichment, or Data
Cleansing on the incoming data. Where the data cannot be
sufficiently enhanced, we should provide a meaningful data
validation error.
Transactionality The providers interface cannot be included
in a wider transaction, but the requester
needs to ensure consistency between this
invocation and others
Without transactionality, an option for consistency would be
Compensation. It may be sufficient to simply put in place
Delivery Assurance to ensure that the data is “eventually”
consistent.
Statefullness The request requires of data from a
previous call (such as a session ID, or lock
ID), but the requester does not have this
data.
The previous call could be combined with this one
(Orchestration/Command Pattern), or the required data could be
stored on the previous call and looked up for this one (Data
Enrichment). A locking strategy could be converted from ID
based to time based such that an id is no longer required.
Event
Sequence
The provide needs updates to be applied
in order, but the requester sometimes
sends the events out of sequence.
A grouping sequencer/re-sequencer Event Sequencing pattern
must be applied.
Idempotence The requester may send more than one
request through for the same event, but
this will produce duplicates in the provider.
The incoming requests must be de-duplicated such that
Idempotence is offered by the provider.
<Provider><Requester> Differences in
Interface Characteristics
IBM Software Group
© 2013 IBM Corporation52
How would we resolve differences in Characteristics?
Security (Functionality)
Characteristic Example Conflict Resolution options
Data Ownership The requester requesting an update, is not
allowed to make changes to all parts of
the incoming data model.
The incoming object should be thinned appropriately (Mapping)
such that only selective updates occur. It might be considered
an error if the data that the requester passes, but is not allowed
to change, is different to that found in the provider. In this case,
Orchestration/Composition would be required in order to perform
a retrieve or data prior to update.
Privacy Some of the data that the provider
responds with is restricted, and should not
be made available to the requester.
The restricted data must be removed from the response
(Mapping).
<Provider><Requester> Differences in
Interface Characteristics
IBM Software Group
© 2013 IBM Corporation53
How would we resolve differences in Characteristics?
Reliability
Characteristic Example Conflict Resolution options
Mean time
between failures
The provider’s availability is not sufficient
for the requesters needs
We could put in place Protocol and Transport Translation to an
asynchronous medium, and a/or a Re-Try mechanism to make
the provide appear more reliable.
Maintenance
windows
The provider is regularly shutdown during
a time when the requester is expected to
be making requests.
We will need a Store and Forward mechanism to ensure that the
requester can continue to make requests even when the system
is down. A Healthcheck would allow us to automatically know
when to re-submit stored events.
Delivery
Assurance
The requester needs to be confident that
once a request has been submitted, it will
be actioned as some point in the near
future, and it will never be lost.
On the simplest level, we need to ensure that the service is
provided over a reliable transport, which may therefore require
Protocol and Transport Translation.
However, it may be that the requester cannot talk over such a
transport, so a more complex conversational interaction may be
required, which may in include the use of Idempotence, Re-
Tries, Store and Forward, and even Publish/Subscribe to provide
acknowledgements/responses back to a decoupled requester.
<Provider><Requester> Differences in
Interface Characteristics
IBM Software Group
© 2013 IBM Corporation54
How would we resolve differences in Characteristics?
Interaction Type (Usability)
Characteristic Example Conflict Resolution options
Synchronous or
Asynchronous
Requester talks web services, but
provider exposes over MQ.
Simplistically this is just Protocol Translation. However, Synch-
>Async conversion comes with a number of complex side effects
in terms of Error Handling, and Idempotence, and Once Only
Delivery, to name but a few. See Transactionality lecture for
more details.
Request/Response
or Fire/Forget
The requester may want to receive a
specific acknowledgement confirming
receipt of the request. The provider
may be a one way interface.
This is the simplest possible form of Orchestration/Composition.
A more interesting Orchestration/Composition would be the
opposite case where the requester was fire/forget and the
provider Request/Response. Careful thought would be needed
to decide what Error Handling to do with failure responses and
expirations.
Batch or Real-time a)  A batch file is received, but
individual events are expected
by the backend system
b)  Individual events are received,
but a batch file must be
delivered to the provider
a)  Some form of Batch Splitter pattern is required.
b)  Some form of Batch Aggregator is required.
In either case, wider Batch Processing patterns may be required
to manage the batch level transactions.
<Provider><Requester> Differences in
Interface Characteristics
IBM Software Group
© 2013 IBM Corporation55
How would we resolve differences in Characteristics?
Performance (Efficiency)
Characteristic Example Conflict Resolution options
Response times Requester sends asynchronous requests
in clumps. Provider’s response times slow
exponentially if more than 10 requests are
sent in parallel
Perform Flow Control to ensure only 10 requests to the backend
are ever made concurrently, storing up the other requests in a
Store and Forward style.
Throughput Requesters average 20 concurrent,
occasionally peak at 200 concurrent
synchronous requests. More than 50
concurrent requests to the provider cause
system outages.
Perform Throttling to ensure that no more than 50 concurrent
requests are ever in progress, if necessary rejecting the access
requests. Optionally only allow high Priority requests through if
the concurrency is greater than 30.
Availability
windows
The provider is not available from 5pm to
8:30am due to the length of overnight
batch runs, but requesters make requests
24/7
Store and forward the requests, implementing Flow Control to
ensure that the backend system isn’t overloaded when it comes
online in the morning.
Volumes Arrival of a batch file results in 20,000
messages, swamping the providers CPU.
Implement Flow Control and Store and Forward to control the
load.
Message Size Messages contain a 2Mb blob who’s
internal data is of no interest to the
process.
Use the Claimcheck pattern to detach and re-attach the data
outside of the process.
<Provider><Requester> Differences in
Interface Characteristics
IBM Software Group
© 2013 IBM Corporation56
How would we resolve differences in Characteristics?
Error Handling (Maintainability)
Characteristic Example Conflict Resolution options
Known
exception
conditions
Provider can respond with hard to interpret
error responses, some of which might be
business meaningful to the requester.
Implement and Error Handling strategy that intelligently maps
the system errors into business errors.
Error
management
capabilities
The provider has regular unexpected
outages, but re-try later in the day will
usually work ok. However, some errors are
poison messages that will never be
processed.
Use Failed Event Management to perform appropriate re-tries,
then off-lining of messages for later resolution so other
messages can be tried. Could be combined with Healthcheck to
avoid unnecessary re-try processing, and additionally with Store
and Forward to provide automated re-tries when the system is
available again.
Deferred error
conditions
A fire/forget request has failed
downstream, but the calling system is
unaware.
Use a Publish/Subscribe mechanism and Correlation to enable
the calling system to listen for intermediate messages notifying
failure, or use an Offline Error Handling strategy
<Provider><Requester> Differences in
Interface Characteristics
IBM Software Group
© 2013 IBM Corporation57
How would we resolve differences in Characteristics?
Technical Interface (Portability)
Characteristic Example Conflict Resolution options
Transport /
Protocols
Service exposed to requester as HTTP/
REST, but back end system interaction is
with MQ/XML.
Perform the Protocol Translation but be wary of the possible
error handling challenges. See Transactionality lecture and sync/
async switching.
Data formats Service is exposed as a SOAP message,
but the back end system requires a
copybook.
Use the Data Handler pattern to resolve the difference.
<Provider><Requester> Differences in
Interface Characteristics
IBM Software Group
© 2013 IBM Corporation58
Where do functional orchestration patterns typically come from?
Evolving to Straight Through Processing (STP)
§  What the business consider to be an important step in a process
today, once automated, may become irrelevant to them.
§  The granularity of relevant business steps changes over time.
§  Example: Tallying up receipts from multiple stores, processing
invoices, route planning (travel agents etc. now replaced by internet
booking, and GPS). These things were primary operational costs in
the past, but become almost irrelevant now.
§  STP may turn a business process into a single step. Difference is that
we used to do this automation in a single system. Now the functional
areas of the business covered by multiple systems so automation now
requires multiple system orchestration.
IBM Software Group
© 2013 IBM Corporation59
Progressive process optimisation – “The journey is the goal”
Flow automation
Task automation
Straight through
processing
Manual process
“Filling in the
whitespace
between systems”
IBM Software Group
© 2013 IBM Corporation60
What is STP?
§  STP = “Straight Through Processing” – Typically a re-design
– The typical primary goal of STP is to increase throughput. The primary way to do
this is removal of humans from a process. This requires both flow and task
automation and also significant re-engineering.
– If the end goal is STP, you must design for this from the start in every aspect from
the way you re-engineer the flow, the services you make available to automate the
tasks to the way you implement security and so on..
§  STP = “Fully automated?” – Rarely
– STPs are rarely completely automated for every path through the process, but
should be automated on the most commonly traversed paths. Most have rarely
occurring edge cases that are still handled manually.
– Exception cases typically become exponentially harder to automate as you cater to
more diverse and rare circumstances. It is critically important to evaluate the
business benefit of each additional automated path.
Request
Account
Create
Account
Customer
Notify
Customer
System Activate
Account
STP

Impact 2013 2971 - Fundamental integration and service patterns

  • 1.
    © 2013 IBMCorporation Fundamental Integration and Service Patterns Kim Clark (kim.clark@uk.ibm.com), IBM UK Brian Petrini (petrini@us.ibm.com), IBM US TSS-2971
  • 2.
    IBM Software Group ©2013 IBM Corporation2 Objective Improve consistency of integration implementations §  Do you have a common language for integration characteristics and patterns shared between the architects, designers, and implementers? §  Can you mechanically assess the patterns required for integration and SOA in a given solution? §  Where does orchestration fit within the layers of an enterprise architecture?
  • 3.
    IBM Software Group ©2013 IBM Corporation3 Contents § Capturing interface complexity § Basic integration pattern evolution § What differentiates the SOA patterns § Categorizing orchestration
  • 4.
    IBM Software Group ©2013 IBM Corporation4 Example integration challenges from projects §  The service must appear event driven, but actually is a batch process on the back end §  We can only make 10 requests per hour to the back end, but can contain as many events in a single request as you like. §  Connection pooling is required but we want to preserve the identity of the caller §  The data format is “similar” to Comma Separated Values §  We must never call the back end system when it is down. The availability of the backend system can be determined by the xxx function call. §  We don’t know what the request is until we inspect various aspects of the message header and body. In some cases even the data format is unknown at this stage. §  Due to optimistic locking, the backend system requires the exact timestamp/rowid that was returned in the retrieve at the beginning of the business process. §  For testing, we need to be able to wire in our (proprietary) test harness mechanism §  We have written our own security mechanism §  Any changes to code require a lengthy validation process. We want everything possible to be configurable. §  The backend system is often not available. Retries should happen automatically and should not be considered an error condition. §  We used powerful features of XML Schema in definition of our object model. §  We have our own integration framework. Most of the work is done by a few common classes and applications. New services are added via configuration rather than code. §  Due to acquisitions, customer accounts are spread across multiple systems. We need to provide a unified customer view §  The adapter was missing one feature that we needed, so we’ve decided to integrate using custom code instead. §  We only want to send the changes/deltas to the back end system, not the whole original message
  • 5.
    IBM Software Group ©2013 IBM Corporation5 Characterising the interface Requester Provider Interface Characteristics Integrity Security Reliability Error handling Data Technical interface Interaction type Performance Capturing integration complexity for BPM and SOA solutions http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
  • 6.
    IBM Software Group ©2013 IBM Corporation6 Interface Characteristics Data Principal data objects Operation/function Read or change Request/response objects Technical Interface Transport Protocol Data format Interaction type Request-response or fire-forget Thread-blocking or asynchronous Batch or individual Performance Response times Throughput Volumes Concurrency Message size Integrity Validation Transactionality Statefullness Event Sequence Idempotence Security Identity/Authentication Authorisation Data Ownership Privacy Reliability Availability Delivery assurance Error Handling Error Management capabilities Known exception conditions http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
  • 7.
    IBM Software Group ©2013 IBM Corporation7 Solution Context Diagram with Integration Detail Process OrderBilling System Data Warehouse Credit Checking Shipping Product Catalogue Order Management Printing Order (JDBC) Customer/Credit Rating (Web Service/HTTP) Order Confirmation (Web service/JMS) Order Summary (JDBC) Customer/Order (Flat file, batch) Customer/Order (Flat file, XML) Product Details (RMI/IIOP) Order Details (WebSphere MQ) Customer Relationship Managemen t Customer Relationship Management Interface Characteristics
  • 8.
    IBM Software Group ©2013 IBM Corporation8 Resolving differences in interface characteristics Interface Characteristics Integrity Security Reliability Error handling Data Technical interface Interaction type Performance Interface Characteristics Integrity Security Reliability Error handling Data Technical interface Interaction type Performance Integration is about handling the differences between requester and provider Integration Patterns
  • 9.
    IBM Software Group ©2013 IBM Corporation9 Evolving Integration Design Patterns – a sample §  Data handling §  Data model translation §  Data synchronisation §  Publish subscribe §  Routing §  Content based routing §  Data enrichment §  Protocol and transport translation §  Large object management §  Correlation §  Assured delivery §  Canonical data model §  Relationships/cross referencing §  Once only delivery §  Scatter gather §  Aggregation §  Store and forward §  Flow control/throttling §  Service exposure §  Failed event management §  Idempotence resolution §  Retry §  Health check §  Prioritization §  Optimistic/pessimistic locking §  Event sequencing §  Verb conversion §  Existence checking §  Compensation §  Batch processing (various) §  Command controller (various) §  Error handling (various) §  Composition (various) §  Orchestration (various) §  …many more The “EAI Patterns” book (http://www.eaipatterns.com/toc.html) covers the initial set of primarily message based integration patterns, many of which have now been productised. This list extends into the next level of complexity in integration patterns.
  • 10.
    IBM Software Group ©2013 IBM Corporation10 Contents § Capturing interface complexity § Basic integration pattern evolution § What differentiates the SOA patterns § Categorizing orchestration
  • 11.
    IBM Software Group ©2013 IBM Corporation11 Point to point integration – connection spaghetti Operational Systems (Applications & Data) Requesters
  • 12.
    IBM Software Group ©2013 IBM Corporation12 Capabilities required in data point to point integration Adaptation Connection Management Application Programming Interface Protocol conversion Transport communication Data Handling Requester System Provider System Adaptatio n code Adaptatio n code Interaction Framework
  • 13.
    IBM Software Group ©2013 IBM Corporation1313 11/14/13 Service and Integration Maturity Hub and Spoke architecture with basic one to one integration Operational Systems (Applications & Data) Requesters Integration Hub Adapter Adapter Adapter Adapter AdapterAdapter Adapter Adapter One-to-one
  • 14.
    IBM Software Group ©2013 IBM Corporation14 Patterns/capabilities for hub-based basic one to one integration Canonical Integration Integration Hub Adapter Adapter Adaptation Connection Management Application Programming Interface Protocol conversion Transport communication Data Handling Interaction Framework Data Translation
  • 15.
    IBM Software Group ©2013 IBM Corporation15 Interface Characteristics driving interaction styles Data Principal data objects Operation/function Read or change Request/response objects Technical Interface Transport Protocol Data format Interaction type Request-response or fire-forget Thread-blocking or asynchronous Batch or individual Performance Response times Throughput Volumes Concurrency Message size Integrity Validation Transactionality Statefullness Event Sequence Idempotence Security Identity/Authentication Authorisation Data Ownership Privacy Reliability Availability Delivery assurance Error Handling Error Management capabilities Known exception conditions http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
  • 16.
    IBM Software Group ©2013 IBM Corporation16 Integration Hub Hub and spoke interaction styles – basic one to one Integration Hub AdapterAdapter AdapterAdapter 1) Non-blocking (message-based) transport (shown using an open arrowhead) 2) Blocking (synchronous) transport (shown using a closed arrowhead)
  • 17.
    IBM Software Group ©2013 IBM Corporation17 Basic Interaction Types ProviderRequester getCustomer(CustomerID) returns Customer ProviderRequester submitOrder(Order)a)  Fire and forget, non-blocking transport ProviderRequester getCustomer(CustomerID) returns Customer b) Request-response, blocking transport c) Request-response, non-blocking transport A messaging transport is used. The request is “one-way” sending data to the provider, but with no response. The requester need only wait for the message to be received by the transport – i.e. it is non-blocking. A synchronous transport is used. The requester requires response data, and must wait for the provider to respond. The provider must be available at the time of the request and must process the request immediately. A messaging transport is used. The requester need only wait for the message to be received by the transport. It is then freed up to do other work. It must however provide a way in which it can receive messages from a response queue at a later time and be able to correlate this with the original request.
  • 18.
    IBM Software Group ©2013 IBM Corporation18 Advanced Interaction Types ProviderRequester getCustomer(CustomerID) returns Customer e) Request-response blocking caller API, non-blocking transport ProviderRequester getCustomer(CustomerID) Callback with Customer f) Request-response by call-back, using blocking transport ProviderRequester submitOrder(OrderID)d) Request with acknowledgement, blocking transport returns Acknowledgement A synchronous transport is used. The provider must be present to receive the request, but it provides only an acknowledgement that the action will be performed at a later time. This is similar to fire-forget as the actual business task required by the requester is performed after the acknowledgement is returned, but this is more tightly coupled. This is a hybrid between transport types. A messaging transport is used to communicate with the provider, but the requestor interacts with the messaging using a synchronous API. Many messaging transports provide this type of API to simplify requester interaction with the messaging layer. The provider can process the message at its convenience but the requester is blocked waiting. A synchronous transport (such as HTTP) is used to make two separate interactions for request and call-back. Each interaction individually is blocking, but releases the block as soon as an acknowledgement is received. This is similar to request response non-blocking but the requester and provider interact more directly. returns Acknowledgement returns Acknowledgement
  • 19.
    IBM Software Group ©2013 IBM Corporation1919 11/14/13 Service and Integration Maturity Hub and Spoke architecture typical of Enterprise Application Integration (EAI) Operational Systems (Applications & Data) Requesters Integration Hub Adapter Adapter Adapter Adapter AdapterAdapter Adapter Adapter One-to-many
  • 20.
    IBM Software Group ©2013 IBM Corporation20 Patterns/capabilities for basic multi-provider integration Integration Hub Adapter Adapter Adapter Adaptation Connection Management Application Programming Interface Protocol conversion Transport communication Data Handling Interaction Framework Canonical Integration Data Translation Routing/Distribution
  • 21.
    IBM Software Group ©2013 IBM Corporation21 Integration Hub Integration Hub Hub and spoke interaction styles – brokerage Adapter Adapter Adapter Adapter Adapter Adapter OR AND a) Routing b) Distribution
  • 22.
    IBM Software Group ©2013 IBM Corporation22 Patterns/capabilities for advanced multi-provider integration Integration Hub Adapter Adapter Adapter Adaptation Connection Management Application Programming Interface Protocol conversion Transport communication Data Handling Interaction Framework Canonical Integration Data Translation Routing/Distribution Orchestration
  • 23.
    IBM Software Group ©2013 IBM Corporation23 Hub and spoke interaction styles – orchestration A selection of the possible types Adapter Adapter Adapter Read-only orchestration Parallel aggregation Updating orchestration Stateful orchestration Adapter Adapter Adapter Adapter Adapter Adapter Adapter Adapter Adapter
  • 24.
    IBM Software Group ©2013 IBM Corporation24 The importance of orchestration types §  Orchestration is not new. It has been occurring in applications and middleware solutions for decades. §  Orchestration is becoming a critical architectural decision point in large enterprises due to the increased need to automate functionality distributed across an increasingly larger number of enterprise systems. §  Categorizing the different types of orchestration is critical to ensure it: – occurs in the right layers within the architecture – is performed by products with the right capabilities – is visible and changeable by the right audience
  • 25.
    IBM Software Group ©2013 IBM Corporation25 A high level “interaction pattern” notation for integration? §  Provides a way to describe the high level intent of an integration solution without being bound to technology §  This is a subset of the overall notation based on what we’ve used in the presentation so far. §  It is not a standardised notation, but it does borrow from notations that have come before it. (e.g. www.eaipatterns.com) §  The notation would need to be specialised to a given environment. Read-only orchestration Parallel aggregation Multi-invocation Brokerage Route Distribute Updating orchestration Stateful orchestration Synchronous “request/reply interaction One-way “fire/forget” interaction Direct
  • 26.
    IBM Software Group ©2013 IBM Corporation26 Technology agnostic high-level design notation for integration §  Learnable sub-set of the patterns the technology should be used for. §  Common language between solution design and service design. §  Highlights when we step beyond regularly used capabilities §  Maps to specific, documented implementation standards §  Enables pattern based design and development §  Downstream benefits in monitoring, diagnostics and dependency analysis
  • 27.
    IBM Software Group ©2013 IBM Corporation27 Orchestration/Composition in the integration layer Operational Systems (Applications & Data) Integration Requesters Data synchronization Microflow Stored procedure Straight-through processing
  • 28.
    IBM Software Group ©2013 IBM Corporation28 Contents § Capturing interface complexity § Basic integration pattern evolution § What differentiates the SOA patterns § Categorizing orchestration
  • 29.
    IBM Software Group ©2013 IBM Corporation29 Service Oriented Architecture (SOA) Reference Architecture https://collaboration.opengroup.org/projects/soa-ref-arch
  • 30.
    IBM Software Group ©2013 IBM Corporation30 Silo Services Composite Services Virtualized Services Dynamically Re-Configurable ServicesComponentizedIntegrated Level 1 Level 4 Level 5 Level 6 Level 7Level 3Level 2 Applications Methods Organization Infrastructure Architecture Business View Modules Services Process Integration via Services Dynamic Application Assembly ComponentsObjects Structured Analysis & Design Service Oriented Modeling Service Oriented Modeling Grammar Oriented Modeling Component Based Development Object Oriented Modeling Ad hoc IT Governance Emerging SOA Governance SOA and IT Governance Alignment SOA and IT Governance Alignment Ad hoc IT Governance Ad hoc IT Governance SOA and IT Governance Alignment Service Oriented Modeling Process Integration via Services Platform Specific Platform Specific Platform Neutral Dynamic Sense & Respond Platform Specific Platform Specific Monolithic Architecture Emerging SOA Grid Enabled SOA Dynamically Re- Configurable Architecture Component Architecture Layered Architecture SOA Platform Specific Function Oriented Service Oriented Service Oriented Service Oriented Function Oriented Function Oriented Service Oriented Open Service Integration Maturity Model (OSIMM) https://collaboration.opengroup.org/projects/osimm
  • 31.
    IBM Software Group ©2013 IBM Corporation31 Service Oriented Landscape Introducing standardised service exposure Operational Systems (Applications & Data) Requesters Integration Hub Service Exposure Gateway Adapter AdapterAdapter
  • 32.
    IBM Software Group ©2013 IBM Corporation32 Capabilities to components – service exposure Integration Hub Adapter Adapter Adaptation Connection Management Application Programming Interface Protocol conversion Transport communication Data Handling Interaction Framework Canonical Integration Data Translation Routing/Distribution Orchestration Service Exposure Gateway Service Exposure Traffic Management Security Virtualisation Visibility
  • 33.
    IBM Software Group ©2013 IBM Corporation33 Contents § Capturing interface complexity § Basic integration pattern evolution § What differentiates the SOA patterns § Categorizing orchestration
  • 34.
    IBM Software Group ©2013 IBM Corporation34 BPM in a Service Oriented Architecture Operational Systems (Applications & Data) Requesters Integration Hub Adapter AdapterAdapter Business Process Manager Service Exposure Gateway So where should we do orchestration?
  • 35.
    IBM Software Group ©2013 IBM Corporation35 What highlights a “business process” in a business process management solution? §  Performing the process provides value to the business §  The process follows a relatively structured path §  The process contains individually business relevant steps §  The steps within the process are performed by multiple roles/teams. §  Business relevant data flows through the process §  The process changes over time as a result of changes in the business Create Account Capture Details Send Documents Sign Documents Activate Account Customer Call centre Back office Notify Customer New revenue! Existing customer New customer -- ------------------------------- - -- ------------------------------- - -- ------------------------------- - -- ------------------------------- - -- ------------------------------- - -- ------------------------------- -
  • 36.
    IBM Software Group ©2013 IBM Corporation36 Orchestration/Composition Where could it occur / Where should it occur? Service Exposure Operational Systems (Applications & Data) Integration Consumers Business Process Data synchronization Microflow In-app. workflow Screenflow/ page navigation Stored procedure Straight-through processing Business process
  • 37.
    IBM Software Group ©2013 IBM Corporation37 Single Transaction for all invocations Multiple Transactions across invocations Human Tasks Terminology: Orchestration – “Composition” vs. “Process”? §  Appear to the business as a single step. §  Do not include human interaction from the business. Business ProcessComposition §  Take long enough that the business need to be aware of their intermediate in-progress states. §  Include human interaction, or interaction with slow responding systems. Orchestration (A sequence of “invocations” of systems, or humans) “Process Implementation Types: Patterns based design for process based solutions” http://www.ibm.com/developerworks/websphere/library/techarticles/1004_clark/1004_clark.html
  • 38.
    IBM Software Group ©2013 IBM Corporation38 Types of orchestration in relation to transactionality Do any of the requests perform critical changes*? No Aggregation Enriched update Yes Can all critical changes* be performed in one transaction? State-free Orchestration Stateful Orchestration Yes No How many critical changes*? =1 >1 *Definition: “Critical Change” Any request that performs a change (create, update, delete) that MUST be resolved in the case of a failure, either with a transactional rollback, or with compensatory actions if the update has already been committed. Non-transactional Isolated transaction Global transaction Multi-transaction
  • 39.
    IBM Software Group ©2013 IBM Corporation39 Types of Orchestration: Process vs. Composition §  Process – Makes calls to mature high level services – Often triggered (i.e. one way call) rather than invoked as a two way call – Where it is invoked as a two way interaction, the caller is typically asynchronous (i.e. not a user) and therefore the service level agreement is throughput based rather than response time based – Stateful persistence of the steps in the process – Events can correlate with the running process – Often involves human interaction to perform some tasks within the process §  Composition – Grouping of relatively granular interactions – Response time is the primary driver for the service level agreement – Common for aggregation functions – Some or all the granular interactions may not themselves be exposed as re-usable services – Generally state free – Never involves human interaction during the composition
  • 40.
    IBM Software Group ©2013 IBM Corporation40 Integration orchestration vs. business orchestration A “litmus test” §  Imagine an ideal enterprise information system. – It is a single system of record for all business data. – All the data is normalized. – It has appropriate APIs for every type of data access required. – It is infinitely fast and completely reliable. §  In this ideal system, if you find yourself doing multiple actions, you are performing business orchestration. §  Any orchestration done to manage the fact that the real systems are not as perfect as the ideal system above, is integration orchestration.
  • 41.
    IBM Software Group ©2013 IBM Corporation41 Interface Characteristics that drive functional orchestration Data Principal data objects Operation/function Read or change Request/response objects Technical Interface Transport Protocol Data format Interaction type Request-response or fire-forget Thread-blocking or asynchronous Batch or individual Performance Response times Throughput Volumes Concurrency Message size Integrity Validation Transactionality Statefullness Event Sequence Idempotence Security Identity/Authentication Authorisation Data Ownership Privacy Reliability Availability Delivery assurance Error Handling Error Management capabilities Known exception conditions http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
  • 42.
    IBM Software Group ©2013 IBM Corporation42 Common functional orchestration patterns §  Data synchronization §  Aggregation §  Enriched updates §  Straight through processing §  Complex error handling §  Compensation §  …and an infinite number more
  • 43.
    IBM Software Group ©2013 IBM Corporation43 Interface Characteristics that drive infrastructural orchestration Data Principal data objects Operation/function Read or change Request/response objects Technical Interface Transport Protocol Data format Interaction type Request-response or fire-forget Thread-blocking or asynchronous Batch or individual Performance Response times Throughput Volumes Concurrency Message size Integrity Validation Transactionality Statefullness Event Sequence Idempotence Security Identity/Authentication Authorisation Data Ownership Privacy Reliability Availability Delivery assurance Error Handling Error Management capabilities Known exception conditions http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
  • 44.
    IBM Software Group ©2013 IBM Corporation44 Common infrastructural orchestration patterns §  Data Consistency – Once only delivery – Optimistic/pessimistic locking – Event sequencing – Idempotence resolution §  Large object – Claim check – Move by command – Response by reference §  Reliability – Failed event management – Retry – Health check – Store and forward §  Batch management – Batch splitter – Batch processing – Batch aggregator Infrastructural integration orchestration pattern are those that concern the completion of one primary request to one system, and are therefore essentially functionally agnostic. These patterns are more likely to be productized.
  • 45.
    IBM Software Group ©2013 IBM Corporation45 Summary of dimensions for categorising orchestration §  Composition vs. process –  Beware. Loose terms, used relatively inconsistently. §  Human involvement vs. system only –  Are humans involved in the happy path? –  Workforce management capabilities are critical §  Single transaction vs. multi-transaction –  Consider the number of “critical changes” performed –  Directs us to the correct implementation technology §  Integration orchestration vs. business orchestration –  Try the “litmus test” of whether you would need multiple requests on a perfect system? –  Who owns the requirements? Who can change them? §  Infrastructural orchestration vs. functional orchestration? –  Is it only one primary function on one system? –  Is there a product feature that provides this capability?
  • 46.
    IBM Software Group ©2013 IBM Corporation46 Interface Characteristics relating to cross cutting concerns Data Principal data objects Operation/function Read or change Request/response objects Technical Interface Transport Protocol Data format Interaction type Request-response or fire-forget Thread-blocking or asynchronous Batch or individual Performance Response times Throughput Volumes Concurrency Message size Integrity Validation Transactionality Statefullness Event Sequence Idempotence Security Identity/Authentication Authorisation Data Ownership Privacy Reliability Availability Delivery assurance Error Handling Error Management capabilities Known exception conditions http://www.ibm.com/developerworks/websphere/techjournal/1112_clark/1112_clark.html
  • 47.
    IBM Software Group ©2013 IBM Corporation47 Key messages §  Interface characteristics provide a mechanical way to assess the required integration patterns. §  A standard integration vocabulary and notation improve communication between architect, designer and implementer. §  Categorization of orchestration enables correct placement within the architecture. §  Formalization of integration improves consistency, and velocity in implementation.
  • 48.
    IBM Software Group ©2013 IBM Corporation48 Thank You Merci Grazie Gracias Obrigado Danke Japanese English French Russian GermanItalian Spanish Brazilian Portuguese Arabic Traditional Chinese Simplified Chinese Thai
  • 49.
    © 2013 IBMCorporation IBM Software Group Background
  • 50.
    IBM Software Group ©2013 IBM Corporation50 How would we resolve differences in Characteristics? Data (Functionality) <Provider><Requester> Characteristic Example Conflict Resolution options Principal data objects The interface does not respond with all the required data Data Aggregation, Data Enrichment: More than one operation call may be required, and the resulting data aggregated. Request/ response objects The request/response objects are not the same structure as the objects in the requester Mapping: The requesters data must be mapped to/from the structure of the provider Operation/ function The provider does not offer an operation that performs the exact action required by the requester. Orchestration/Composition, or Command Pattern. A combination of existing operations must be found that provide the same functionality. If not, a new operation must be made available by the provider, or else the interface is untenable. Differences in Interface Characteristics
  • 51.
    IBM Software Group ©2013 IBM Corporation51 How would we resolve differences in Characteristics? Integrity (Functionality) Characteristic Example Conflict Resolution options Validation The requester’s request, sometimes provides data that is considered invalid to the requester, or indeed whether the response data is valid. We will need to perform either Data Enrichment, or Data Cleansing on the incoming data. Where the data cannot be sufficiently enhanced, we should provide a meaningful data validation error. Transactionality The providers interface cannot be included in a wider transaction, but the requester needs to ensure consistency between this invocation and others Without transactionality, an option for consistency would be Compensation. It may be sufficient to simply put in place Delivery Assurance to ensure that the data is “eventually” consistent. Statefullness The request requires of data from a previous call (such as a session ID, or lock ID), but the requester does not have this data. The previous call could be combined with this one (Orchestration/Command Pattern), or the required data could be stored on the previous call and looked up for this one (Data Enrichment). A locking strategy could be converted from ID based to time based such that an id is no longer required. Event Sequence The provide needs updates to be applied in order, but the requester sometimes sends the events out of sequence. A grouping sequencer/re-sequencer Event Sequencing pattern must be applied. Idempotence The requester may send more than one request through for the same event, but this will produce duplicates in the provider. The incoming requests must be de-duplicated such that Idempotence is offered by the provider. <Provider><Requester> Differences in Interface Characteristics
  • 52.
    IBM Software Group ©2013 IBM Corporation52 How would we resolve differences in Characteristics? Security (Functionality) Characteristic Example Conflict Resolution options Data Ownership The requester requesting an update, is not allowed to make changes to all parts of the incoming data model. The incoming object should be thinned appropriately (Mapping) such that only selective updates occur. It might be considered an error if the data that the requester passes, but is not allowed to change, is different to that found in the provider. In this case, Orchestration/Composition would be required in order to perform a retrieve or data prior to update. Privacy Some of the data that the provider responds with is restricted, and should not be made available to the requester. The restricted data must be removed from the response (Mapping). <Provider><Requester> Differences in Interface Characteristics
  • 53.
    IBM Software Group ©2013 IBM Corporation53 How would we resolve differences in Characteristics? Reliability Characteristic Example Conflict Resolution options Mean time between failures The provider’s availability is not sufficient for the requesters needs We could put in place Protocol and Transport Translation to an asynchronous medium, and a/or a Re-Try mechanism to make the provide appear more reliable. Maintenance windows The provider is regularly shutdown during a time when the requester is expected to be making requests. We will need a Store and Forward mechanism to ensure that the requester can continue to make requests even when the system is down. A Healthcheck would allow us to automatically know when to re-submit stored events. Delivery Assurance The requester needs to be confident that once a request has been submitted, it will be actioned as some point in the near future, and it will never be lost. On the simplest level, we need to ensure that the service is provided over a reliable transport, which may therefore require Protocol and Transport Translation. However, it may be that the requester cannot talk over such a transport, so a more complex conversational interaction may be required, which may in include the use of Idempotence, Re- Tries, Store and Forward, and even Publish/Subscribe to provide acknowledgements/responses back to a decoupled requester. <Provider><Requester> Differences in Interface Characteristics
  • 54.
    IBM Software Group ©2013 IBM Corporation54 How would we resolve differences in Characteristics? Interaction Type (Usability) Characteristic Example Conflict Resolution options Synchronous or Asynchronous Requester talks web services, but provider exposes over MQ. Simplistically this is just Protocol Translation. However, Synch- >Async conversion comes with a number of complex side effects in terms of Error Handling, and Idempotence, and Once Only Delivery, to name but a few. See Transactionality lecture for more details. Request/Response or Fire/Forget The requester may want to receive a specific acknowledgement confirming receipt of the request. The provider may be a one way interface. This is the simplest possible form of Orchestration/Composition. A more interesting Orchestration/Composition would be the opposite case where the requester was fire/forget and the provider Request/Response. Careful thought would be needed to decide what Error Handling to do with failure responses and expirations. Batch or Real-time a)  A batch file is received, but individual events are expected by the backend system b)  Individual events are received, but a batch file must be delivered to the provider a)  Some form of Batch Splitter pattern is required. b)  Some form of Batch Aggregator is required. In either case, wider Batch Processing patterns may be required to manage the batch level transactions. <Provider><Requester> Differences in Interface Characteristics
  • 55.
    IBM Software Group ©2013 IBM Corporation55 How would we resolve differences in Characteristics? Performance (Efficiency) Characteristic Example Conflict Resolution options Response times Requester sends asynchronous requests in clumps. Provider’s response times slow exponentially if more than 10 requests are sent in parallel Perform Flow Control to ensure only 10 requests to the backend are ever made concurrently, storing up the other requests in a Store and Forward style. Throughput Requesters average 20 concurrent, occasionally peak at 200 concurrent synchronous requests. More than 50 concurrent requests to the provider cause system outages. Perform Throttling to ensure that no more than 50 concurrent requests are ever in progress, if necessary rejecting the access requests. Optionally only allow high Priority requests through if the concurrency is greater than 30. Availability windows The provider is not available from 5pm to 8:30am due to the length of overnight batch runs, but requesters make requests 24/7 Store and forward the requests, implementing Flow Control to ensure that the backend system isn’t overloaded when it comes online in the morning. Volumes Arrival of a batch file results in 20,000 messages, swamping the providers CPU. Implement Flow Control and Store and Forward to control the load. Message Size Messages contain a 2Mb blob who’s internal data is of no interest to the process. Use the Claimcheck pattern to detach and re-attach the data outside of the process. <Provider><Requester> Differences in Interface Characteristics
  • 56.
    IBM Software Group ©2013 IBM Corporation56 How would we resolve differences in Characteristics? Error Handling (Maintainability) Characteristic Example Conflict Resolution options Known exception conditions Provider can respond with hard to interpret error responses, some of which might be business meaningful to the requester. Implement and Error Handling strategy that intelligently maps the system errors into business errors. Error management capabilities The provider has regular unexpected outages, but re-try later in the day will usually work ok. However, some errors are poison messages that will never be processed. Use Failed Event Management to perform appropriate re-tries, then off-lining of messages for later resolution so other messages can be tried. Could be combined with Healthcheck to avoid unnecessary re-try processing, and additionally with Store and Forward to provide automated re-tries when the system is available again. Deferred error conditions A fire/forget request has failed downstream, but the calling system is unaware. Use a Publish/Subscribe mechanism and Correlation to enable the calling system to listen for intermediate messages notifying failure, or use an Offline Error Handling strategy <Provider><Requester> Differences in Interface Characteristics
  • 57.
    IBM Software Group ©2013 IBM Corporation57 How would we resolve differences in Characteristics? Technical Interface (Portability) Characteristic Example Conflict Resolution options Transport / Protocols Service exposed to requester as HTTP/ REST, but back end system interaction is with MQ/XML. Perform the Protocol Translation but be wary of the possible error handling challenges. See Transactionality lecture and sync/ async switching. Data formats Service is exposed as a SOAP message, but the back end system requires a copybook. Use the Data Handler pattern to resolve the difference. <Provider><Requester> Differences in Interface Characteristics
  • 58.
    IBM Software Group ©2013 IBM Corporation58 Where do functional orchestration patterns typically come from? Evolving to Straight Through Processing (STP) §  What the business consider to be an important step in a process today, once automated, may become irrelevant to them. §  The granularity of relevant business steps changes over time. §  Example: Tallying up receipts from multiple stores, processing invoices, route planning (travel agents etc. now replaced by internet booking, and GPS). These things were primary operational costs in the past, but become almost irrelevant now. §  STP may turn a business process into a single step. Difference is that we used to do this automation in a single system. Now the functional areas of the business covered by multiple systems so automation now requires multiple system orchestration.
  • 59.
    IBM Software Group ©2013 IBM Corporation59 Progressive process optimisation – “The journey is the goal” Flow automation Task automation Straight through processing Manual process “Filling in the whitespace between systems”
  • 60.
    IBM Software Group ©2013 IBM Corporation60 What is STP? §  STP = “Straight Through Processing” – Typically a re-design – The typical primary goal of STP is to increase throughput. The primary way to do this is removal of humans from a process. This requires both flow and task automation and also significant re-engineering. – If the end goal is STP, you must design for this from the start in every aspect from the way you re-engineer the flow, the services you make available to automate the tasks to the way you implement security and so on.. §  STP = “Fully automated?” – Rarely – STPs are rarely completely automated for every path through the process, but should be automated on the most commonly traversed paths. Most have rarely occurring edge cases that are still handled manually. – Exception cases typically become exponentially harder to automate as you cater to more diverse and rare circumstances. It is critically important to evaluate the business benefit of each additional automated path. Request Account Create Account Customer Notify Customer System Activate Account STP