18bc38616e39c4d8ecb5db8b7259e3d9.ppt
- Количество слайдов: 28
WEB SERVICES: Beyond Component. Based Computing by n Gaurav Sharma Sri Harsha Reddy Meda n n
The Objective n B 2 B applications are expected to drive business processes that are no longer constrained by computer related or company related boundaries.
Limitations of existing OO middleware n n n Middleware technologies like CORBA, COM, EJB create islands, which remain separated hindering the communication and collaboration between components over the Internet. The naïve combination of component-based middleware and Web technologies has proven insufficient for such integration. Enterprise Application Integration(EAI) solutions are proprietary, complex to use and not interoperable.
The solution: A Web-based Middleware
Overview of the common middleware architecture n n n Client and Servant Proxies Broker Architectures Generation of Glue
Client and Servant proxies n n n Proxy is an intermediate layer between the client and the servant to enable distribution transparency. At runtime proxy acts as an interceptor. One proxy at the servant side and one at the client side for providing location transparency. Method invocation paradigm is used to represent the request, responses and faults. Message passing is used to handle method invocation. Problems: n Server activation and deactivation n Hard coding of location information on proxies.
Broker Architectures n The broker component is Globally available n Introduces a central repository to map logical object references to physical ports. n n n n Multiple servants reside on the same server. Servers register with central broker component using shared library or central data store. Servers listen on port assigned by broker for incoming requests. Clients access the broker for the servant’s communication endpoint, a dedicated channel is then established for communication. Problems like Generation of proxies Is a tedious process, error prone, time consuming.
Client Proxy Broker Marshal Unmarshal Receive_result Service_P Srv_registration Srv_lookup Transmit_message Server Proxy Marshal Unmarshal Dispatch Receive_request Client Server Servant Call_service_P Start_task Start_up Main_loop Dispatch Service_i
Client Proxy Broker Server Proxy Server register method call locate server start_up assign port server port marshal unmarshal dispatch marshal unmarshal
Generation of Glue n n n Generation of glue is automated by using tools. Express structural interface related information independent of platform, communication and also programming language. IDL is used to describe the interfaces in n a programming language using coding conventions or a programming language independent way. Generator parses the interface definitions and automatically generates client side and server side proxies.
Why Web-based Middleware? n n The Broker pattern describes the common architectural concepts behind various OO middleware. But this is implemented differently by each of them. An example of this limitation is that it is almost impossible to invoke a CORBA servant from a Web-based COM client without using proprietary solutions. Technologies like COM, CORBA were not implemented with the Web in mind. Thus, additional efforts are required to transmit CORBA or COM method requests over HTTP. Usage of static glue limits their ability to meet dynamic requirements of the Web. Thus, integrating existing OO middleware into the Web is not the solution to achieve interoperability.
The Solution (Web-based Middleware) n n Integrate the Web into OO middleware. Implement the Broker architecture using Internet standard protocols and XML.
Steps required n n n Implementing the Communication Protocol Implementing an Interface Definition Language (IDL) Implementing a Service Directory
SOAP - The Communication Protocol n n SOAP (Simple Object Access Protocol) is used to expose useful functionality through the Web. Defines the syntax, semantics and order of messages exchanged between peers a decentralized, distributed environment. Leverages HTTP. XML (a self-describing data representation) is used as to structure and encode messages, which makes it easier to interpret messages on the fly.
SOAP Message A SOAP message is based on XML and contains the following parts n Envelope: Top-level container to represent the message. n Header: Generic container for added features to a SOAP message. n Body: Container for mandatory information intended for the ultimate message receiver. Envelope Header Body
SOAP Message (contd) <? xml version="1. 0" encoding="UTF-8" ? > <env: Envelope xmlns: env="http: //www. w 3. org/2001/09/soap-envelope"> <env: Header> <n: someattribute xmlns: n="http: //example. org/someattribute"> <n: priority>1</n: priority> <n: expires>2001 -06 -22 T 14: 00 -05: 00</n: expires> </n: someattribute> </env: Header> <env: Body> <m: someinfo xmlns: m="http: //example. org/someinfo"> <m: msg>Please get the expert</m: msg> </m: someinfo> </env: Body> </env: Envelope>
WSDL - The IDL n n WSDL (Web Services Definition Language) defines an XML grammar for describing the services as collections of communication endpoints capable of exchanging messages. Used to automatically generate the client -side & the server-side proxies.
WSDL structure n n n Types: Provides data type definitions used to describe the messages exchanged. Message: Represents an abstract definition of the data being transmitted. A message consists of logical parts, each of which is associated with a definition within some type system. Port. Type: Set of abstract operations. Each operation refers to an input message and output messages. Binding: Specifies concrete protocol and data format specifications for the operations and messages defined by a particular port. Type. Port: Specifies an address for a binding, thus defining a single communication endpoint. Service: Used to aggregate a set of related ports.
UDDI – The Service Directory n n n UDDI (Universal Discovery, Description & Integration) provides all functionality of a service broker. It is a specification for distributed Webbased information registries of Web Services. UDDI registries are used to promote and discover these distributed Web Services.
Web Services Operation Inquire the Web Service UDDI Service Registry Publish the Web Service Transfer WSDL Client Request over SOAP Response over SOAP Web Server hosting the Web Service
Web Services Operation (contd) Web Server Incoming Requests Web Service Connectors Incoming Requests Web Service Back-end Enterprise System
A Broker is not enough n n n For building sophisticated solutions it is not sufficient to provide a stack of protocols. Information & services must be consumable from any device, any place, anytime. Can be achieved using a virtual execution system (JVM or MS CLR) Web Services infrastructure should support context information such as transaction IDs, security & location. Represent gateways to existing back-end servers. This integration can take advantage of the existing OO middleware technologies. Reuse & integration are support by introducing core services.
Integration via Web Services n n n Include virtual execution engines that can be ported to new environments quickly. SOAP, WSDL & UDDI help to easily integrate existing OO middleware into the Web Services can be connected to CORBA, COM, EJB. X-Schema, XSLT used for data representation & transformation across heterogeneous applications.
Drawbacks n n n Web Services is an immature technology. Interoperability cannot be guaranteed since the used standards are still evolving. Web Services lack OO concepts such as inheritance, polymorphism, or even the notion of objects.
Conclusion Existing OO middleware may still be used to implement complex back-end services, but Web Services will be used to connect these islands across the Internet.
References n n n Michael Stal, “Web Services: Beyond Component-Based Computing”, Communications of the ACM, Oct 2002/Vol 45, No. 10 Philippe Mougin & Christophe Barriolade, “Web Services, Business Objects and Component Models”, Orchestra Networks, White Paper - July 2001 http: //www. w 3. org/TR/SOAP http: //www. w 3. org/TR/wsdl http: //middleware. internet 2. edu
Q&A
Thank You
18bc38616e39c4d8ecb5db8b7259e3d9.ppt