400 likes | 410 Views
SOA and Web Services. Jacques Roy jacquesr@us.ibm.com. Toward a Service Oriented Architecture. Technologies leading to SOA Remote Procedure Calls Corba Concepts Abstractions – business tasks Standards. Insight. People. Tools & Applications. Processes.
E N D
SOA and Web Services Jacques Roy jacquesr@us.ibm.com
Toward a Service Oriented Architecture • Technologies leading to SOA • Remote Procedure Calls • Corba • Concepts • Abstractions – business tasks • Standards
Insight People Tools & Applications Processes Master Data, Entity Analytics, Decision Portals, Executive Dashboards, Industry Data Models Extracted or Real-time Insightful Relationships Standards-based e.g., XQuery, JSR170, JDBC, Web Services... BusinessContext Data & Content Information as a Service Optimize, Virtualize, Integrate, Accelerate Heterogeneous Applications & Information and more… IBM Content Manager IBM abc… xyz… Oracle Information as a ServiceMoving From a Project-Based to a Flexible Architecture (SOA)
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? • Loose coupling • No interdependencies between systems • Reuses existing technology infrastructure • Everything is based on XML and other industry standards • Platform and language independent • Easy, inexpensive • Industry momentum: • Every player is on board: IBM, Microsoft, SAP, Oracle … • Proven interoperability • The timing is right
Apps & Info Assets SOA Reference ArchitectureModel of the Logical Architecture Data access Business Innovation & Optimization Services Provide for better decision-making with real-time business information Interaction Services Process Services Information Services IT ServiceManagement DevelopmentServices Manages diverse data and content in a unified manner Enables collaboration between people, processes & information Orchestrate and automate business processes Enable inter-connectivity between services ESB Integrated environment for design and creation of solution assets Manage and secure services, applications & resources Partner Services Business App Services Access Services Connect with trading partners Build on a robust, scaleable, and secure services environment Facilitate interactions with existing information and application assets Infrastructure Services Optimizes throughput, availability and performance
SOA Standards – Current and Emerging Business Web Services (Best Practices) : Service offerings and components (e.g., Book Flight, Low Fare Search, Update PNR Data, TEA, Request For Design) Business Integration … Evolving industry semantics (RosettaNet, AIAG, ACORD, FIXML, OTAXML, UCCnet, etc.) Emerging Stack Service-oriented Business Resource Description & Interaction Patterns (WS-Collab) Service Composition BPEL4WS WS-Notification WS-Service Group Quality of Experience (QoX) WS-Reliable Messaging WS-Transaction WS-Security WS-Resource Lifetime Current Stack Description WS-Base Faults WS-Resource Properties XSD WSDL WS-Policy WS-Metadata Exchange Messaging SOAP XML WS-Addressing WS-Renewable References Transports JMS RMI / IIOP SMTP HTTP/HTTPS
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 • Discovery • Where is the service? • Description • What service does it offer? • How do I use it? • Messaging • Let’s communicate! Discovery UDDI Description WSDL Messaging SOAP
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 Register WSDL Discover Web Service Service1 SOAP request Application SOAP response
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) • Other tools • 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.
WSDL Specification • XML grammar • <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
SOAP Message SOAP Part SOAP Envelope SOAP Header SOAP Body Attachment Part (optional) Attachment Part (optional) 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: Request Example Call to a fictional web service to get details on product with product id=827635 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getProductDetails xmlns="http://warehouse.example.com/ws"> <productID>827635</productID> </getProductDetails> </soap:Body> </soap:Envelope>
SOAP: Response Example Possible response to a request for product information: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getProductDetailsResponse xmlns="http://warehouse.example.com/ws"> <getProductDetailsResult> <productName>Toptimate 3-Piece Set</productName> <productID>827635</productID> <description>3-Piece luggage set. Black Polyester.</description> <price>96.50</price> <inStock>true</inStock> </getProductDetailsResult> </getProductDetailsResponse> </soap:Body> </soap:Envelope>
SOAP: Give it a REST • REST: REpresentation State Transfer • Restful: Follows the REST principles • Not strictly for web services • 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.
Service Service Interface Interface Interface Interface Interface Service Service Service Service Service Web Services decouples interfaces from applications… Turn this … …into this (web services). Application Application Application Application Interface Interface Application Application Application Application Service interface = • Rich business abstractions describe the application interface • Decouples the interfaces from the business applications • The number and complexity of the interfaces is reduced • Business applications and their interfaces become reusable But separate connection points still leaving bloated interfaces ….
Service Service Service Service Interface Interface Interface Interface Interface Service Service Service Service Service Service Service Service Service Service The ESBus shrinks those interfaces further Turn this (web services)… …into this Interface Interface Enterprise Service Bus Service Service • Enables you to find both the applications and the interfaces for re-use • Decouples the point-to-point connections from the interfaces • Allows for dynamic selection, substitution, and matching • Enables more flexible coupling and decoupling of the applications RESULT Greater Business Responsiveness
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 Integration Developer* Rational Application Developer* WebSphere Business Modeler* Rational Software Architect* WebSphere Business Monitor* WebSphere Application Server & Extended deployment* Tivoli Composite Application Manager* Tivoli Identity & Access Manager * New or Enhanced
IBM Data Servers in the SOA World A new opportunity
Business Intelligence Master Data Management Information Integration Data Management SOA Reference Architecture: Information Services The Heart of Information On Demand • Standards-based • SQL, XQuery, JSR170, XML, Web Services, JDBC, UIMA Information Services Content Management Manages diverse data and content in a unified manner • Virtualized • In Context • Security • Role • Task
Data Servers and SOAExposing DB objects as Services rather than data IBM Data Servers Information Services WS Manages diverse data and content in a unified manner SQL WS Fnctn WS SP
Exposing IDS objects as Web Services SQL-based Application Data Server JDBC, ADO.NET, ODBC, CLI etc. WS SELECT * … SELECT data CALL sp_QtyonHand WS sp_QtyOnHand CALL sp_ApplyDiscount WS sp_ApplyDiscount SOAP XML WS Application getQtyOnHand
Access to data as a serviceKey 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 Web Services Table Functions Web Services Table Functions Web Services Table Functions Web Services Table Functions SP calling Web Services SP calling Web Services SP calling Web Services SP calling Web Services
Consuming data from Web Services SOAP XML Application Web Service getTemp JDBC, ADO.NET, ODBC, CLI etc. IDS SELECT employee.id AS ID, employee.name, employee.zipcode FROM employee WHERE employee.id = ‘10’ employee
Consuming data as Web ServicesA better way IDS Application Web Service getTemp JDBC, ADO.NET, ODBC, CLI etc. Web Service getTemp udf_getTemp function SELECT employee.id AS ID, employee.name, getTemp(employee.zipcode) FROM employee WHERE employee.id = ‘10’ employee
Access to data as a serviceKey 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 Web Services Table Functions Web Services Table Functions Web Services Table Functions MQ Table Functions SP calling Web Services SP calling Web Services ESB SP calling Web Services SP calling MQ
Examples …Verify customer addresses in real time IDS WebSphere Quality Stage Application JDBC, ADO.NET, ODBC, CLI etc. sp_validateAddress stored procedure tr_newCustomer trigger customer INSERT INTO customer VALUES (customer address data)
Examples …Develop new sales channel IDS eBay Application sp_sellItem stored procedure JDBC, ADO.NET, ODBC, CLI etc. Amazon.com tr_newItem trigger overstock INSERT INTO overstock VALUES (overstock item data)
Summary • 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. • It is good and it is easy. Let’s go do it!