Upload
achyut-joshi
View
223
Download
0
Embed Size (px)
Citation preview
8/8/2019 So a and Web Services
1/56
SOA
8/8/2019 So a and Web Services
2/56
Agenda
What is SOA ?
Web Services
BPEL Interoperability
Performance
8/8/2019 So a and Web Services
3/56
Phase IPhase I
DownsizeDownsize
Client/ServerClient/Server DCEDCE
Phase IIPhase IIComponentsComponents
CORBACORBA DCOMDCOM EJBEJB
Phase IIIPhase III
MessagingMessaging MOMMOM
History of Distributed ComputingHistory of Distributed Computing
8/8/2019 So a and Web Services
4/56
Issues with Existing Models
Proprietary protocols
Interoperability
Platform lock-in Flexibility
8/8/2019 So a and Web Services
5/56
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
8/8/2019 So a and Web Services
6/56
Characteristics of SOA
Services have platform
independent, self describing
interfaces (XML)
Messages are formally defined
Services can be discovered
Services have quality of
service characteristics defined
in policies
Services can be provided on
any platform
SOASOASOASOAInteroperableInteroperable
LooselyLoosely
CoupledCoupled
Re-UsableRe-Usable
ComposableComposable
8/8/2019 So a and Web Services
7/56
Why SOA? The Cruel Reality
ScreenScrape
ScreenScrape
ScreenScrape
ScreenScrape
MessageQueue
MessageQueue
MessageQueue
DownloadFile
DownloadFile
DownloadFile
TransactionFile
TransactionFile
TransactionFile
ORB
ORB
CICS Gateway
CICS Gateway
APPC
APPC RPC
RPC
TransactionFile
Sockets
Sockets
Message
Message
Application
Application
Application
Application
Application
Application
Application
Application
Application
Application
Source: Gartner
8/8/2019 So a and Web Services
8/56
OracleOracle
FinancialsFinancials
Standard InterfaceStandard Interface
Custom OrderCustom Order
ApplicationApplication
Standard InterfaceStandard Interface
New WebNew Web
ApplicationApplication
Standard InterfaceStandard Interface
SiebelSiebel
CRMCRM
Standard InterfaceStandard Interface
Mainframe HRMainframe HR
ApplicationApplication
Standard InterfaceStandard Interface
.NET Inventory.NET Inventory
ApplicationApplication
Standard InterfaceStandard Interface
New Supply Chain Management ApplicationNew Supply Chain Management Application
(Business Process or Composite Application)(Business Process or Composite Application)
Why SOA?
Respond to business changes Address new needs with existing applications
Unlock existing application investments
Support new channels & complex interactions
Support organic business
8/8/2019 So a and Web Services
9/56
Anatomy of a Service
Service ConsumerService Consumer
Interface ProxyInterface Proxy
ServiceService
InterfaceInterfaceServiceService
ImplementationImplementation
New ServiceNew Service
WrappedWrappedLegacyLegacy
CompositeComposite
ServiceService
8/8/2019 So a and Web Services
10/56
ServiceService
ConsumersConsumers
ServiceService
ProducersProducers
Service Communication
Communicate with messages
No knowledge about partner
Likely heterogeneous
8/8/2019 So a and Web Services
11/56
Service Interfaces andService Interfaces andService ImplementationsService Implementations
Service ConsumersService Consumers
Service Delivery BusService Delivery Bus
ServiceService
RulesRules
& Config& ConfigCh
ange
Ch
ange
Service Platform
Con
tro
l
Con
tro
lServiceService
ReportingReporting
& Mgmt& Mgmt
8/8/2019 So a and Web Services
12/56
SOA Based on Standards
SOA ToolsApp Dev Framework
SOAP, WSDL, UDDISOAP, WSDL, UDDI
WS-I Basic ProfileWS-I Basic Profile
Web Service PolicyWeb Service Policy
Web Service TransactionsWeb Service Transactions
Web Service Reliable MessagingWeb Service Reliable Messaging
J2EE 1.4J2EE 1.4
Web Service SecurityWeb Service Security
Web Service OrchestrationWeb Service Orchestration
Web Service Distributed ManagementWeb Service Distributed Management
Web Service CoordinationWeb Service Coordination
Web Service ChoreographyWeb Service Choreography
TPM, Mainframe,Legacy Sys
Applications
Databases
B2B PartnersJ2EE Application Server (OracleAS 10J2EE Application Server (OracleAS 10gg))
8/8/2019 So a and Web Services
13/56
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
8/8/2019 So a and Web Services
14/56
Agenda
What is SOA ?
Web Services
BPEL Service Oriented Architecture and Oracle
8/8/2019 So a and Web Services
15/56
Services Communicate With Messages
Providing reliability and security to messages Sending messages across consumers and
producers
Service Orchestration
Service
Consumers
Service
Producers
8/8/2019 So a and Web Services
16/56
WSDL
Web Service(J2EE, PL/SQL,
.NET,C/C++,
Legacy )
Web Service(J2EE, PL/SQL,
.NET,C/C++,
Legacy )
Web ServiceClient
(J2EE, .NET,
PL/SQL )
Web ServiceClient
(J2EE, .NET,
PL/SQL )
Points to
description
Describes
Service
Finds
Service
Invokes with
XML Messages
Basic Web Services
SOAP
UDDI
Registry
Points to
service
8/8/2019 So a and Web Services
17/56
Two ApproachesTop Down Contract Driven And BottomUp
Server
Implementation
Service
Interface
WSDL
e.g. EJB/Java Class
to WSDL
e.g. WSDL contract as the
interface & message description
ServerInterface
Service
Implementation
WSDL
Bottom Up Top Down
8/8/2019 So a and Web Services
18/56
J2EE 1.4 Web Services
DescriptionJava APIs
for XML
Java API for XML Registries
Java API for XML Remote Procedure CallJAX-RPC
SAAJ
Java API for XML Data Binding
SOAP API for Attachments in Java
JAXP
JAXB
JAXR
Java API for XML Parsing
Stateless Session EJB Endpoint ModelEJB 2.1
Web Services Deployment ModelJSR 109
8/8/2019 So a and Web Services
19/56
Web Services Interoperability
Web Services Interoperability Develops profiles
Suggests best practices
Provides testing tools
Runtime and tools uptake Oracle JDeveloper analysis
OracleAS compliance
8/8/2019 So a and Web Services
20/56
D E M O N S T R A T I O N
Publishing and Testing a
JAX-RPC Web Service
8/8/2019 So a and Web Services
21/56
Business Process Integration
SubmitSubmit
OrderOrder
CheckCheckInventoryInventory
CheckCheck
CreditCredit
SendSend
Result toResult to
UserUser
Portal
SAP
Java Web App
Mainframe
FormulateFormulate
FulfillmentFulfillmentOfferOffer
FormulateFormulate
RejectionRejection
CanCan
Fulfill?Fulfill?
TransformTransform
Order/Order/
CustomerCustomer
DetermineDetermine
DiscountDiscount
8/8/2019 So a and Web Services
22/56
Building Business Processes
Coordinate asynchronouscommunication betweenservices
Correlate messageexchanges betweenparties
Implement parallel
processing of activities
Manipulate/transformdata between partnerinteractions
Support for long runningbusiness transactionsand activities
Provide consistent
exception handling
How do I
8/8/2019 So a and Web Services
23/56
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
8/8/2019 So a and Web Services
24/56
The BPEL AlternativeGetting 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
8/8/2019 So a and Web Services
25/56
BPEL Process Language Structure
...
...
...
...
...
...
8/8/2019 So a and Web Services
26/56
BPEL ActivitiesProcess Programming Language
Primitive Activities
Structured Activities
8/8/2019 So a and Web Services
27/56
Determine ifCan Fulfill
10:00am
Handle Negative
Credit Exception
Discount Service
start
end
BPEL Flow
?
Credit Service InventoryService
Get Discount
Send Credit Application
Receive Credit Result
03:00pm
Send Inventory Request
Receive Inventory Result
BPEL in Action
8/8/2019 So a and Web Services
28/56
Runtime Framework for BPEL
Enterprise-strength infrastructure for designing, deploying and
managing BPEL business processes
J2EE Application Server
(OracleAS 10g)
BPEL Console
MANAGE
DEHYDRATE
Core BPEL Engine
WSDL Binding Built-in Integration Services
JCA
Web Service
JMS
XQuery XSLT User
Tasks
BPEL
JDeveloper
BPEL
Designer
DESIGN
Oracle DB
BPEL Server
BPELJ
Comprehensive BPEL 1.1 supportEasy-to-install and deploy
Flexible WSIF-basedbinding framework
Easy-to-use modeling tool
Scalability, Fail-over
Operation-friendly deployment unit
Unparalleled management
8/8/2019 So a and Web Services
29/56
Next Level RequirementsUsing BPEL in Real Life
Visual XPATH editor
Extensible WSIF bindingframework
UDDI and WSIL service browser
One-click build and deploy
Java embedding
Email and JMS messagingservices
XSLT and XQuerytransformation services
User task manager and portalintegration
Sync and async messaging
Context dehydration
Advanced exceptionmanagement
Side-by-side versioning Large XML documents
Visual monitoring
Auditing
BPEL debugging
In-flight administration Performance tuning
Partitioning/domains
8/8/2019 So a and Web Services
30/56
D E M O N S T R A T I O N
Building a Business Process
using Web Services
8/8/2019 So a and Web Services
31/56
Enterprise Web Services
Reliability Guaranteed delivery
Security Authentication, encryption and signing
Management Deployment, configuration, monitoring
8/8/2019 So a and Web Services
32/56
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
8/8/2019 So a and Web Services
33/56
Web Services Reliability
Application
Layer
SOAP Node
With
Reliable Messaging
Application
Layer
SOAP Node
With
Reliable Messaging
Msg
Ack
Sender Receiver
At least once semantics At most once semantics
Guaranteed message ordering Exactly once semantics
8/8/2019 So a and Web Services
34/56
Web Services Security
Client
Security
JAX-RPCJAX-RPC
ServiceService
EndpointEndpoint
JAX-RPCJAX-RPC
ClientClient
Transport
HTTP, JMS
SOAP
Message
SOAP
Message
SOAP
Message
SOAP
Message
Server
Security
Add AuthAdd Auth
TokenTokenEncryptEncryptSignSign
DecryptDecryptCheckCheck
SignatureSignatureChck AuthChck Auth
Token*Token*
CheckCheck
SignatureSignatureDecryptDecrypt
Chck AuthChck Auth
TokenToken
SignSignEncryptEncryptAdd AuthAdd Auth
Token*Token*
Authentication- User name/password token- X.509 token-SAML token
XML Digital Signatures XML Encryption
8/8/2019 So a and Web Services
35/56
Web Services Management
J2EE 1.4 requires JMX for management
Web services managed like J2EE resources
WebWeb
Service 1Service 1
WebWeb
Service 2Service 2WebWeb
Service nService n
MessagingMessagingTransactionsTransactions PoolingPoolingJNDIJNDISecuritySecurity
Oracle Application Server J2EE ContainerOracle Application Server J2EE Container
WebWeb
Service 3Service 3
JAX-RPCJAX-RPC EJBEJB Servlet/JSPServlet/JSP
JMX Management Infrastructure (Mbeans, Agents)JMX Management Infrastructure (Mbeans, Agents)
WS-SecurityWS-Security WS-ReliabilityWS-Reliability WS Audit/LogWS Audit/Log
8/8/2019 So a and Web Services
36/56
Baseline Management Characteristics
Auditing, Logging,
Reliability and
WS-Security
Monitoring and
Performance
Analysis
8/8/2019 So a and Web Services
37/56
D E M O N S T R A T I O N
Web Service Security
Reliability and Management
8/8/2019 So a and Web Services
38/56
Interoperating Across the WebServices Standards Stack
Standards-
Based
Interoperability
WS-I
Basic
Profile 1.1
Security
Reliability
Orchestration
Transactions
Coordination
Choreography
Addressing Policy Context
SOAP
UDDIWSDL
8/8/2019 So a and Web Services
39/56
Prescriptive and ReactiveApproaches
WS-I Profiles
Best practices
Testing
SOAPBuilders WSDL 1.1
SOAP 1.1
RPC/encoded, Doc/literal
Links to
Specs
WS-I ProfileWS-I Profile
Conventions
and Best
Practices
8/8/2019 So a and Web Services
40/56
Web Services Interoperability
Web Services Interoperability Develops profiles
Suggests best practices
Provides testing tools
Runtime and tools uptake Oracle JDeveloper analysis
OracleAS compliance
8/8/2019 So a and Web Services
41/56
Perceived Interoperabilityversus 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.
8/8/2019 So a and Web Services
42/56
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
8/8/2019 So a and Web Services
43/56
Developing For Interoperability:Contract Driven And Bottom Up
ServerInterface
Service
Implementation
WSDLServer
Implementation
Service
Interface
WSDL
e.g. EJB/Java Class
to WSDL
e.g. WSDL contract as the
interface & message description
Bottom Up Top Down
8/8/2019 So a and Web Services
44/56
Real InteroperabilityDevelopment 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
8/8/2019 So a and Web Services
45/56
Performance
W b S i P f
8/8/2019 So a and Web Services
46/56
Web Services PerformanceVariables
Throughput Throughput is the number of Web services
requests, typically measured in bytes, handled ina 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 ofSOAP messages
8/8/2019 So a and Web Services
47/56
Achieving Desired Performance
Understand your requirements
Leverage scalable infrastructure
Streaming attachments
Assess alternatives
8/8/2019 So a and Web Services
48/56
Understand Your Requirements
Throughput Latency Doc Size
Process Integration Low Medium Long RunningAsyncTransactions
Up to 10 M,potentially in 100sof Megs
Mobile High Within Human
ResponseThreshold
Small Docs (< 1K)
Web applications
(Portal)
Medium Within HumanResponseThreshold
Small-Med Docs ( 1 GBeventually)
R li bilit S l bilit d
8/8/2019 So a and Web Services
49/56
Reliability, Scalability andAvailability
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
I f t t f RAS i
8/8/2019 So a and Web Services
50/56
Infrastructure for RAS isInfrastructure for Web Services
Policy-BasedResource Mgmt
(Across Multiple
Workloads)
ResourceRedistribution(Time of Day,
Year)1 Server
1 Workload
Application ServerUtilization Costs
WorkloadScaling OnDemand(Better Usage)
CPU ScalingOn Demand(Less HW)
Workload Re-Distribution on Failure
(Session Migration)
R li bilit A il bilit
8/8/2019 So a and Web Services
51/56
OC4JOC4J
OC4JOC4J
Reliability, Availability,Scalability Architecture
Web Client
HTTP
SOAP/HTTP
WebCache
WebCa
che
OHS
OHS
HTTP
mod_o
c4j
mod_o
c4j
AJP
OC4JOC4J
RACJDBC
Process MonitoringProcess Monitoring
and Notification Serviceand Notification Service
Up/Down Invalidation
Health
Up/Down New Health Up/Down Up/Down
Web Services
Application
8/8/2019 So a and Web Services
52/56
Streaming Attachments
Transmissionof SOAP
message with
attachments
Entire messagebody not
loaded into
memory
API for reading
attachments
MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml;start=""
Content-Description: This is the optional message description.
--MIME_boundary
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID:
..
..
--MIME_boundary
Content-Type: image/tiff
Content-Transfer-Encoding: binaryContent-ID:
...binary TIFF image...
--MIME_boundary--
8/8/2019 So a and Web Services
53/56
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 correctlysized hardware
8/8/2019 So a and Web Services
54/56
When All Else Fails
Consider using native protocols rather than
Web services
Consider Apache WSIF Best of both Web services and native protocols
EJB Client EJB
WSDL
with
RMI BindingWSIF Client finds the nativeprotocol binding from the WSDL
Service implementation publishes
the native protocol binding to the WSDL
Client uses RMI to invoke EJB
8/8/2019 So a and Web Services
55/56
Agenda
What is SOA ?
Web Services
BPEL
Interoperability
Performance
8/8/2019 So a and Web Services
56/56
AQ&Q U E S T I O N SQ U E S T I O N SA N S W E R SA N S W E R S