You are on page 1of 56

SOA

Agenda

• What is SOA ?
• Web Services
• BPEL
• Interoperability
• Performance
History of Distributed Computing

Phase III
• MOM
Messaging

Phase II • CORBA
• DCOM
Components • EJB

Phase I • Client/Server
Downsize • DCE
Issues with Existing Models

• Proprietary protocols
• Interoperability
• Platform lock-in
• Flexibility
What is SOA?

• IT architecture for request - reply applications


• Application functions are modularized and
presented as services
• Services are loosely coupled
– Service interface is independent of the
implementation
Characteristics of SOA

• Services have platform


independent, self describing
interfaces (XML) Composable
• Messages are formally defined
• Services can be discovered
Interoperable SOA
• Services have quality of SOA Re-Usable
service characteristics defined
in policies
Loosely
• Services can be provided on Coupled
any platform
Why SOA? – The Cruel Reality
Application
Screen
Scrape

Download Application
Message File
Application Queue Screen
Application Scrape
Sockets Screen Transaction
Transaction Scrape File
File
Application
Sockets
Download CICS Gateway RPC
File ORB
APPC
Application
Message
ORB Application
Application Message Transaction
Queue File
Application
Message
Queue
CICS Gateway
Transaction Screen
File Scrape
APPC
Application Message Download RPC
File

Source: Gartner
Why SOA?
• Respond to business changes
• Address new needs with existing applications
• Unlock existing application investments
• Support new channels & complex interactions
• Support organic business
Oracle Custom Order New Web
Financials Application Application
Standard Interface Standard Interface Standard Interface

New Supply Chain Management Application


(Business Process or Composite Application)

Standard Interface Standard Interface Standard Interface


Siebel Mainframe HR .NET Inventory
CRM Application Application
Anatomy of a Service

New Service
Service Consumer

Wrapped
Legacy

Interface Proxy

Composite
Service
Service Service
Interface Implementation
Service Communication

• Communicate with messages


• No knowledge about partner
• Likely heterogeneous

Service Service
Consumers Producers
Service Platform
Service Consumers

Service Delivery Bus


Change

Control
Service Service
Rules Reporting
& Config & Mgmt

Service Interfaces and


Service Implementations
SOA – Based on Standards
Web Service Distributed Management
Web Service Choreography
TPM, Mainframe,
Web Service Orchestration Legacy Sys
Web Service Coordination
Web Service Transactions
Web Service Security
Applications
Web Service Policy
Web Service Reliable Messaging

SOA Tools J2EE 1.4


Databases
App Dev Framework
WS-I Basic Profile
SOAP, WSDL, UDDI

J2EE Application Server (OracleAS 10g) B2B Partners


Benefits of SOA

• Better reuse
– Build new client functionality on top of existing
Business Services
• Well defined interfaces
– Make changes without affecting clients
• Easier to maintain
– Changes/Versions are not all-or-nothing
• Better flexibility
Agenda

• What is SOA ?
• Web Services
• BPEL
• Service Oriented Architecture and Oracle
Services Communicate With Messages
• Providing reliability and security to messages
• Sending messages across consumers and
producers
• Service Orchestration

Service Service
Consumers Producers
Basic Web Services
Points to
UDDI description
Registry WSDL

Points to
service
Finds Describes
Service Service

Web
WebService
Service SOAP Web
WebService
Service
Client
Client (J2EE,
(J2EE,PL/SQL,
PL/SQL,
(J2EE, .NET,C/C++,
(J2EE,.NET,
.NET, .NET,C/C++,
PL/SQL Legacy
Legacy…)
PL/SQL…)…) Invokes with …)
XML Messages
Two Approaches
Top Down Contract Driven And Bottom
Up
Bottom Up Top Down

Service
WSDL
Implementation

Server
Interface Service
Interface

Server
WSDL
Implementation

e.g. EJB/Java Class e.g. WSDL contract as the


to WSDL interface & message description
J2EE 1.4 Web Services
Java APIs
Description
for XML

JAXP Java API for XML Parsing

JAXB Java API for XML Data Binding

JAX-RPC Java API for XML Remote Procedure Call

SAAJ SOAP API for Attachments in Java

JAXR Java API for XML Registries

EJB 2.1 Stateless Session EJB Endpoint Model

JSR 109 Web Services Deployment Model


Web Services Interoperability

• Web Services Interoperability


– Develops profiles
– Suggests best practices
– Provides testing tools
• Runtime and tools uptake
– Oracle JDeveloper analysis
– OracleAS compliance
D E M O N S T R A T I O N

Publishing and Testing a


JAX-RPC Web Service
Business Process Integration

SAP Mainframe

Formulate
Check Fulfillment
Inventory Offer
Transform Send
Submit Determine Can
Order/ Result to
Order Discount Fulfill?
Customer User
Check Formulate
Credit Rejection

Portal Java Web App


Building Business Processes

How do I …
• Coordinate asynchronous • Manipulate/transform
communication between data between partner
services interactions
• Correlate message • Support for long running
exchanges between business transactions
parties and activities
• Implement parallel • Provide consistent
processing of activities exception handling
Requirements for Processes

• Process language
– Business Process Execution Language
• Process runtime environment
– High performance execution of long running processes
• Process monitoring and lifecycle management
– Management environment
• Process design time environment
– Design time tools to visualize process development
The BPEL Alternative
Getting to Process Standards
Build your own 1-off orchestration
Traditional EAI

The BPEL Alternative


? • Rich metadata (XML Schema, WSDL)
• Sophisticated binding framework (WSDL)
• Internet scale connectivity
• Support for both sync and async interactions (BPEL)
• Sophisticated flow coordination (BPEL)
• Advanced exception management (BPEL)
• Extensible
• Composable
• Convergence of application development and
integration
BPEL Process Language Structure
<process>
<!– Definition and roles of process participants -->
<partnerLinks> ... </partnerLinks>
<!- Data/state used within the process -->
<variables> ... </variables>
<!- Properties that enable conversations -->
<correlationSets> ... </correlationSets>
<!- Exception handling -->
<faultHandlers> ... </faultHandlers>
<!- Error recovery – undoing actions -->
<compensationHandlers> ... </compensationHandlers>
<!- Concurrent events with process itself -->
<eventHandlers> ... </eventHandlers>
</process>
BPEL Activities
Process Programming Language

Primitive Activities Structured Activities


• <invoke> • <sequence>
• <receive> • <switch>
• <assign> • <pick>
• <reply> • <flow>
• <throw> • <link>
• <terminate> • <while>
• <wait> • <scope>
BPEL in Action
BPEL Flow
<variable> <process> star
10:00am

t
Discount Service
<faultHandlers>
Get Discount
Handle Negative
<invoke> Credit Exception
<flow>
<partnerLink>
Send Credit Application Send Inventory Request

Credit Service Inventory


<invoke> Service

<receive>
<partnerLink> Receive Credit Result Receive Inventory Result <partnerLink>

</flow>
Determine if
<switch> ?
Can Fulfill

end
03:00pm
</process>
Runtime Framework for BPEL
• Enterprise-strength infrastructure for designing, deploying and
managing BPEL business processes
Easy-to-use modeling tool

JDeveloper
Operation-friendly deployment unit
BPEL
Designer BPEL
Scalability, Fail-over
DESIGN

DEHYDRATE

BPEL Server
WSDL Binding Built-in Integration Services

Web Service
Oracle DB
JMS User Unparalleled management
Flexible WSIF-based XQuery XSLT
Tasks
BPELJ

binding framework JCA

Email Core BPEL Engine


BPEL Console

MANAGE
J2EE Application Server
(OracleAS 10g)
Comprehensive BPEL 1.1 support
Easy-to-install and deploy
Next Level Requirements
Using BPEL in Real Life
• Visual XPATH editor • Sync and async messaging
• Extensible WSIF binding • Context dehydration
framework
• Advanced exception
• UDDI and WSIL service browser
management
• One-click build and deploy
• Side-by-side versioning
• Java embedding
• Email and JMS messaging
• Large XML documents
services • Visual monitoring
• XSLT and XQuery • Auditing
transformation services • BPEL debugging
• User task manager and portal
integration
• In-flight administration
• Performance tuning
• Partitioning/domains
D E M O N S T R A T I O N

Building a Business Process


using Web Services
Enterprise Web Services

• Reliability
– Guaranteed delivery
• Security
– Authentication, encryption and signing
• Management
– Deployment, configuration, monitoring
Standards for Quality of Service

• Web Services Reliability


– OASIS standard August 2004
• Web Services Security
– OASIS standard April 2004
• Web Services for Distributed Management
– OASIS specification – release > 1 year
• Expected next steps from standards
– Interoperability for reliability and security
Web Services Reliability
Sender Receiver

Application Application
Layer Layer

Msg
SOAP Node SOAP Node
With With
Reliable Messaging Reliable Messaging
Ack

• At least once semantics • Guaranteed message ordering


• At most once semantics • Exactly once semantics
Web Services Security
Client Server
SOAP SOAP
Message Security Security Message

Add Auth Chck Auth Check


Sign Encrypt Decrypt
Token Token Signature JAX-RPC
JAX-RPC Service
Client Endpoint
Check Chck Auth Add Auth
Decrypt Encrypt Sign
Signature Token* Token*

SOAP Transport SOAP


Message HTTP, JMS Message

• Authentication • XML Digital Signatures


- User name/password token • XML Encryption
- X.509 token
-SAML token
Web Services Management

• J2EE 1.4 requires JMX for management


• Web services managed like J2EE resources
JMX Management Infrastructure (Mbeans, Agents)

Web Web Web … Web


Service 1 Service 2 Service 3 Service n

WS-Security WS-Reliability WS Audit/Log

JAX-RPC EJB Servlet/JSP

Transactions Messaging Security JNDI Pooling

Oracle Application Server – J2EE Container


Baseline Management Characteristics

Auditing, Logging,
Reliability and
WS-Security

Monitoring and
Performance
Analysis
D E M O N S T R A T I O N

Web Service Security


Reliability and Management
Interoperating Across the Web
Services Standards Stack
Addressing Policy Context

Transactions
Coordination
Standards- Choreography
Based
Interoperability Security
Reliability
Orchestration
WS-I
SOAP Basic
UDDI Profile 1.1
WSDL
Prescriptive and Reactive
Approaches
• WS-I WS-I Profile
– Profiles
– Best practices Conventions
Links to
and Best
– Testing Specs
Practices
• SOAPBuilders
– WSDL 1.1
– SOAP 1.1
– RPC/encoded, Doc/literal
Web Services Interoperability

• Web Services Interoperability


– Develops profiles
– Suggests best practices
– Provides testing tools
• Runtime and tools uptake
– Oracle JDeveloper analysis
– OracleAS compliance
Perceived Interoperability
versus Real Interoperability
• Perceived Interoperability
– WS-I and SOAPBuilders conformance means
you have higher likelihood of being interoperable.
Does not guarantee interoperability
• Real interoperability
– Does your client work with my service. If it does,
you have real interoperability.
Ensuring Real Interoperability

• Build your own test suite


– Using different Web service kits
– Client and servers
• Supply your own clients
– Java, C#, VB
• Prescribe how to build your services
– Demand WS-I conformance
• Validate deployed Web services
– Police your infrastructure
Developing For Interoperability:
Contract Driven And Bottom Up
Bottom Up Top Down

Service WSDL
Implementation

Server
Interface Service
Interface

Server
WSDL
Implementation

e.g. EJB/Java Class e.g. WSDL contract as the


to WSDL interface & message description
Real Interoperability
Development – Top Down Design
• Design the service contract first
• Follow with service implementation
• Follow with service client
• End result
– Less language dependencies
• .NET Datasets; Java collections
– Contract driven approach
• Drives looser coupling
Performance
Web Services Performance
Variables
• Throughput
– Throughput is the number of Web services
requests, typically measured in bytes, handled in
a given time period
• Latency
– Latency is the round-trip time between sending a
request and receiving a response
• Document Size and Complexity
– Number of bytes and structural complexity of
SOAP messages
Achieving Desired Performance

• Understand your requirements


• Leverage scalable infrastructure
• Streaming attachments
• Assess alternatives
Understand Your Requirements
Throughput Latency Doc Size

Process Integration Low – Medium Long Running Up to 10 M,


Async potentially in 100s
Transactions of Megs

Mobile High Within Human Small Docs (< 1K)


Response
Threshold
Web applications Medium Within Human Small-Med Docs (<
(Portal) Response 10K)
Threshold
J2EE Applications Low – High Custom Application Potentially very
dependent large docs (> 1 GB
eventually)
Reliability, Scalability and
Availability
• Web services typically live on top of an
existing server infrastructure
• J2EE servers have different RAS
characteristics by vendor
• J2EE 1.4 makes Web services a first class
citizen of J2EE
Infrastructure for RAS is
Infrastructure for Web Services
Resource
Redistribution
(Time of Day, 1 Server
Year) 1 Workload Workload
Scaling On
Demand
(Better Usage)
Application Server
Utilization Costs
CPU Scaling
Policy-Based On Demand
Resource Mgmt (Less HW)
(Across Multiple
Workloads)

Workload Re-
Distribution on Failure
(Session Migration)
Reliability, Availability,
Scalability Architecture
HTTP
Web Cache

mod_oc4j
RAC
HTTP AJP JDBC

OHS
Web Client OC4J
OC4J
OC4J
SOAP/
HTTP

Web Services • Up/Down • Up/Down


Application • New • Invalidation
• Up/Down • Up/Down • Health • Health

Process Monitoring
and Notification Service
Streaming Attachments
MIME-Version: 1.0
• Transmission Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml;
start="<claim061400a.xml@claiming-it.com>"
of SOAP Content-Description: This is the optional message description.

message with --MIME_boundary


Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
attachments Content-ID: <claim061400a.xml@claiming-it.com>

<?xml version='1.0' ?>


• Entire message <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

body not <SOAP-ENV:Body>


..

loaded into
<theSignedForm href="cid:claim061400a.tiff@claiming-it.com"/>
..
</SOAP-ENV:Body>
memory </SOAP-ENV:Envelope>

--MIME_boundary
• API for reading Content-Type: image/tiff
Content-Transfer-Encoding: binary

attachments Content-ID: <claim061400a.tiff@claiming-it.com>

...binary TIFF image...


--MIME_boundary--
Test, Test and Test

• Understand all the variables


– Network issues
– Client issues
– Server issues
– Memory/CPU issues
– Message size and complexity
– Asynchronous/synchronous
• Compare real life scenarios on the correctly
sized hardware
When All Else Fails

• Consider using native protocols rather than


Web services
• Consider Apache WSIF
– Best of both Web services and native protocols
Client uses RMI to invoke EJB
EJB Client EJB

WSDL
with
WSIF Client finds the native RMI Binding Service implementation publishes
protocol binding from the WSDL the native protocol binding to the WSDL
Agenda

• What is SOA ?
• Web Services
• BPEL
• Interoperability
• Performance
Q&
QUESTIONS

A
ANSWERS

You might also like