14
Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

Embed Size (px)

Citation preview

Page 1: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

Web Architecture & Services (1)Service Oriented & Web Oriented Architecture

source: microsoft

Page 2: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

definition(s):

Service-oriented architecture (SOA) is a flexible set of design principles used during the phases of systems development and integration in computing. A system based on a SOA will package functionality as a suite of interoperable services that can be used within multiple separate systems from several business domains.

wikipedia

A service-oriented architecture is essentially a collection of services. These services communicate with each other. The communication can involve either simple data passing or it could involve two or more services coordinating some activity.

www.service-architecture.com

Page 3: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

a service in a SOA context is:

a software component that provides behaviour that can be used by any other component based only on its interface contract. A service has a network-addressable interface. A service stresses interoperability and a service may be dynamically discovered and used.

Page 4: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

properties of services in a SOA context

services are:self-contained- on the client side, no additional software is required (i.e. access via exposed interface) self-describing - neither the client nor the server knows or cares about anything besides the format and

content of the request and response messages (loosely coupled application integration)

can be published, located, and invoked across the network (internet)- uses established lightweight standards such as HTTP and it leverages existing

infrastructureinherently open and standard-based- open-source, vendor agnostic, uses http, xml, json etc.dynamic - can automate description and discoverycomposable- can be chained together and aggregated to provide more complex behavioursloosely coupled- independent, self-contained & encapsulated provide programmatic access- no gui, operates at the code level, implementation hidden (encapsulation)wrap (abstract out) existing applications- legacy, stand-alone applications can be wrapped with a service interface

Page 5: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

service consumer- an application, component or other software module that requests a service; finds the service provider in a service registry, sends a service request and consumes the service

service provider - is a network-accessible application or software component that provides a service to the consumer; the service provider publishes its contract in a service registry to make itself discoverable to service consumers.

service contract - is a specification of the way in which a service consumer can access the functionality of a service - it informs the service consumer of the acceptable format of a service request; the service contract is stored in a service registry, allowing service consumers to discover and utilise the services offered by the provider.

service registry - is a network-accessible registry that accepts and stores service contracts from providers and makes them discoverable to service consumers.

the 4 essential components of a service in a SOA context are:

Page 6: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

provider, consumer & registry (directory) in SOAP context:

Page 7: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

SOAP is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment. SOAP uses XML technologies to define an extensible messaging framework, which provides a message construct that can be exchanged over a variety of underlying protocols. The framework has been designed to be independent of any particular programming model and other implementation-specific semantics.

Simple Object Access Protocol (SOAP):

Page 8: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

SOAP message consists of three parts:- SOAP Envelope- SOAP Header (optional)- SOAP Body

SOAP message format:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <!-- optional -->

<!-- header blocks go here... --> </soap:Header> <soap:Body>

<!-- payload or fault element goes here... --> </soap:Body>

</soap:Envelope>

Page 9: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

POST /InStock HTTP/1.1Host: www.example.orgContent-Type: application/soap+xml; charset=utf-8Content-Length: nnn

<?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

<soap:Body xmlns:m="http://www.example.org/stock">  <m:GetStockPrice>    <m:StockName>IBM</m:StockName>  </m:GetStockPrice></soap:Body>

</soap:Envelope>

example SOAP message (query stock price):

Page 10: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

HTTP/1.1 200 OKContent-Type: application/soap+xml; charset=utf-8Content-Length: nnn

<?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

<soap:Body xmlns:m="http://www.example.org/stock">  <m:GetStockPriceResponse>    <m:Price>34.5</m:Price>  </m:GetStockPriceResponse></soap:Body>

</soap:Envelope>

example SOAP response (stock price):

Page 11: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

Web Service Description Language (WSDL) & Universal Discovery, Description & Integration (UDDI)

wsdl- is an xml vocabulary for describing a web

service, where the service is located, the protocols, operations and methods the service supports and the parameters it expects and responds with

uddi- is a searchable directory that stores

information about web services and the interfaces to those services described by wsdl

Page 12: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

relationship between WSDL, UDDI, SOAP & WS

Page 13: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

SOA is evolving - from SOA to WOA:

Page 14: Web Architecture & Services (1) Service Oriented & Web Oriented Architecture source: microsoft

alphabet soup - service oriented, web oriented and resource oriented architectures: