How To Develop Applications For Business Integration André Tost

Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
How To Develop Applications For
Business Integration
Pulling J2EE, SOA and Web Services Together
André Tost
IBM Software Group
atost@us.ibm.com
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 1
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Agenda
ƒ Service Oriented Architectures
¾ Vision and Reality
¾ Web Services versus SOA
ƒ Introduction to Enterprise Service Bus
¾ loose coupling
¾ patterns
ƒ Programming Model Elements
¾ ESB runtime architecture
ƒ SOA Component Model
¾
¾
¾
¾
J2EE anyone?? —> JSR109
SDO
Service Components
ESB Mediation
ƒ Business Process Abstraction
¾ BPEL
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 2
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Agenda
ƒ Service Oriented Architectures
¾ Vision and Reality
¾ Web Services versus SOA
ƒ Introduction to Enterprise Service Bus
¾ loose coupling
¾ patterns
ƒ Programming Model Elements
¾ ESB runtime architecture
ƒ SOA Component Model
¾
¾
¾
¾
J2EE anyone?? —> JSR109
SDO
Service Components
ESB Mediation
ƒ Business Process Abstraction
¾ BPEL
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 3
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Service Oriented Architecture
ƒ Application functionality contained
in building blocks
ƒ Create complete applications by
connecting blocks together
ƒ Model business relationships by
providing blocks to others and
using others' blocks
ƒ Building blocks are services
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 4
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Service Oriented Architecture
ƒ A Service Oriented Architecture enables flexible connectivity of applications or
resources by
¾ Representing every application or resource as a service with a standardized interface
¾ Enabling them to exchange structured information (messages, documents, ‘business
objects’)
¾ Mediating the message exchange through a service integration bus
¾ Providing on-ramps to the bus for legacy application environments
ƒ This allows quick combination of new and existing applications to address
changing business needs and improve operational effectiveness by managing
the topology of the application ‘network’
ƒ The SOA infrastructure is also used to facilitate the management of business
performance and quality of service
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 5
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
The Beginning:
Roles & Functions
Set of industry-standard approaches to enable simplified
connection of applications
Service Broker
• A searchable repository of service descriptions
• Service Providers publish their services
• Service requesters find services
• Service broker match providers with requesters
Provider
nd
Fi
h
lis
ub
P
Pu
bl
is
Fi
h
nd
Broker
Bind
Requester
Service Provider
• Provide applications as WebService
• Publish their services
• Find service request to develop
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Service Requester
• A client who needs a service
• Find service
• Publish their needs
Page 6
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
How It Works...
SOAP Processor
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
„Wrapper“ / „DD“
XML
Parser
API (Java, C#, ...)
HTTP
HTTP
API (Java, C#, ...)
Proxy
Client
XML
Parser
SOAP Processor
Server„Object“
Page 7
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Characteristics of Service
Oriented Architecture
Reduced interdependency between
software assets.
Service Oriented
Architecture
Standards Based
Allows individual
software assets to
become building blocks
that can be reused in
developing other
applications (application
assembly).
Shared services
Loosely Coupled
Leverages open
standards to represent
software assets as
services (XML, SOAP,
WSDL, UDDI, …).
Federated Control
Federated and policy based security,
management and deployment.
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 8
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
A Couple of Best Practices
Services are defined
using explicit interfaces
that are independent of
service implementations,
and that both service
requestors and service
providers agree to.
A service encapsulates a well-defined
invoke-able unit of business function,
and exists either to provide information
or to facilitate a change of business
data from one valid and consistent
state to another.
Services neither
Service A
remember the last
thing they were asked
to do nor care what
the next is, and are not
dependent on the context or
state of other services.
Service B
Service C
Services should be invokeable through defined
communication protocols that
stress interoperability and
location transparency.
Any dependencies between services should be
defined in terms of common business process,
function and data models.
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 9
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
The Art of Service Interface
Design
Few, large-grained interactions
Every interaction the same
Each interaction fufills one step
in a business process. There is
no shared process at a lower
level, and no shared state
between calls (only business
data)
Code API
Flexibility
Service API
Many, small-grained interactions
Service
Granularity
Lots of APIs
scope for variation
Balancing Act
between interactions
Code
APIs
Many interactions required to
complete one step in a
Complexity
business process.
Much shared
process and state in these
interactions
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Impact
Less frequent interaction, but
more data in each interaction
Less complex to change if one
aspect of the interaction must
change
All requestors must agree with
the provider about the way the
provider service works
Less complexity to understand
or coordinate if the requestor or
provider need to change
Process, state and data models
need only agree at the level of
shared business process
Page 10
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Agenda
ƒ Service Oriented Architectures
¾ Vision and Reality
¾ Web Services versus SOA
ƒ Introduction to Enterprise Service Bus
¾ loose coupling
¾ patterns
ƒ Programming Model Elements
¾ ESB runtime architecture
ƒ SOA Component Model
¾
¾
¾
¾
J2EE anyone?? —> JSR109
SDO
Service Components
ESB Mediation
ƒ Business Process Abstraction
¾ BPEL
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 11
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
“Loose Coupling”??
ƒ “Services are loosely coupled and invoked through communication protocols that stress
location transparency and interoperability.”
tightly coupled
capacitor
Received
signal
Source
signal
loosely coupled
capacitor
Source
signal
Received
signal
?
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 12
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Aspects of Service Interactions …
Location
Language
Data
Delivery
Format Assurance
Interaction
Semantic
State
Interface
Requester
Platform
Decoupled
Provider
Protocol
Time
Service
Security Version
?
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Service
Provider
Identity
Coupled
Page 13
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Coupling Styles
ƒ
ƒ
Coupled
−
−
Directly manipulated by service requester and provider application code.
e.g. business data model
Declared
−
−
Clients and providers declare matching behaviour in interfaces.
e.g. WS-Security
¾ Transformed
−
−
Specified in the service interface, but not manipulated by application code. Services
declare different characteristics but the service infrastructure can mediate between
requester and provider.
e.g. data format
¾ Negotiated
−
−
ƒ
Requester and provider interfaces declare a spectrum of behaviours, infrastructure
negotiates an agreed behaviour for each interaction.
e.g. proposed WS-Policy, service provider identified dynamically through UDDI
Decoupled
−
−
Entirely independent between client, provider and infrastructure.
e.g. platform independence through use of XML and HTTP
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 14
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Applying Coupling Styles to Aspects
of Service Interactions
Aspect
Coupling Style
Techniques
Semantic Interface
Coupled
Language
Decoupled
Platform
Decoupled
WSDL, Application code,
common objects, data
dictionary
Open standards, Web
Services, J2EE, HTTP,
XML
As above
Data Format
Declared or Transformed
Protocol
Declared or Transformed
Location
Decoupled
Service provider identity
or implementation
Declared, transformed or
negotiated
etc. ...
Time, Delivery Assurance,
Error Handling, Security,
Service Version, Interaction
State
etc ...
WSDL, XML, adaptors,
stylesheets, AD tools,
middleware
HTTP, SOAP, Middleware,
adaptors
Communication protocols,
HTTP, SOAP, middleware
Service routing,
middleware, "broker"s,
UDDI etc.
etc ...
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 15
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SOA in the Enterprise
As a counter-example, consider the
use of simple SOAP/HTTP wrappers
Existing component or components providing services (Legacy, Applications, EAI Middleware etc.)
SOAP/HTTP and WSDL leverage
URL addressing and the existing HTTP
and DNS infrastructure for Service
Oriented Architecture.
But they do not address
enterprise requirements for SOA:
Multiple qualities of service
Widespread integration and
interoperability
Transformations and mediations
Substitution of service
implementations
Critically, management of an SOA
“infrastructure” provided in this way
is distributed between service
endpoints and the existing
infrastructure.
Proprietary interface
Service Adaptor
Service Adaptor
Service Adaptor
Service Adaptor
WSDL / SOAP
Interface
WSDL / SOAP
Interface
WSDL / SOAP
Interface
WSDL / SOAP
Interface
DNS
Router
Internet or Intranet
DNS
Router
WSDL / SOAP
Interface
WSDL / SOAP
Interface
WSDL / SOAP
Interface
Service Client
Service Client
Service Client
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Service Bus Components
Page 16
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
“Enterprise Service Bus”
ƒ
Analysts describe a middleware capability …
¾ “…a new architecture that exploits Web Services, messaging middleware, intelligent routing and
transformation…” Roy Schulte, Gartner, Predicts 2003: Enterprise Service Buses Emerge
ƒ
Vendors talk about their low cost Java and Web Services “bus” solutions and contrast
them to “high cost, proprietary hub and spoke EAI middleware”.
¾ “Message brokers tend to be rather heavy duty and often require significant additional skills … In
contrast, an ESB is a pre-packaged SOA implementation ...” Steve Craggs, Best of Breed ESBs …
distributed by Polar Lake, Sonic, Fiorano, etc.
ƒ
IT shops have built their own … primarily using XML with EAI technology (e.g. message
brokers or adaptors) or HTTP.
ƒ
My view:
¾ ESB is a logical infrastructure component that can be described by patterns
¾ The ESB is defined by capabilities required to support SOA in the Enterprise in combination with
other integration styles (messages and events)
¾ The ESB provides a means to concentrate control and distribute topology
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 17
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
ESB Capabilities
Communications, e.g.
Service Interaction, e.g.
Integration, e.g.
Quality of Service, e.g.
Security, e.g.
Service Level, e.g.
Message Processing, e.g.
Management and Autonomic, e.g.
Modelling, e.g.
Infrastructure Intelligence, e.g.
Routing, addressing, protocols, pub/sub, async.
Database, legacy, middleware connectivity,
service aggregation, app server connectivity,
protocol transformation.
Authentication, authorisation, non-repudiation,
confidentiality, standards support
(WS-Security, Kerberos etc.)
Encoded logic, content-based logic, message
and data transformations, intermediaries etc..
Object modelling, common formats and
libraries, public vs. private etc..
Interface definition, service substitution,
messaging model, SOAP, WSDL, directories
Transactions, delivery assurance
Performance, throughput, availability,
scalability.
Service provisioning and registration, logging,
metering, monitoring, systems management
etc..
Business rules, policy driven behaviour, pattern
recognition, etc..
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 18
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Minimum ESB capabilities for SOA
ƒ If we require ESB to support our definition of SOA and add :
¾ The ESB provides the means to manage the service infrastructure and
the capability to operate in today’s distributed, heterogeneous
environment.
ƒ We can define a minimum capability ESB implementation:
Communication
ƒRouting and addressing services providing
location transparency.
ƒAn administration capability
ƒAt least one messaging paradigm (e.g.
request / response, pub/sub, etc.).·
ƒAt least one transport protocol that is or can
be made widely available.
Integration
ƒSupport for multiple means of
integration, e.g. Java 2 Connectors,
Web Services, etc.
Service Interaction
ƒService messaging and interfacing model.
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 19
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
ESB in Terms of Existing and
Future Technology
ƒ
We can position current and future technologies:
¾ “Whilst packaged ESB technologies will mature they are not the only way to
implement an ESB.”
¾ “SOAP/HTTP provides opportunistic integration capabilities, but not an ESB.”
¾ “ESB capabilities are available in existing products such as WebSphere Application
Server, Web Services Gateway or WebSphere Business Integration”.
ƒ
We can address some specific customer pain points:
¾ Many enterprises have implemented a bespoke “service bus”, often using
proprietary XML data models and MOM like WebSphere MQ.
¾ This definition of ESB does not mandate the use of Web Services.
¾ We can suggest enterprises evolve towards a more standard based approach
whilst retaining their investment in existing technology.
¾ The flexible definition is consistent with an incremental approach.
ƒ
We can respond to a range of requirements in the marketplace:
¾ We can include basic SOAP and JMS-based solutions, but also position more
sophisticated offerings.
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 20
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
“Distributed Bus” versus
“Centralized Broker”
Single Point of Control
Distributed Infrastructure
Service
Client
Service
Client
Service
Client
Service
Client
Service
Provider
Service
Client
<Hub>
Runtime Node
<Hub>
Service
Client
<Bus>ESB
Service
Client
Service
Provider
Service
Provider
Service
Client
<Hub>
Runtime Node
Service
Provider
ESB
Service
Client
Service
Provider
Service
Provider
Service
Provider
<Hub>
Runtime Node
Service
Provider
Service
Provider
<Hub>
Runtime Node
Configuration and Control Services
Control
Configuration
Client
<Bus>Enterprise Service Bus
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 21
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
ESB Scenarios
ƒ
ESB Scenarios in Service Oriented Architecture:
¾
¾
¾
¾
¾
¾
¾
Basic Integration of Two Systems
Enable Wider Connectivity to One or More Applications
Enable Wider Connectivity to Legacy Systems
Enable Wider Connectivity to an EAI Infrastructure
Implement Controlled Integration Between Organisations
Automate Processes by Choreographing Services
Implement a Robust SOA with Web Services Support
ƒ
… the scenarios suggest particular ESB capabilities from the model.
ƒ
The scenarios also suggest particular architectural issues, e.g.:
¾
¾
¾
¾
ƒ
Provision of interfaces of appropriate content and granularity
Importance of support for open standards
Control over external access
etc. …
… the resolution of these issues in turn implies additional ESB capabilities.
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 22
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Example Scenario:
Enable Wider Connectivity to Legacy Systems
ƒ Description:
¾ Enormous investment in legacy technologies
¾ Significant value in providing open standard, service-based access to those
systems
ƒ
Relevant issues:
ƒ
ESB capability requirements:
1. Function and Data Interfaces
•
Communications (all)
2. Common Business Data Model
•
Service Interaction (Service interface
definition, Service messaging models)
•
Integration (Database, Legacy and
Application adapters)
•
Quality of Services (all)
•
Security (all)
•
Service Level (all)
•
Message Processing (Message / service
aggregation and correlation, Message and
data transformations)
•
Management and Autonomic (Service
Provisioning and Registration, Logging,
Metering and Monitoring
3. Technologies for Interoperability
4. Advanced Interaction Characteristics
5. Legacy XML Support and Processing
6. Availability of Services in EAI
Infrastructure
7. Service Provider Protection
8. Consistent and Controlled Service
Enablement
9. External Access to Services
10. Service Level Requirements
11. Security Requirements
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 23
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Stepping from Scenarios
toward Implementation
ƒ We can use the Patterns for e-business Process Integration patterns to
describe the ESB and it’s role in the ESB scenarios.
¾
¾
¾
¾
<ESB>
<Exposed ESB>
<Exposed Service Gateway>
By using the P4eb patterns, we can relate the ESB patterns to other patterns such
as service directories, <Serial Process>, <Parallel Workflow>, etc.
ƒ We can then match the requirements to technologies using the ESB
capability model, e.g. for IBM products:
¾
¾
¾
¾
Web Services Gateway
WBI Message Broker
Bespoke implementations using HTTP and WebSphere MQ
Related technologies such as WBI Server Foundation, WBI Interchange Server,
etc.
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 24
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
The ESB Modelled as a
<Zone>
<Inbound
Port>C
<Inbound
Port>B
<Inbound
Port>A
<ESB>
Service
Invocation
Protocols
ESB
capabilities
and services
are available
in the <zone>.
<Zone>ESB
Configuration and
Control Services
<Outbound
Port>3
<Outbound
Port>2
Configuration
.
Service addresses
of service
implementations.
<Hub>
<Outbound
Port>1
Requester view of
Address Service
namespace
controlled by the
<ESB> over
supported
invocation
protocols.
Service Requesters
.
Each Port is
identified with a
specific protocol and
set of addresses
through which it
provides access to
the Process Services
Zone.
Service
Integration
Protocols
Service Providers
Enterprise
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 25
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
The ESB Modelled as a
<Zone> (Continued)
Service Requesters
<Inbound
Port>C
<Inbound
Port>B
<Inbound
Port>A
<ESB>
<Outbound
Port>3
<Outbound
Port>2
<Hub>
<Outbound
Port>1
Semantic Interface
Language
Platform
Data Format
Protocol
Location
Service Provider Identity or
Implementation
Time
Delivery Assurance and Error
Handling
Security
Service Version
Interaction State
Requester
Perspective
Provider
Perspective
Service Providers
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 26
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Linking Multiple Patterns
Service Requesters
Service
Requesters
<Exposed Service
Gateway>
<ESB>
<ESB Link>
WWW
Service
Providers
Service Providers
Enterprise 1
Internet
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Other Enterprises
Page 27
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Web Services Gateway
UDDI
“The Web Services Gateway is a run-time component that provides configurable mapping
based on WSDL documents. It maps any WSDL-defined service to another service on any
available transport channel. It is usually deployed at the firewall and has access to internal
services. “
SOAP/HTTP
EJB/RMI-IIOP
WSDL A*
SOAP/JMS
Publish
WSIF provider
WSDL B*
Query
WSG Filter
Service
Provider
WSG Filter
SOAP/HTTP
...
Service
Provider
Service
Provider
WSG
WSDL B
WSDL C
Client
SOAP/HTTP
Query
WSG Filter
WAS
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Publish
UDDI
Client
WSDL A
WSDL C*
Page 28
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Enterprise Service Bus
Portal Service
SOAP
Service Request
(e.g. J2EE, .NET)
B2B
Interactions
Service
Flow
Data
Existing
Applications
New
Service Logic
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 29
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Agenda
ƒ Service Oriented Architectures
¾ Vision and Reality
¾ Web Services versus SOA
ƒ Introduction to Enterprise Service Bus
¾ loose coupling
¾ patterns
ƒ Programming Model Elements
¾ ESB runtime architecture
ƒ SOA Component Model
¾
¾
¾
¾
J2EE anyone?? —> JSR109
SDO
Service Components
ESB Mediation
ƒ Business Process Abstraction
¾ BPEL
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 30
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
The Business Integration
Programming Model Challenge
WBI Traditional
Concepts
Adaptors, Business Objects,
Mediations, Collaborations,
Organization Model, Relationships,
Maps, Business Processes, ….
Pattern
s
Practic , Best
es, etc
..
Service Oriented Architecture, Components,
Object Technology, Transformation, Wiring,
Assembly, BPEL, Human Interaction,
Common Event Infrastructure …
J2EE and Web
Services
EJBs, Web Services, WSDL,
Containers, Qualities-ofService, Portlets, SDO, JCA,
JMS …
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
A Business View
Bring it all
together in a
consumable
programming
model
(Service
components,
SDO, Patterns,
Tooling,
Templates)
Technology View
Page 31
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Programming Model Elements
Component Model
Why do things look
similar but are
different?
Mediation
What I want is not
quite what I found.
X
Policy Enabled
Business
Rules
I can
assemble,
but how can I
customize?
Service Oriented Binding
J2EE, Service,
SDO
Target Selection
(Selector FW), WBI
Mapping/Relationships,
Transformation/routing at
message level
Business Rules
Connector/Adapter
I have to integrate
too many protocols
and apps
I cannot look for
Broker
things by name? I
do not know who
Consumer
might
be myProvider
partner.
Flow Composition
I have to write too
much code. Too
slow
Container Based
These service APIs
are spooky, fragile
and site specific.
Web
Services,
WSDL,
Partners
BPEL,
Compensation,
microflow
Declarative,
Configurable
JCA 1.5, Inbound,
Outbound
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 32
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Enterprise Service Bus (from
the outside in)
~~~~
~~~~
~~~~
WSAD
WSDL
XML/HTTP
Request
Broker
Servlet
Servlet
AXIS Runtime
Local Java
Adapter / wFlow
Java Objects
Legacy/Procedural
Java Objects
J2C / uFlow / wFlow Adapter
SOAP/HTTP
JMS/MQ
XML/HTTP
SOAP/JMS
JMS/MQ
RMI/IIOP
RMI/IIOP
RMI/IIOP
EJB
EJB
JMS Message
Listener
SessionBean
SessionBean
Java Beans
ORB
Other
Relational
Persistence
JAX-RPC Proxy
DB2 Stored
Procedures
Protocol/Implementation
Bindings
Converging on
J2CA In-bound
Connector Support
Enterprise Service Bus
ƒ Enables a service-bus of loosely-coupled components
ƒ Standardized services specification
ƒ Multi-protocol support — separates developer and
deployment concerns
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 33
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Enterprise Services Bus (from
the inside out)
Web browser,
Web svcs client
HTTP
listener
JMS msg
producer
EJB client
IIOP
listener
JMS
listener
EIS
EIS
listener
Container
Application
server
Application
components
JDBC provider
JMS provider
IIOP provider
EIS
adapter
Database
Message
Publisher
RMI/IIOP target
e.g. EJB
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
EIS
Page 34
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Virtualized Messaging –
Core Model
ƒ End Applications are represented as Message Producers
and/or Consumers
ƒ Destinations virtualize the resources attached to the bus
¾ Have a distribution pattern (one or all), and an option to queue
messages
¾ Can be connected together by the administrator, or
dynamically
ƒ Mediations modify routing, format and/or content of a
message
¾ Logic hosted in the network rather than at an endpoint
Message
Message
Message
Message
Producer
Destination
Consumer
Consumer
Me
MM
esessssaag
sa gee
ge
Mediation
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Destination
Destination
Page 35
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Virtualized Messaging for Web
Services
ƒ Messaging can be deployed in a single process or
distributed across a bus.
ƒ The core model and the bus topology are hidden from
applications
ƒ Applications unaffected by changes to the topology
Administration
XML/HTTP
Servlet
AXIS Runtime
Adapter / wFlow
SOAP/HTTP
HTTP
SOAP/JMS
JMS
RMI/IIOP
Legacy/Procedural
JCA Adapter
Producer
Message
Destination
Message
Consumer
Consumer
JMS/MQ
JMS Message
Listener
RMI/IIOP
ORB
EJB
EJB
SessionBean
SessionBean
Java Beans
Other
Relational
Persistence
RMI/IIOP
JAX-RPC
Proxy
DB2 Stored
Procedures
Converging on
J2CA In-bound
Connector Support
Mediation
WSPolicy
doc
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 36
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Agenda
ƒ Service Oriented Architectures
¾ Vision and Reality
¾ Web Services versus SOA
ƒ Introduction to Enterprise Service Bus
¾ loose coupling
¾ patterns
ƒ Programming Model Elements
¾ ESB runtime architecture
ƒ SOA Component Model
¾
¾
¾
¾
J2EE anyone?? —> JSR109
SDO
Service Components
ESB Mediation
ƒ Business Process Abstraction
¾ BPEL
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 37
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
WSEE – JSR 109 1.1
ƒ Defines web services support within a J2EE environment
ƒ Leverages JSR 101 work
ƒ Defines client programming model
WSDL document'
JAXRPC mapping'
<portType>
<SOAP binding>
<service>
<port>
<portType>
<SOAP binding>
<service>
<port>
WSDL to Java
emitter
J2EE DDs
<service-ref>
<service-interface>
<wsdl-file>?
<jaxrpc-mapping-file>?
<service-endpointinterface>?
</service-ref>
Generated
Svc Intfc
Endpoint
Intfc
yUse JNDI to access svc inftc
yUse Svc Intfc to access endpoint
interface
ygetPort(port,SEI)
ygetPort()
ycreateCall()
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 38
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
JSR 109 1.1
(Continued)
ƒ Defines deployment model
JAXRPC mapping
WSDL document
<portType>
<SOAP binding>
<portType>
<service>
<SOAP binding>
<port>
<service>
<port>
Find
Endpoint
Intfc
Bind
Client
Stub
Registry
Deployment
WSDL document'
Publish
SOAP
Engine
<portType>
<SOAP binding>
<service>
<port>
Tooling
Runtime
JAXRPC mapping
WSDL document
<portType>
<SOAP binding>
<portType>
<service>
<SOAP
binding>
<port>
<service>
<port>
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Java
Business
Object
(JavaBean or EJB)
Page 39
Colorado Software Summit: October 24 – 29, 2004
JSR 109 1.1
ƒ
© Copyright 2004, IBM Corporation
(Continued)
J2EE 1.4: Changes to DDs - ejb-jar.xml and webservicesclient.xml
<ejb-jar id="ejb-jar_ID">
<display-name>Stock Quote Sample EJB</display-name>
<enterprise-beans>
<session id="Session_1">
<ejb-name>com_ibm_websphere_samples_webservices_stock_StockQuote</ejb-name>
<home>com.ibm.websphere.samples.webservices.stock.StockQuoteHome</home>
<remote>com.ibm.websphere.samples.webservices.stock.StockQuote</remote>
<ejb-class>com.ibm.websphere.samples.webservices.stock.StockQuoteBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor id="AssemblyDescriptor_1">
</assembly-descriptor>
</ejb-jar>
<webservicesclient>
<component-scoped-refs>
<component-name>com_ibm_websphere_samples_webservices_stock_StockQuote</component-name>
<service-ref>
<description>Stock Quote Service</description>
<service-ref-name>service/StockQuote</service-ref-name>
<service-interface>com.ibm.websphere.samples.webservices.stock.StockQuote</service-interface>
<port-component-ref>
<service-endpoint-interface>com.ibm.websphere.samples.webservices.stock.StockQuote</service-endpoint-interface>
</port-component-ref>
</service-ref>
</component-scoped-refs>
</webservicesclient>
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 40
Colorado Software Summit: October 24 – 29, 2004
JSR 109 1.1
ƒ
© Copyright 2004, IBM Corporation
(Continued)
New DDs – ejb-jar.xml
<ejb-jar id="ejb-jar_ID"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
version="2.1">
<display-name>Stock Quote Sample EJB</display-name>
<enterprise-beans>
<session id="Session_1">
<ejb-name>com_ibm_websphere_samples_webservices_stock_StockQuote</ejb-name>
<home>com.ibm.websphere.samples.webservices.stock.StockQuoteHome</home>
<remote>com.ibm.websphere.samples.webservices.stock.StockQuote</remote>
<service-endpoint>com.ibm.websphere.samples.webservices.stock.StockQuote</service-endpoint>
<ejb-class>com.ibm.websphere.samples.webservices.stock.StockQuoteBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
<service-ref>
<description>Stock Quote Service</description>
<service-ref-name>service/StockQuote</service-ref-name>
<service-interface>com.ibm.websphere.samples.webservices.stock.StockQuote</service-interface>
<port-component-ref>
<service-endpoint-interface>com.ibm.websphere.samples.webservices.stock.StockQuote</service-endpoint-interface>
</port-component-ref>
</service-ref>
</session>
</enterprise-beans>
<assembly-descriptor id="AssemblyDescriptor_1">
</assembly-descriptor>
</ejb-jar>
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 41
Colorado Software Summit: October 24 – 29, 2004
JSR 109 1.1
© Copyright 2004, IBM Corporation
(Continued)
ƒ webservices.xml
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 42
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Current Data Access Challenges
Access APIs
ƒ Many different models/APIs for
data and metadata retrieval and
representation
Data APIs
Metadata Access APIs
¾ Relational Databases (JDBC), XML
files, JMS, Web Services (JAX-RPC),
Enterprise Information Systems (EIS)
ƒ Lack of support for standard
application patterns
¾ Transfer Object
¾ Optimistic concurrency
¾ Pagination of large data-sets
Client
XML
File
Metadata APIs
Access APIs
Data APIs
Metadata Access APIs
Data
Base
Metadata APIs
…
…
Access APIs
Data APIs
Metadata Access APIs
Metadata APIs
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
EIS
Page 43
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Consequences of Current Data
Access Challenges
ƒ Programmers focus on learning technologies, rather than
solving business problems
ƒ Programmers do a lot of low-level coding
ƒ Tooling does not offer an easy development experience for
J2EE application developers
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 44
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Solution: Service Data
Objects (SDO)
SDO Core
APIs
Access APIs
Custom
Mediator
Data APIs
Metadata Access APIs
File
Metadata APIs
Client
Access APIs
JDBC
Mediator
Data APIs
Metadata Access APIs
Data
Base
Metadata APIs
Unified data
representation &
retrieval across
heterogeneous
data sources
…
…
Access APIs
EJB
Mediator
Data APIs
Metadata Access APIs
Data
Base
Metadata APIs
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 45
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO: Design Points
ƒ Unified data access and representation across
heterogeneous data stores
ƒ SDO supports
¾ Dynamic and static (strongly typed) data APIs
¾ Disconnected programming model
¾ Introspection of data
¾ Change history for data modifications
¾ Relationship integrity
ƒ Designed to integrate well in a tooling environment
¾ Data objects defined/configured using wizards and views
¾ Tooling can integrate utilities for generating static data access APIs
ƒ Not intended to replace other data access technologies
ƒ SDO proposal was published jointly by BEA and IBM as JSR
235
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 46
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO Comparison with Other
Technologies
Technology
Model
API
Data Source
Metadata API
Query
Language
JDBC RowSet
Connected
Dynamic
Relational
Relational
SQL
JDBC
CachedRowSet
Disconnected
Dynamic
Relational
Relational
SQL
Entity EJB
Connected
Static
Relational
Java introspection
EJBQL
JDO
Connected
Static
Relational,
Object
Java
introspection
JDOQL
JCA
Disconnected
Dynamic
Record-based
Undefined
Undefined
DOM and SAX
N/A
Dynamic
XML
XML infoset
XPath,
XQuery
JAXB
N/A
Static
XML
Java introspection
N/A
JAX-RPC
N/A
Static
XML
Java
introspection
N/A
SDO
Disconnected
Both
Any
SDO Metadata
API,Java Introspection
Any
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 47
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO Features
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Dynamic Data API
Support for Static Data API
Complex Data Objects
Change History
Navigation through graphs of data
Rich Metadata
Validation and Constraints
Relationship integrity
XML support and XML schema support
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 48
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO: Architecture
Metadata
Client
Pluggable
Data
Mediator
Access APIs
Data
Source
specific
Metadata Access APIs
Data APIs
CRUD
Data
Source
Metadata APIs
DataObject
DataGraph
SDO Core API
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 49
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO: DataObject
ƒ Data is held in a disconnected, source-independent format defined by
the DataObject interface
ƒ Data access APIs are
¾ Dynamic (generic)
¾ Static and strongly typed (generated)
ƒ
ƒ
ƒ
ƒ
Includes a reference to metadata
Holds primitive data or multi-valued fields
Supports relationship integrity
Supports getting/setting values in DataObject graph using an XPATH
expression
Metadata
DataObject
DataGraph
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 50
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO: DataGraph
ƒ Represents a basic unit of data transfer between client and data store
ƒ Encapsulates set of DataObjects
¾ Contains a root DataObject
¾ References metadata from DataObjects
¾ All other DataObjects are reachable by traversing the references from
the root DataObject
ƒ Contains change information
¾ Indicates which DataObjects have been added, updated, or deleted
Metadata
DataObject
DataGraph
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 51
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO: Data Mediator Service
ƒ Created for specific data store
¾ JDBC Mediator, EJB Mediator, etc.
ƒ Responsible for populating DataGraph
ƒ Queries and updates the data store
¾ Implements an optimistic concurrency strategy for updates
Client
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Mediator
ƒ Stateless with respect to the DataGraph
Page 52
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO DataObject Dynamic API
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
String getString(String path) throws
IllegalArgumentException;
String getString(int fieldIndex) throws
IndexOutOfBoundsException;
void setString(String path, String value)
throws IllegalArgumentException;
void setString(int fieldIndex, String value)
throws IndexOutOfBoundsException;
int getInt(String path) throws …;
int getInt(int fieldIndex) throws …;
void setInt(String path, int value) throws
…;
void setInt(int fieldIndex, int value) throws
…;
An so on for all the “standard” types
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Object getObject(String path) throws …;
Object getObject(int fieldIndex) throws …;
void setObject(String path, Object value)
throws …;
void setObject(int fieldIndex, Object value)
throws …;
DataObject getDataObject(String path)
throws …;
DataObject getDataObject(int fieldIndex)
throws …;
void setDataObject(String path, DataObject
row) throws …;
void setDataObject(int fieldIndex,
DataObject row) throws …;
List getList(String path) throws …;
List getList(int fieldIndex) throws …;
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 53
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO Example
Model
//Use Data
//Then get
DataObject
DataObject
Mediator to get data graph
root DataObject
root = dataGraph.getRootObject();
dept = root.getDataObject(“department”);
//Get the first course in the data graph
List courses = (DataObject) dept.getList(“courses”);
DataObject course = dept.get(0);
//Access a student in the first course
List students = course.getList(“students”);
DataObject student = (DataObject) students.get(1);
//Same as above code snippet, but using XPATH
String xpath = “courses.0/students.1”;
DataObject studentWithXPATH = dept.getDataObject(xpath);
//Another XPATH example
xpath = “courses[num=567]/students[id=555]”;
DataObject studentWithXPATH = dept.getDataObject(xpath);
Department
name : String
num : int
0..*
+ courses
Course
title : String
num : int
0..*
+ students
Student
lastName : String
id : int
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 54
Colorado Software Summit: October 24 – 29, 2004
SDO Example
© Copyright 2004, IBM Corporation
(Continued)
Model
//Make data modifications
dept.setString(“name”, “Computer Science”);
//Creating a new DataObject
DataObject newStudent =
course.createDataObject(“students”);
newStudent.set(“lastName”, “Smith”);
newStudent.set(“id”, “556”);
//Deleting a DataObject from the DataGraph
student.delete();
Department
name : String
num : int
0..* + courses
Course
title : String
num : int
0..* + students
Student
lastName : String
id : int
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 55
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO meta-model
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 56
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
SDO meta-data
ƒ Meta-data import from
¾
¾
¾
¾
¾
¾
XML Schema
UML
Relational schemas
COBOL
Java
…
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 57
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Service Component Model
Requirements
ƒ We need an analogous abstraction for a service-oriented component
model
¾ An abstraction that covers stateless session EJBs, web services, POJOs,
BPEL4WS processes, database access, JCA access, etc.
¾ Separates “business logic” from “infrastructure logic”
• application programmers can focus on business problem
• application logic can be much more portable
• Not everyone has to be an IT infrastructure expert
¾ Covers both usage of services/components and development of
services/components
¾ A uniform model for application programmers and for tools
• Enables advanced, domain-specific, task-oriented tools
¾ Uniform programming model for “programming in the small” (application
development) and “programming in the large” (application integration)
• Integrates with and provides programming model for the Enterprise Service Bus
– ESB enables mediated application integration without modifying existing
applications
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 58
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Service Component Model
Requirements (Continued)
ƒ Not a new set of middleware abstractions!!
¾ Why would anyone think they could do a better job than J2EE?
¾ Instead, implement on top of existing middleware including J2EE and EJBs
ƒ Rather it’s a component model that allows you to separate your
business logic from your infrastructure logic by building:
¾ “business logic components” – service components whose implementation
contains only business logic and calls to other service components
¾ and
¾ “infrastructure components” – service components that encapsulate the
code that calls the J2EE APIs and expose business interfaces to “business
logic components”
ƒ Infrastructure components are part of the business application and have
APIs that are specific to the business application that they are part of.
ƒ It also raises the bar of container support for components by providing
a declarative approach to asynchronous programming and other
features
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 59
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Declarative Service Model
Core elements: Interface, Implementation, Reference and Wire
interface = “Service1”
interface = “Service1”
Service1.java
Service1.java
Java
Java
Interface
Interface
implementation =
implementation
“Service1Impl”=
“Service1Impl”
Service1Impl.java
Service1Impl.java
Simple Java
Simple
Class Java
Class
interface = “Service2”
interface = “Service2”
Service2.java
Service2.java
Java
Java
Interface
Interface
reference:
name = “service2”
interface = “Service2”
Service Component
Service1
implementation =
implementation
“Service2Impl”=
“Service2Impl”
Service2Impl.java
Service2Impl.java
Simple Java
Simple
Class Java
Class
Service Component
Service2
wire:
source = “Service1”
target = “Service2”
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 60
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Service Implementation Types
Protocol Transparency – Binding/Wiring Alternatives
impl = “<Java class>”
impl = “<Java class>”
or
impl = “<S-SEJB>”
impl = “<S-SEJB>”
interface = “Service1”
interface = “Service1”
implementaton =
implementaton
“Service1Impl”=
“Service1Impl”
reference:
name = “service2”
interface = “Service2”
interface = “Service2”
interface = “Service2”
impl = “<WSDL>”
impl = “<WSDL>”
impl = “<BPEL>”
impl = “<BPEL>”
Service Component
Service1
Service Component
Service2
wire:
source = “Service1”
target = “Service2”
impl = “<DataMediatorService>”
impl = “<DataMediatorService>”
impl = “<J2C>”
impl = “<J2C>”
impl = “<JMS>”
impl = “<JMS>”
…
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 61
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
What Is an ESB Mediation?
ƒ The ability to manipulate a message as it traverses the bus
¾ Transform the message
¾ Reroute the message to a different destination (or sequence of
destinations)
¾ Copy and route the message to additional destinations
¾ Allow interaction with non-messaging resource managers (e.g.
Databases)
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 62
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
The Basics of the Model
ƒ Mediations are “message handlers”
¾
¾
¾
¾
They operate an a message or service request/reply
They are weakly or “generically” typed
They are independent of the end-point applications
Applications do not need to be modified when a mediation is added
ƒ We will want to compose or aggregate individual pieces of function
¾ By providing a collection of configurable (template) mediation components
¾ Administratively or programmatically
¾ Simple chains are a primary model but more complex graphs are also required and
supported
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 63
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Mediation: Orientation Map
(or, everything in one slide)
Application
Consumer
Application
Consumer
Application
Producer
Destination
Application
Consumer
Application
Consumer
ƒ Applications use Producers
and Consumers to
communicate via
Destinations
Mediation handler chain
Mediation bean assembly
ƒ Destinations are Jetstream
managed points of
communication
rendezvous (e.g. JMS,
topics, JMS Queues, Web
Service ports and services)
ƒPredefined, customizable beans
ƒComposition/Assembly
ƒAssociation of "mediation" to
destination represents bean assembly
configuration
Message content access framework (SDO)
Dictionary-driven data mediators
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 64
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Physical Realisation of a
Mediated Destination
Destination
Mediation HandlerList
MediationHandler
MediationHandler
Unit of work*
MediationHandler
Application
Message
Unit of work*
Message
Application
Unit of work*
*optional
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 65
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Administration
ƒ A HandlerList is attached to a Destination by specifying its name
¾ Can be referred to from any number of Destinations
ƒ A set of properties administered on the destination can be used defined
¾ These are available for use by the MediationHandlers
Destination
Message
Message
Application
Name
Type
priority
int
...
...
Application
Value
3
...
Mediation HandlerList
MediationHandler
MediationHandler
MediationHandler
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 66
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Mediation Detail
ESB
supplied
ƒ
User
written
mediations
ƒ
MediationHandler
schoolLog:
Log
newSchoolOutput:
SendBean
schoolMapper:
XSLTTransform
modifyBean:
ModifyRoutingBean
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 67
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Agenda
ƒ Service Oriented Architectures
¾ Vision and Reality
¾ Web Services versus SOA
ƒ Introduction to Enterprise Service Bus
¾ loose coupling
¾ patterns
ƒ Programming Model Elements
¾ ESB runtime architecture
ƒ SOA Component Model
¾
¾
¾
¾
J2EE anyone?? —> JSR109
SDO
Service Components
ESB Mediation
ƒ Business Process Abstraction
¾ BPEL
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 68
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Integrating the Enterprise with
Services Oriented Architecture (SOA)
Business Modeling and Monitoring
Process Integration Services
Presentation
services
Portal Interfaces
Common
Business
Object
Model
Services
Services
Services
Contract
Contract
Contract
what
what
what
howhow
how
Services
Bus
Protocol
Mediation
Routing
Server
Staff
Audit
Business
Protocol (EDI)
Business Protocol
(EDI)
Check
customer
ERP 1
Legacy 1
Exchange
Hubs
Business
Partner
Services
Services
Contract
Contract
what
what
how
how
Monitoring Pub/Sub Transformation
Transport
CRM 1
Business
Partner
Application
Partner Services
Services
Services
Services
Contract
Contract
Contract
what
what what
howhow how
Services
Contract
what
how
App.
State
Management
Update
order
Transaction /
Compensation
Portal Interfaces
Semantic
brokering
CrossReference
Portal Interfaces
WAP
Partner Integration
Connection
Process Application flows Check
Human
line
Complete
Automation
Activity
order
Process
Choreography
Browser
Siebel
Data
Store
Web
Service
Services
Contract
what
how
Supply
ERP 2
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Legacy 2
.Net
Legacy 3
Bus int
Page 69
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Business Integration Programming
Model: “Component Kinds”
ƒ
Programming model defines contract between tools and runtimes
¾ One integrated runtime that implements the programming model
ƒ
Reduced complexity and progressive disclosure
¾ Runs in a J2EE environment, but not all business integration users need the full power of the J2EE
programming model
ƒ
Support application assembly and template-based development
¾ Enable solution assembly via pre-canned solution building blocks like process templates, business
objects
ƒ
Straightforward representation of business-level concepts and patterns
¾ Process choreography, business activity monitoring and support for integration patterns like
mediation, adapter, composite, state, strategy, …
Generic
Processes
Adapters
GBO
AsBO
AsBO
GBO
Mediations
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
AsBO
Page 70
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Sample Business Process
ƒ Processing of a claim in an insurance company
receive
claim data
automatic
check
manual check
necessary
clerk does
manual check
9
9
compensate
claim
compensation
of claim declined
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 71
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Business Processes as Web
Services
I am using this
web service ...
receive
claim data
automatic
check
WSDL
Port Type &
Operation
clerk does
manual check
compensate
claim
Introduction to Business Process Execution Language | duerrstein@de.ibm.com
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
compensation
of claim declined
© 2004 IBM Corporation
Page 72
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Business Processes between
Web Services
receive
claim data
Claim
Checking
Service
automatic
check
clerk does
manual check
Claim
Compensation
Service
compensate
claim
compensation
of claim declined
eMail
Service
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 73
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Elements of a BPEL Process
Receive
JavaSnippet
Activities
Activities
subtasks
subtasks of
of
the
the process
process
Control
Control Links
Links
Invoke
Wait
Assign
JavaSnippet
Throw
define
define the
the process'
process'
control
control flow
flow
Receive
Receive
Assign
Invoke
Variables
Variables
PartnerLinks
PartnerLinks
hold
hold data
data used
used in
in
the
the business
business
process
process
placeholders
placeholders for
for
process
process callers
callers and
and
service
service providers
providers
FaultHandlers
FaultHandlers
(optional)
(optional)
enclose
enclose activities
activities that
that
are
are performed
performed in
in cases
cases
of
of error
error
! ! !
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
CorrelationSets
CorrelationSets
(optional)
(optional)
support
support process
process
instance
instance identification
identification
Page 74
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Elements of a BPEL Process:
Activities
Receive
JavaSnippet
Wait
Invoke
JavaSnippet
Assign
Throw
Receive
Receive
Assign
Invoke
A BPEL Business Process is composed of
ƒ Basic activities
¾ Which are the things that we need to do as part of a business process
¾ Receive input, reply to business partners or other business processes,
manage exceptions, make decisions
ƒ Structuring activities
¾ Help us organize and manage the complexity of the flows
¾ Typical programming constructs
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 75
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
BPEL Basic Activities
Receive
JavaSnippet
Wait
Invoke
Assign
JavaSnippet
Throw
Receive
Receive
Assign
Invoke
Receive
Pick
Reply
Empty
Wait for a message to arrive.
Optionally start a new process
instance when the message
arrives.
Send a message in reply to a
message that was received
through a Receive.
Invoke
Invoke a one-way or a requestresponse operation offered by a
partner.
Wait for one of multiple
messages to arrive or for a timeout alarm to go off.
A "no-op" instruction in the
business process.
Terminate
Immediately terminate the
process instance.
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 76
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
BPEL Basic Activities
Receive
JavaSnippet
Wait
Invoke
Assign
JavaSnippet
Throw
Receive
Receive
Assign
Invoke
Assign
Staff
Update the values of variables
with new data.
Invoke an interaction with a
human user.
BPEL Extension
Wait
Wait for a given time period or
until a certain time has passed.
J
JavaSnippet
Invoke an inline snippet of Java
code.
BPEL Extension
!
Throw
Generate a fault from.inside the
business process.
Subprocess
Invoke another process – life
cycle events will be propagated.
BPEL Extension
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 77
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
BPEL Structuring Activities /
Elements
Receive
JavaSnippet
Wait
Invoke
Assign
JavaSnippet
Throw
Receive
Receive
Assign
Invoke
Flow
Holds multiple activities that are
performed concurrently.
Link
Synchronizes two activities that
are enclosed in a Flow (i.e,
enforces a certain execution
order).
Sequence
Switch
Holds multiple activities that are
performed sequentially in lexical
order.
Selects one branch of activity
from a set of choices.
While
Scope
Holds a (basic or structuring)
activity that is repeated until a
success criteriy has been met.
Allows for the definition of a
nested activity with its own fault
handler.
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 78
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Elements of a BPEL Process:
Variables
ƒ Hold data that constitutes the state of a process
¾ May be received from or sent to partners
¾ Can be specified as input or output variables for invoke, receive, and
reply activities
¾ May hold state data related to the process and never exchanged with
partners
ƒ Associated with WSDL
message types
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 79
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Elements of a BPEL Process:
Partner Links
ƒ Partner: BPEL term for any entity that a process is interacting with
¾ Business Partner, i.e. a web service
¾ Internal Service, i.e. an EJB
¾ Process Starter, e.g. a web application
¾ ...
ƒ Partner Link: "Placeholder" for a partner
¾ Part of the process definition
¾ No need to specify concrete service endpoints within the process model
¾ Allows for late binding of partners (at assembly time ↔ build time)
ƒ Allows for long-running, stateful interactions with a partner
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 80
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Create Artifacts – BPEL File
receive
claim data
automatic
check
receive
claim data
BPEL
write claim
data to invoke input
clerk does
manual check
compensate
claim
automatic
check
compensation
of claim declined
write claim data
to staff activity input
clerk does
manual check
write claim data
data to invoke input
write decline reason
to invoke input
compensate
claim
compensation
of claim declined
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 81
Colorado Software Summit: October 24 – 29, 2004
© Copyright 2004, IBM Corporation
Web Resources
ƒ IBM developerWorks web services domain
¾ http://www-106.ibm.com/developerworks/webservices/?loc=dwmain
ƒ RedBook “Implementing an SOA Using an Enterprise Service Bus”
¾ http://publib-b.boulder.ibm.com/abstracts/sg246346.html?Open
ƒ IBM on-demand homepage
¾ http://www-3.ibm.com/e-business/index.html
ƒ IBM web services homepage
¾ http://www-4.ibm.com/software/solutions/webservices/
ƒ OASIS
¾ http://www.oasis-open.org/home/index.php
ƒ World Wide Web Consortium (W3C)
¾ http://www.w3.org/
ƒ Java Community Process (JCP)
¾ http://www.jcp.org
ƒ Apache
¾ http://xml.apache.org
ƒ WS-I
¾ http://ws-i.org
André Tost — How To Develop Applications For Business Integration: Pulling J2EE, SOA and Web Services Together
Page 82