0207-Service Oriented Architecture and Web Services.pptPresentation Transcript
SOA and Web Services Jacques Roy [email_address]
Toward a Service Oriented Architecture
Technologies leading to SOA
Remote Procedure Calls
Abstractions – business tasks
Information as a Service Moving From a Project-Based to a Flexible Architecture (SOA) and more… abc… IBM IBM Content Manager Oracle xyz… Heterogeneous Applications & Information Insight Information as a Service Optimize, Virtualize, Integrate, Accelerate Data & Content Business Context Insightful Relationships Master Data, Entity Analytics, Decision Portals, Executive Dashboards, Industry Data Models Extracted or Real-time Standards-based e.g., XQuery, JSR170, JDBC, Web Services... Processes People Tools & Applications
The “Integration” Challenge
In the 1980s and early 1990s we were buying best of breed point solutions for automating specific business tasks. Result: islands of automation.
Late 1990’s saw a huge push towards integrating islands of automation in to cohesive end-to-end systems:
Large in-house integration projects
Huge investments in to integrated product suites for ERP, CRM etc.
Integration is very hard and very expensive:
requires a lot of planning and coordination between all of the systems involved
Integrated systems become inflexible and unable to adapt to changes in business processes
The Role of SOA: Solving the Integration Challenge
Systems that can accommodate new business processes and new relationships as needed
Systems based on loosely coupled distributed components
Simplify implementations by making components autonomous and allow them to be used when needed
Allow selection of best-of-breed components to lower cost and deliver higher business value
IBM view for an “on Demand Business” An on demand business is an enterprise whose business processes – integrated, end-to-end, across the company and with key partners, suppliers and customers – can respond with speed to any customer demand, market opportunity or external threat.
What is SOA?
“ Service-Oriented Architectures (SOA) is a set of patterns for building distributed systems where one application that comprises a system can find another application that provides needed service and can exchange data with it.”
SOA is not a product
Why is SOA Different?
No interdependencies between systems
Reuses existing technology infrastructure
Everything is based on XML and other industry standards
Platform and language independent
Every player is on board: IBM, Microsoft, SAP, Oracle …
The timing is right
SOA Reference Architecture Model of the Logical Architecture Business Innovation & Optimization Services Provide for better decision-making with real-time business information Development Services Integrated environment for design and creation of solution assets Interaction Services Enables collaboration between people, processes & information Process Services Orchestrate and automate business processes Information Services Manages diverse data and content in a unified manner ESB Enable inter-connectivity between services Partner Services Connect with trading partners Business App Services Build on a robust, scaleable, and secure services environment Access Services Facilitate interactions with existing information and application assets IT Service Management Manage and secure services, applications & resources Infrastructure Services Optimizes throughput, availability and performance Data access Apps & Info Assets
SOA Standards – Current and Emerging Service Composition Transports Messaging Description Quality of Experience (QoX) HTTP/HTTPS SMTP RMI / IIOP XSD WSDL SOAP XML WS-Addressing WS-Renewable References WS-Metadata Exchange WS-Policy WS-Service Group WS-Resource Properties JMS WS-Security WS-Reliable Messaging WS-Transaction WS-Resource Lifetime WS-Base Faults WS-Notification BPEL4WS Current Stack Business Integration … Emerging Stack Business Web Services (Best Practices) : Service offerings and components (e.g., Book Flight, Low Fare Search, Update PNR Data, TEA, Request For Design) Evolving industry semantics (RosettaNet, AIAG, ACORD, FIXML, OTAXML, UCCnet, etc.) Service-oriented Business Resource Description & Interaction Patterns (WS-Collab)
Why Are CIOs Looking at SOA?
To save money:
Integrated systems save money
Open standards and common components means lower labor cost and bigger pool of skill
Extend the life of current applications and other assets while building new systems
“Pay as you go” schemes for web services are possible
… and to help the business make money:
Open up new business opportunities: new markets, new partners
Bring products and services to market faster
What is a Web Service? (W3C definition)
A Web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.
What is a Web Service: A Simpler Definition
A Web Service is a standards-based way for an application to call a function over a network and to do it without having to know:
the location where the function will be executed,
the platform where the function will be run,
the programming language it is written in, or even
who built it.
Most important: Web Services are Easy !
Web Services: The 3 things at the core
Where is the service?
What service does it offer?
How do I use it?
Discovery UDDI Messaging SOAP Description WSDL
Web Service: Standard is Key
WSDL is used to describe the function(s) that an application will be calling documenting in a standard way its entry points, parameters and output
XML is used to carry the values of parameters and the outputs of the function
SOAP is used as the messaging protocol that carries content (XML) over a network transport (typically HTTP)
HTTP is used as the network transport layer
Web Services Interaction UDDI Service1 Web Service Service1 Application Register Discover WSDL SOAP response SOAP request
Web Services Development and Deployment
Tools should be used for development
Ex: IBM Data Studio
Runtimes are expected to run services
Websphere Application Servers, Geronimo, etc.
Apache Soap (based on IBM SOAP4J) with Xerces XML parser (also contributed by IBM)
WSDL generation, UDDI, etc.
WSDL: Web Service Description Language
WSDL (Web Services Description Language) is a public description of the interfaces offered by a web service. Expressed in XML, it provides machine readable document that provides a calling application all of the information required to interact with a web service.
<definitions>: root WSDL element
<types>: data types transmitted (starts with XML Schema specifications)
<message>: messages transmitted
<portType>: functions supported
<binding>: specifics of transmissions
<service>: how to access it
WSDL A walk through an example <?xml version="1.0" ?> - <definitions name="TemperatureService" targetNamespace="http://www.xmethods.net/sd/TemperatureService.wsdl" xmlns:tns="http://www.xmethods.net/sd/TemperatureService.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> - <message name="getTempRequest"> <part name="zipcode" type="xsd:string" /> </message> - <message name="getTempResponse"> <part name="return" type="xsd:float" /> </message> - <portType name="TemperaturePortType"> - <operation name="getTemp"> <input message="tns:getTempRequest" /> <output message="tns:getTempResponse" /> </operation> </portType> … (continued on the next page)
WSDL A walk through an example … (continued from previous page) - <binding name="TemperatureBinding" type="tns:TemperaturePortType"> <soap:binding style="rpc" transport= http://schemas.xmlsoap.org/soap/http /> - <operation name="getTemp"> <soap:operation soapAction="" /> - <input> <soap:body use="encoded" namespace="urn:xmethods-Temperature-Demo" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> - <output> <soap:body use="encoded" namespace="urn:xmethods-Temperature-Demo" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> </operation> </binding> - <service name="TemperatureService"> <documentation>Returns current temperature in a given U.S. zipcode</documentation> - <port name="TemperaturePort" binding="tns:TemperatureBinding"> <soap:address location="http://services.xmethods.net:80/soap/servlet/rpcrouter" /> </port> </service> </definitions>
SOAP: A Description
Industry standard message format for sending and receiving data between a web services consumer and a web service provider
SOAP messages are XML documents which have an envelope and:
Header (optional): contains information about the message such as date/time it was sent or security information
Body: contains the message itself
Standard messaging protocol maintained by the W3C XML Protocol Working Group .
SOAP used to stand for Simple Object Access Protocol SOAP Message Attachment Part (optional) Attachment Part (optional) SOAP Part SOAP Envelope SOAP Body SOAP Header
SOAP: Request Example
Call to a fictional web service to get details on product with product id=827635
Term used loosely as a method of sending information over HTTP without using a messaging envelope
Enterprise Service Bus
Enterprise Service Bus is a set of patterns that can be applied to implement SOA-based systems. These patterns make extensive use of messaging and event notification to deliver core values.
Enterprise Service Bus
“ Enterprise Service Bus is a set of patterns that can be applied to implement SOA-based systems. These patterns make extensive use of messaging and event notification to deliver core values.”
ESB is a intermediary between the clients that consume services and various systems that provide these services.
Instead of client talking directly to a service provider, requests are routed through a middleware system that handles the specific details of locating the service provider, negotiating integration with the service provider, interacting with the service provider, and so on.
ESB replaces RPC-like synchronous Web Service invocations with message-based and event-based interactions.
ESB enhances traditional message-based systems with discovery and self-describing characteristics typically attributed to Web Services.
Web Services decouples interfaces from applications… Turn this … … into this (web services). Application Application Application Application Application Application Application Application
Business applications and their interfaces become reusable
Decouples the interfaces from the business applications
The number and complexity of the interfaces is reduced
Rich business abstractions describe the application interface
But separate connection points still leaving bloated interfaces …. Service Interface Interface = interface Service Service Service Service Service Service Service Interface Interface Interface Interface Interface
The ESBus shrinks those interfaces further RESULT Greater Business Responsiveness
Allows for dynamic selection, substitution, and matching
Enables you to find both the applications and the interfaces for re-use
Decouples the point-to-point connections from the interfaces
Turn this (web services)…
Enables more flexible coupling and decoupling of the applications
… into this Service Enterprise Service Bus Service Interface Interface Service Service Service Service Service Service Service Service Service Service Service Service Service Service Interface Interface Interface Interface Interface
The SOA Lifecycle
Model & Simulate
Construct & Test
Manage and integrate information
Manage applications & services
Manage identity & compliance
Monitor business metrics
SOA Foundation Process: WebSphere Process Server* WebSphere ESB* & Message Broker* WebSphere Partner Gateway & Adapters People: WebSphere Portal* WebSphere Everyplace Deployment* Workplace Collaboration Services* Information: IDS/DB2 WebSphere Information Integrator* WebSphere Business Monitor* WebSphere Application Server & Extended deployment* Tivoli Composite Application Manager* Tivoli Identity & Access Manager WebSphere Business Modeler* Rational Software Architect* WebSphere Integration Developer* Rational Application Developer* * New or Enhanced
IBM Data Servers in the SOA World A new opportunity
SOA Reference Architecture: Information Services Content Management Information Services Manages diverse data and content in a unified manner
SQL, XQuery, JSR170, XML, Web Services, JDBC, UIMA
The Heart of Information On Demand Master Data Management Information Integration Data Management Business Intelligence
Data Servers and SOA Exposing DB objects as Services rather than data IBM Data Servers WS SP WS SQL WS Fnctn Information Services Manages diverse data and content in a unified manner
Exposing IDS objects as Web Services data JDBC, ADO.NET, ODBC, CLI etc. Data Server WS sp_ApplyDiscount WS SELECT WS sp_QtyOnHand CALL sp_QtyonHand SQL-based Application SELECT * … WS Application getQtyOnHand CALL sp_ApplyDiscount SOAP XML
Access to data as a service Key value proposition
Instantly transform existing stored procedures into a collection of reusable services.
DRY = Don’t Repeat Yourself. Build new logic once and make it accessible via SQL or as a service
Instantly SOA enable mainframe and iSeries data
Consuming Web Services to get real time data IDS SP calling Web Services Web Services Table Functions SP calling Web Services SP calling Web Services SP calling Web Services Web Services Table Functions Web Services Table Functions Web Services Table Functions
Consuming data from Web Services IDS Web Service getTemp SELECT employee.id AS ID, employee.name, employee.zipcode FROM employee WHERE employee.id = ‘10’ employee JDBC, ADO.NET, ODBC, CLI etc. Application SOAP XML
Consuming data as Web Services A better way IDS Web Service getTemp udf_getTemp function SELECT employee.id AS ID, employee.name, getTemp(employee.zipcode) FROM employee WHERE employee.id = ‘10’ employee JDBC, ADO.NET, ODBC, CLI etc. Application Web Service getTemp
Access to data as a service Key value proposition
DRY = Don’t Repeat Yourself. Build reusable services instead of putting the same logic in every application
Gain flexibility of proper data architecture and data placement
Build agile applications that are able to respond to business needs
IDS and SOA: Plugging in to ESB IDS SP calling Web Services Web Services Table Functions SP calling Web Services SP calling Web Services SP calling MQ Web Services Table Functions Web Services Table Functions MQ Table Functions ESB
Examples … Verify customer addresses in real time IDS WebSphere Quality Stage tr_newCustomer trigger INSERT INTO customer VALUES ( customer address data ) customer JDBC, ADO.NET, ODBC, CLI etc. Application sp_validateAddress stored procedure
Examples … Develop new sales channel IDS eBay tr_newItem trigger INSERT INTO overstock VALUES ( overstock item data ) overstock JDBC, ADO.NET, ODBC, CLI etc. Application sp_sellItem stored procedure Amazon.com
SOA and Web Services are not as scary or new and different as acronyms may imply. Just a set of standards-based architecture patterns for building distributed systems.
SOA deploys to an existing IT infrastructure and IBM SOA offers comprehensive solutions for overlaying SOA on top.
DB2 is already SOA-enabled:
Tools and facilities to expose DB2 objects as a service
Tools and facilities to consume data delivered through Web Services
Tools coming to bring business perspective to DB2 web services (BPEL)
Existing investments in stored procedures and functions are going to pay off in new ways.