Msc course in advanced distributed systems session 1 2b introduction to web services
Download
1 / 33

Computing 312: Topic 3.2 Naming - PowerPoint PPT Presentation


  • 503 Views
  • Uploaded on

MSc Course in Advanced Distributed Systems Session 1.2b: Introduction to Web Services. Information. Contact Dr. Paul Grace C21, Infolab21 [email protected] Reading Newcomer chapter 1: “Introducing Web Services” Web Services Architecture specification http://www.w3.org/TR/ws-arch/

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Computing 312: Topic 3.2 Naming' - PamelaLan


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Msc course in advanced distributed systems session 1 2b introduction to web services l.jpg

MSc Course in Advanced Distributed SystemsSession 1.2b: Introduction to Web Services


Information l.jpg
Information

  • Contact

    • Dr. Paul Grace

    • C21, Infolab21

    • [email protected]

  • Reading

    • Newcomer chapter 1: “Introducing Web Services”

    • Web Services Architecture specification

      • http://www.w3.org/TR/ws-arch/

    • Example services – www.xmethods.net


Introduction to web services l.jpg
Introduction to Web Services

  • Aims of the lecture

    • To appreciate the motivations behind Web Services

    • To understand the technologies associated with Web Services

    • To appreciate how Web Services compare to other middleware technologies

    • To understand the limitations of Web Services


What are web services l.jpg
What are Web Services?

  • New, emerging distributed systems technology

    • Loosely-coupled, Service-oriented approach

    • Major industrial players (IBM, Microsoft, Sun etc.) supporting its development

  • The next step in improving interoperability and overcoming heterogeneity

    • CORBA, EJB provide tightly coupled interoperability

    • Web Services aims to provide open integration

  • An evolving Web standard

    • World Wide Web Consortium (W3C) committees e.g. WSAG developing specs

    • http://www.w3.org/2002/ws/


What is a web service l.jpg
What is a Web Service?

  • Often incorrectly described or misinterpreted

  • “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 a web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialisation in conjuction with other Web related standards.”WSA specification 08/08/03


Why web services 1 l.jpg
Why Web Services (1) ?

  • What is middleware good at?

    • Overcoming heterogeneity and Interoperability problems

  • What problems are there with middleware?

    • Tightly coupled client/server models

    • Development between specified parties (company A and company B)

  • What is the WWW good at?

    • Human interaction with text and graphics

    • Open publication of information

  • Can we utilise the WWW to support application to application interaction?


The world wide web www l.jpg

Amazon.co.uk

Amazon.co.uk

Amazon.co.uk

Play.com

CNN

The World Wide Web (WWW)

Amazon

BBCi

  • Web pages published to a wide audience

  • Open to read by anyone

  • Client can dynamically search, choose and browse

Discover & Interact


Why web services 2 l.jpg
Why Web Services (2)?

  • Take existing software implementation & make it widely available

    • Existing legacy code, database, CORBA objects, EJB components etc…

    • Scope of publication not supported in CORBA, DCOM, EJB …

  • Applications can dynamically discover services that meet their requirements

    • Software-oriented interactions automatically perform operations that previously required manual intervention


An example application l.jpg
An example application

9pm: Reservation at Paris restaurant

Calendar on PDA

Restaurant

Web

Service

Grand Hotel

Hotel

Web

Service

Ibis Hotel

Airline

Web

Service

Air France

EasyJet

British Airways


Why web services 3 l.jpg
Why Web Services (3)?

  • Software solutions heterogeneously implemented

    • Different middleware e.g. EJB, DCOM and CORBA services

    • Problem of Enterprise Application Integration

  • Web Services are abstract entities

    • Higher level framework of interoperation

    • The same client can interoperate with any implementation


Web services interactions l.jpg
Web Services Interactions

  • Middleware typically encompasses a single interaction style

  • Web Services offer a higher level abstraction, encompassing:

    • RPC, Asynchronous messaging, One-way messaging, Broadcast & Publish\Subscribe

  • However, only two styles are typically used

    • Remote Procedure Call

    • Documented Oriented Messaging


Remote procedure call l.jpg
Remote Procedure Call

Interactive Order request/response


Document oriented interaction l.jpg
Document Oriented Interaction

Workflow of purchase order


Web services in action l.jpg
Web Services in Action

  • Web Services are available for you to use today

    • Google

      • E.g. Google Maps API - http://www.google.com/apis/maps/

    • Amazon

      • E.g. S3 storage service, catalogue api

        • http://www.amazon.com/AWS-home-page-Money/b?ie=UTF8&node=3435361

    • Flickr

      • http://www.flickr.com/services/api/

    • Microsoft Live

    • E-bay

      • http://developer.ebay.com/developercenter/soap/

    • And many others


Example combining services l.jpg
Example: Combining Services

  • Google Maps + craigslist rentals= housingmaps.com



Web services core technologies l.jpg
Web Services Core Technologies

  • Discovery

  • Description

  • Interaction

UDDI

X

M

L

WSDL

SOAP


Xml extensible markup language l.jpg
XML (Extensible Markup Language)

  • Basic foundation of Web Services

    • Base language for defining data and how to process it

  • Overcomes limitations of HTML

    • Data has meaning

    • Elements (tags) associate meaning with data

  • XML Schemas ensures that everyone uses the same elements in the same way

  • If two parties share an XML document and the same XML schema they understand the same content

  • This is exactly how Web Services work

    • All messages exchanged are XML documents



Web services description language wsdl l.jpg
Web Services Description Language (WSDL)

  • XML language for interface definition of each Web Service

    • Similar to CORBA and DCOM IDL

    • If sender & receiver share and understand same WSDL file, interoperability is guaranteed

  • Key technology in supporting enterprise application integration

    • Separation of abstract service description from concrete messaging format

  • Divided into three major elements

    • Data type definitions, Abstract definitions & Service bindings



Data type definitions l.jpg
Data Type Definitions

<types>

<schema targetNamespace="http://example.com/stockquote.xsd"

xmlns="http://www.w3.org/2000/10/XMLSchema">

<element name="TradePriceRequest">

<complexType><all>

<element name="tickerSymbol" type="string"/> </all> </complexType>

</element>

<element name="TradePrice">

<complexType><all>

<element name="price" type="float"/>

</all></complexType>

</element>

</schema>

</types>


Abstract definitions l.jpg
Abstract Definitions

<message name="GetLastTradePriceInput">

<part name="body" element="xsd1:TradePriceRequest"/>

</message>

<message name="GetLastTradePriceOutput">

<part name="body" element="xsd1:TradePrice"/>

</message>

<portType name="StockQuotePortType">

<operation name="GetLastTradePrice">

<input message="tns:GetLastTradePriceInput"/>

<output message="tns:GetLastTradePriceOutput"/>

</operation>

</portType>


Service bindings l.jpg
Service Bindings

<binding name="StockQuoteSoapBinding“ type="tns:StockQuotePortType">

<soap:binding style="document"transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="GetLastTradePrice">

<soap:operation

soapAction="http://example.com/GetLastTradePrice"/>

<input> <soap:body use="literal"/></input>

<output> <soap:body use="literal"/></output>

</operation>

</binding>

<service name="StockQuoteService">

<documentation>My first service</documentation>

<port name="StockQuotePort“ binding="tns:StockQuoteBinding">

<soap:address

location="http://example.com/stockquote"/>

</port>

</service>

  • Bindings to SOAP, HTTP & MIME -> Others ??


Slide25 l.jpg
SOAP

  • The SOAP specification defines a messaging framework designed for exchanging formatted XML data across the Internet.

  • Neutral with respect to operating system, programming language, or distributed computing platform.

  • Fundamentally, a one-way communication model

    • Adapted to perform RPC

    • Transfer complete XML documents

  • Abstract communication protocol

    • Bridge between heterogeneous implementations



Discovering web services 3 styles l.jpg
Discovering Web Services (3 Styles)

  • Registry style

    • Authoritative, centrally controlled e.g. UDDI

  • Index approach

    • Open, centralized, free market model

    • 3rd party information included

    • E.g. Google index

  • Peer-to-Peer discovery

    • Decentralised, suited to alternative environments e.g. ubiquitous, ad-hoc


Uddi publishing discovering web services l.jpg
UDDI: Publishing & Discovering Web Services

  • Universal Description, Discovery & Integration (UDDI)

    • A Web Service registry & discovery mechanism for retrieving pointers for web services interfaces

  • UDDI is like a yellow pages directory

    • Companies register extra contact information

  • Vendors Publish information about services

  • Clients search for matching services

  • Centralised discovery mechanism


Web service discovery l.jpg

Return matching service info

Submit data to registry

Create WSDL describing Web Service

Query registry for WSDL

Use WSDL to generate correct messages

Interact with discovered service

Web Service Discovery


The future l.jpg
The Future ?

  • Web Services are primitive compared to established middleware

    • Cannot specify or search by non-functional service properties (cost, security, QoS etc.)

    • Simple interactions are currently only available

    • Work in progress on both e.g Choreography group, semantic search

  • Further Integration (without SOAP)

    • Web Services Invocation Framework

  • New domains

    • Mobile Computing & Ubiquitous Computing


Analysis l.jpg
Analysis

  • The new silver bullet?

    • Web Services do not solve much by themselves

    • Web Services are a new layer, or another way of doing things

    • Important because they bridge technology domains

  • Allow new Interaction styles

  • Promote open publication of software services

  • Solve Enterprise Application Integration

  • XML & WSDL are the key technologies


Web services limitations and restful web services l.jpg
Web Services Limitations and RESTful Web Services

  • The Web Service Stack is heavyweight

    • Difficult to understand

    • Difficult to implement

    • Interoperability is still difficult to achieve

  • A growing number of advocates are proposing RESTful Web services

    • XML services using just the HTTP protocol

    • Loosely coupled, message orientation

    • You’ll hear more about these later in the week


Expected learning outcomes l.jpg
Expected Learning Outcomes

  • To understand the benefits provided by Web Services

  • To be able to compare Web Services with other Middleware technology

  • To understand the technologies at the core of Web Services


ad