48be07b6547c46b3a7e2d3f0974c98d3.ppt
- Количество слайдов: 32
Introduction to Web Services 24 January 2003 Presented by: Christiana Christophi HPCL - High Performance Computing Lab
Agenda What are Web Services? n Why Web Services? n Enabling Technologies? n What is Web Service Composition? n Main Issues concerning the composition? n HPCL - High Performance Computing Lab 2
Web Evolution XML gy olo P/IP n TC ech T Connectivity FTP , E- Inn mai l, G ova oph er tion HTML Presentation Programmability Web Pag es Browse the Web We b. S erv ices Program the Web HPCL - High Performance Computing Lab 3
What are Web Services? n Definition from W 3 C "Web Service is a software application identified by a URI, whose interfaces and bindings are capable of being defined, described, and discovered by XML artifacts and which supports direct interactions with other software applications using XML-based messages via internet-based protocols". HPCL - High Performance Computing Lab 4
What are Web Services? n Every component that n n n works in a network, is modular is self-descriptive, provides services independent of platform and application, conforms to an open set of standards and follows a common structure for description and invocation. HPCL - High Performance Computing Lab 5
Why Web Services n Interoperability. n n Ubiquity. n n Any device which supports HTTP + XML can host & access WS. Effortless entry in this concept. n n Any WS can interact with any other WS. easily understood + free toolkits Industry Support. n major vendors support surrounding technology. HPCL - High Performance Computing Lab 6
Web Services Architecture n Components n n Service Providers Service Brokers Service Requestors Operations n n n Publish / Unpublish Find Bind HPCL - High Performance Computing Lab 7
HPCL - High Performance Computing Lab 8
Enabling technologies n They encapsulate a set of standards that allow the developers to implement distributed applications. n SOAP (Simple Object Access Protocol), n n WSDL (Web Service Description Language) n n XML messaging protocol for basic service interoperability Common grammar for describing services UDDI (Universal Description Discovery and Integration) n infrastructure required to publish and discover services. HPCL - High Performance Computing Lab 9
SOAP n Uniform way of n n 1. 2. 3. passing XML-encoded data. performing RPCs over SMTP, FTP, TCP/IP, HTTP The requestor sends a msg to the service The service processes the msg. The service sends back a response. The requestor has no knowledge of how the service is implemented. HPCL - High Performance Computing Lab 10
SOAP Example <SOAP-ENV: Envelope xmlns: SOAPENV="http: //schemas. xmlsoap. org/soap/envelope/" SOAPENV: encoding. Style="http: //schemas. xmlsoap. org/soap/encoding/"/> <SOAP-ENV: Body> <e: Book> <title>My Life and Work</title> <firstauthor href="#Person-1"/> <secondauthor href="#Person-2"/> </e: Book> <e: Person id="Person-1"><name>Henry Ford</name> <address xsi: type="m: Electronic-address"> <email>mailto: henryford@hotmail. com</email> <web>http: //www. henryford. com</web> </address> </e: Person> <e: Person id="Person-2"> <name>Samuel Crowther</name> <address xsi: type="n: Street-address"> <street>Martin Luther King Rd</street> <city>Raleigh</city> <state>North Carolina</state> </address> </e: Person> </SOAP-ENV: Body> </SOAP-ENV: Envelope> HPCL - High Performance Computing Lab 11
SOAP - RPC n Must define an RPC protocol n n How will types be transported (in XML) and how application represents them. RPC parts (object id, operation name, parameters) SOAP assumes a type system based on XML-schema. HPCL - High Performance Computing Lab 12
SOAP Example - do. Google. Search <SOAP-ENV: Envelope xmlns: SOAP-ENV= http: //schemas. xmlsoap. org/soap/envelope/ xmlns: xsi="http: //www. w 3. org/1999/XMLSchema-instance" xmlns: xsd="http: //www. w 3. org/1999/XMLSchema"> <SOAP-ENV: Body> <ns 1: do. Google. Search xmlns: ns 1="urn: Google. Search" SOAPENV: encoding. Style="http: //schemas. xmlsoap. org/soap/encoding/"> <key xsi: type="xsd: string">0000000000000000</key> <q xsi: type="xsd: string">my query</q> <start xsi: type="xsd: int">0</start> <max. Results xsi: type="xsd: int">10</max. Results> <filter xsi: type="xsd: boolean">true</filter> <restrict xsi: type="xsd: string"/> <safe. Search xsi: type="xsd: boolean">false</safe. Search> <lr xsi: type="xsd: string"/> <ie xsi: type="xsd: string">latin 1</ie> <oe xsi: type="xsd: string">latin 1</oe> </ns 1: do. Google. Search> </SOAP-ENV: Body> </SOAP-ENV: Envelope> HPCL - High Performance Computing Lab 13
SOAP Example - do. Google. Search. Result <SOAP-ENV: Envelope xmlns: SOAP-ENV="http: //schemas. xmlsoap. org/soap/envelope/" ………. . <SOAP-ENV: Body> <ns 1: do. Google. Search. Response xmlns: ns 1="urn: Google. Search" SOAPENV: encoding. Style="http: //schemas. xmlsoap. org/soap/encoding/"> <return xsi: type="ns 1: Google. Search. Result"> <document. Filtering xsi: type="xsd: boolean">false</document. Filtering> <estimated. Total. Results. Count xsi: type="xsd: int">3</estimated. Total. Results. Count> <directory. Categories xmlns: ns 2="http: //schemas. xmlsoap. org/soap/encoding/" xsi: type="ns 2: Array" ns 2: array. Type="ns 1: Directory. Category[0]"/> <search. Time xsi: type="xsd: double">0. 194871</search. Time> <result. Elements xmlns: ns 3="http: //schemas. xmlsoap. org/soap/encoding/" xsi: type="ns 3: Array" ns 3: array. Type="ns 1: Result. Element[3]"> <item xsi: type="ns 1: Result. Element"> <cached. Size xsi: type="xsd: string">12 k</cached. Size> <directory. Category xsi: type="ns 1: Directory. Category">Category</directory. Category> <related. Information. Present xsi: type="xsd: boolean">true</related. Information. Present> <directory. Title xsi: type="xsd: string"/> <summary xsi: type="xsd: string"/> <URL xsi: type="xsd: string">http: //hci. stanford. edu/cs 147/example/shrdlu/</URL> <title xsi: type="xsd: string">< b> SHRDLU< /b> </title> </item> HPCL - High Performance Computing Lab 14
WSDL IDL of Web Services n XML format developed by IBM & MS. n Provides two types of information n Abstract interface: Application-level service description Protocol dependent details HPCL - High Performance Computing Lab 15
WSDL - Abstract interface Messages exchanged in an interaction. n Components: n n Vocabulary (XSD for type definition) Message: abstract, typed data definition sent to and from services. Interaction HPCL - High Performance Computing Lab 16
Vocabulary <wsdl: types> <xsd: schema xmlns="http: //www. w 3. org/2001/XMLSchema" target. Namespace="urn: Google. Search"> <xsd: complex. Type name="Google. Search. Result"> <xsd: all> <xsd: element name="document. Filtering" type="xsd: boolean"/> <xsd: element name="search. Comments" type="xsd: string"/> <xsd: element name="estimated. Total. Results. Count" type="xsd: int"/> <xsd: element name="estimate. Is. Exact" type="xsd: boolean"/> <xsd: element name="result. Elements" type="typens: Result. Element. Array"/> <xsd: element name="search. Query" type="xsd: string"/> <xsd: element name="start. Index" type="xsd: int"/> <xsd: element name="end. Index" type="xsd: int"/> <xsd: element name="search. Tips" type="xsd: string"/> <xsd: element name="directory. Categories" type="typens: Directory. Category. Array"/> <xsd: element name="search. Time" type="xsd: double"/> </xsd: all> </xsd: complex. Type> HPCL - High Performance Computing Lab 17
Message <message name="do. Google. Search"> <part name="key" type="xsd: string"/> <part name="q" type="xsd: string"/> <part name="start" type="xsd: int"/> <part name="max. Results" type="xsd: int"/> <part name="filter" type="xsd: boolean"/> <part name="restrict" type="xsd: string"/> <part name="safe. Search" type="xsd: boolean"/> <part name="lr" type="xsd: string"/> <part name="ie" type="xsd: string"/> <part name="oe" type="xsd: string"/> </message> <message name="do. Google. Search. Response"> <part name="return" type="typens: Google. Search. Result"/> </message> HPCL - High Performance Computing Lab 18
Interaction <binding name="Google. Search. Binding" type="typens: Google. Search. Port"> <soap: binding style="rpc“ transport="http: //schemas. xmlsoap. org/soap/http"/> <operation name="do. Get. Cached. Page"> <soap: operation soap. Action="urn: Google. Search. Action"/> <input> <soap: body use="encoded" encoding. Style="http: //schemas. xmlsoap. org/soap/encoding/" namespace="urn: Google. Search"/> </input> <output> <soap: body use="encoded" encoding. Style="http: //schemas. xmlsoap. org/soap/encoding/" namespace="urn: Google. Search"/> </output> </operation> HPCL - High Performance Computing Lab 19
UDDI Global business registry n Root under www. uddi. org n Three types of information n n White pages Yellow pages Green pages HPCL - High Performance Computing Lab 20
UDDI information model Publisher. Assertion Business. Entity Info about relationship between 2 parties Info about business that publishes Info about service encapsulates Business. Service Descriptive info about a service encapsulates Binding. Template Technical info about a service end point HPCL - High Performance Computing Lab t. Model Descriptions on specifications of services 21
Web Service Composition n Definition: Technique of composing the functionalities of relatively simpler services to produce a ‘meaningful’ arbitrarily complex application. HPCL - High Performance Computing Lab 22
WS composition - Classification n Proactive Composition & Reactive Composition n Proactive: offline composition of available services n n n When: services are stable and always running Example: ticket reservation service Reactive: dynamically creating a composite service. n n When: composite service not often used and service processes not stable. Example: tour manager where the itinerary is not predefined HPCL - High Performance Computing Lab 23
WS composition – Classification (2) n Mandatory & Optional-Composite Services n Mandatory: all subcomponents must participate to yield a result n n Example: service that calculates the averages of stock values for a company. Optional: subcomponents are not obligated to participate for a successful execution. n Example: services that include a subcomponent that is an optimizer. HPCL - High Performance Computing Lab 24
Important issues on WS composition n n n n Service Discovery Service Coordination and Management Uniform Information Exchange Infrastructure Fault Tolerance and Scalability Adaptiveness Reliability & Transactions Security Accountability Testing HPCL - High Performance Computing Lab 25
Service Discovery n An efficient discovery structure should be able: n n n find out all services implementing some functionality (ontology) semantic level reasoning (discover most appropriate service). scalable. Most of existing discovery infrastructures use a central lookup server (Jini, UPn. P) Semantic Language: DAML-S, a process modelling language for computer-interpretable description of services. n AI inspired description logic-based language, built on top of XML + RDF for well-defined semantics and a set of language constructs and properties. HPCL - High Performance Computing Lab 26
Service Discovery - DAML-S Enables automatic Web Service discovery. =automatic location of services with required functionality. n Currently performed manually n DAML-S: expressed in computer interpretable semantic markup. n HPCL - High Performance Computing Lab 27
Service Discovery - Example of DAML-S <daml: Class rdf: ID=”Composite. Process”> <daml: intersection. Of rdf>parse. Type = “daml: collection”> <daml: Class rdf: about=”#Process”/> <daml: Restriction daml: min. Cardinality=” 1”> <daml: on. Property rdf: resource=”#composed. Of”/> </daml: Restriction> </daml: intersection. Of> </daml: Class> <rdf: Property rdf: ID=”composed. Of”> <rdfs: domain rdf: resource=”#Composite. Process”/> <rdfs: range rdf: resource=”#Control. Construct”/> </rdf: Property> HPCL - High Performance Computing Lab 28
Reliability & Transactions n n How we can measure reliability? WS descriptions may lie! Transactions are fundamental to reliable distributed computing. Traditional transaction systems support ACID semantics, use a two-phase commit approach: all participating resources are locked until entire transaction is completed. n n Only in close environments where transactions are short-lived Not on an open environment (flexibility in how it is attained) n MS XLANG: compensating transactions. n Split the model into concurrent sub-transactions that can commit independently (requires compensation over committed sub transactions in case of abortion). HPCL - High Performance Computing Lab 29
Security n n Basic security: HTTP over SSL Authorisation control. n n Existing authorisation control frameworks not applicable to WS (designed for some services e. g. network access control (DIAMETER) or not well designed to access different administrative domains (. NET Passport)) Proposal: generic authorisation control protocol based on SOAP/XML. Supports credential transformation. n n Need for CA in each domain. It will issue users and services with certificate and secret key pairs used for user authentication and request signing. Credentials described in an XML-based language. Authorisation server validates the certificate, credentials etc. If everything is successfully validated, the authorisation server sends back a SOAP response containing the result. HPCL - High Performance Computing Lab 30
References 1. Dipanjan Chakraborty, Service Composition in Ad-Hoc Environments. Ph. D Dissertation Proposal, University of Maryland, Baltimore County, 2001. 2. Dipanjan Chakraborty, Technical Report TR-CS-01 -19: Dynamic Service composition: State-of-the-Art and Research Directions. University of Maryland, Baltimore County, 2001. 3. Anans Rajamam, “Overview of UDDI”, Online, 2001. 4. F. Curbera and al, “Unraveling the Web Services Web: An Introduction to SOAP, WSDL, and UDDI”. IEEE Internet Computing March-April 2002, p. 86 -93. 5. Takashi Suzuki, Randy H. Katz, An authorization control framework to enable service composition across domains. University of California, Berkeley. 6. DAML Service Coalition, DAML-S Semantic Markup for Web Services. Online at http: //www. daml. org/services/daml-s/2001/10/daml-s. html, 2001. 7. WSDL Specification, Online at http: //www. w 3 c. org/TR/wsdl. 8. Steve Vinoski, Web Services and Dynamic Discovery, Online at http: //www. webservices. org/article. php? sid=389, 2001. 9. UDDI Specification, Online at http: //uddi. org/. 10. UDDI Technical White Paper, Online at http: //uddi. org/, 2000. 11. Sheila A. Mc. Ilaith, Tran Cao Son, Honglei Zeng, Semantic Web Services, IEEE Intelligent Systems, 2001 12. Vladimir Tosic, Bernard Pagurek, Babak Esfandiari, Kruti Patel, On the Management of Composition of Web Services, Carleton University, Canada. 13. Tom Clements, “Overview of SOAP”. Online at: http: //dcb. sun. com/practices/webservices/overview_soap. jsp 14. Deitel, ”Web Services: A technical Introduction”, Prentice Hall, 2002. HPCL - High Performance Computing Lab 31
That’s all folks! HPCL - High Performance Computing Lab 32
48be07b6547c46b3a7e2d3f0974c98d3.ppt