Download - SOA, Web Service In Grid Computing
SOA, Web Service In Grid Computing
Phạm Hùng Tiến 00708210Đặng Hoài Đức 00708190
Agenda
Service Oriented Architecture Web Service Grid Service Open Grid Service Architecture(OGSA) Web Service Resource Framework
Service - What Is It?
An autonomous (business) system that accepts one or more requests and returns one or more responses via a set of published and well-defined interfaces
Service - An example
Restaurant provides various kinds of food (services) to its customers according to their requests.
Shopping cart Payment service Order service Checkout service
Service - What Is Service Orientation?
A business-driven “modeling strategy” that defines the business functionality in terms of loosely coupled autonomous business systems (or services) that exchange information based on messages.
Service - Tenets(1)
Boundaries Are Explicit A well-defined and published public
interface Should be easy to consume Provide fewer public interfaces Don’t expose implementation details
Service - Tenets (2)
Autonomous Services are built and deployed
independently of other services
Service - Tenets (3)
Share the Schema and Contract, Not the Class Schema = Data Contract = Behavior Services do not pass classes and types;
they pass schemas and contracts
Service - Tenets (4)
Service Compatibility Is Based on Policy Structural compatibility is based on the
contract (WSDL and optionally BPEL4WS) and the schema (XSD)
WS-Policy provides for additional, automated analysis of the service-assurance compatibility between services
SOA - What Is It?
Service-Oriented Architecture (SOA) is a mechanism that enables organizations to facilitate communication between the systems running on multiple platforms
SOA is a collection of well-defined services, each individual service can be modified independently of other services to help respond to the ever-evolving market conditions of a business
SOA - Actors
Service Provider Provides a stateless, location
transparent business service
Service Registry Allows service consumers to
locate service providers that meet required criteria
Service Consumer Uses service providers to
complete business processes
ServiceRegistry
ServiceProvider
ServiceConsumer
Find Register
Bind,Execute
SOA - Benefits
Business Benefits Focus on Business Domain solutions Leverage Existing Infrastructure Agility
Technical Benefits Loose Coupling Autonomous Service Location Transparency Late Binding
SOA - An Example
Storage Service Storing and retrieving data Reserving space, monitoring status of storage service Querying and defining the policies that govern who is
allowed access the service. Data Transfer Service
Provide operations for requesting the transfer of data from one storage service to another
Managing and monitoring such transfers Querying and defining policies that govern how
difference transfer requests are prioritized. Troubleshooting Service
SOA vs. Component-Based
The key difference is SOA provides a message-based approach based on open standards
SOA is platform independent
SOA - Advantages of Using Messaging Cross-platform Asynchronous communications Reliable communication Thread management Remote communication
Marshaling and Unmarshaling End-to-end security
Web Service
A web service is a programmable application component accessible via standard web protocols.
A Web service is a software system designed to support interoperable machine-to-machine interaction over a network
Just one kind of implementation of a service
Web Service - Key Aspects
Standard protocol HTTP, SMTP, FTP.
Service description Need to describe their interfaces in detail so that
a client knows how to “consume” the functionality provided by the service.
WSDL: Web Services Description Language. Finding services
Users need to know what web services exist and where to find them so the clients can bind to them and use the functionality.
UDDI : Universal Discovery, Description, and Integration repositories
Web Service - Protocol Stack
Web Service SOAP - Simple Object Access Protocol Lightweight communication protocol
based on XML Used to exchange structured and typed
information between systems Allows to invoke methods on remote
machines without knowing specific details of the platform or software running on those machines
Web Service - SOAP Characteristics
Extensible. Works across a number of standardized
underlying network protocols. Independent of the underlying language
or platform or programming model.
Web Service - SOAP Message Structures
SOAP Message -Sample
Method Signature int doubleAnInteger ( int numberToDouble ); Request
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body> <ns1:doubleAnInteger
xmlns:ns1="urn:MySoapServices"> <param1 xsi:type="xsd:int">123</param1>
</ns1:doubleAnInteger> </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP Message -Sample
Response<?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/xmlns:xsi=http://www.w3.org/1999/XMLSchema-instancexmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body> <ns1:doubleAnIntegerResponse
xmlns:ns1="urn:MySoapServices" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"> <return xsi:type="xsd:int">246</return>
</ns1:doubleAnIntegerResponse> </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Web Service - Messaging Using SOAP
Application Web Service
SOAP
Network protocols (HTTP
…)
SOAP
Network protocols (HTTP
…)
Web Service WSDL-Web Service Description Language Describes Service Endpoints What are Endpoints ?
The entity that a client connects to using a specific protocol and data format when consuming a service
Web Service - WDSL: An Overview
Web Service- WDSL : An Example
Web Service - How It Works?
Agenda
Service Oriented Architecture Web Service Grid Service Open Grid Service Architecture(OGSA) Web Service Resource Framework
Grid Service - What is Grid ?
Criteria for a Grid: Coordinates resources that are not subject
to centralized control. Uses standard, open, general-purpose
protocols and interfaces. Delivers nontrivial qualities of service.
Grid Service - What Is It?
Web services that are customized to grid environment: HTTP, SOAP, XML, (G)WSDL
Grid Service vs. Web Service
Transient in Nature (Lifetime, Migration) Stateful Service
Service Data Elements (SDE) Introspection
GWSDL Vs. WSDL Standard Required Interfaces for all Services
Lifetime Management Service Data Interaction
Interfaces Predefined for common (core) Services
Agenda
Service Oriented Architecture Web Service Grid Service Open Grid Service Architecture
(OGSA) Web Service Resource Framework
OGSA – Open Grid Service Architecture
Grid Service Builds on Web Service Improves Web Service
How services are created? How long they live? How to manage faults? How to manage long-lived state?
OGSA - Core Elements
OGSA OGSI – Open Grid Service Infrastructure Grid service descriptions and instances Service state, metadata, and
introspection Naming and name resolution
Two-level naming Service life cycle Fault types
OSGAOGSI – Grid Service Descriptions and Instances
Description: gWSDL GWSDL: portType extension
<gwsdl:portType name="MathPortType“ extends="ogsi:GridService">
</gwsdl:portType> Service Data
Instance Transient Service Create Destroy
OGSA OGSI – Service Data
Standard WSDL has no formalized concept of service state
OGSI addresses these issues by defining WSDL extensions that allow for the explicit declaration of publicly visible state associated with an interface (called service data), and by defining standard operations for accessing (via both queries and subscriptions) that state
Accessing Service Data Pull Mode Push Mode( Subscription)
OGSA OGSI – Service Data
OGSA OGSI – Naming
Dynamic & Stateful Distinguish one dynamically created service instance from another Naming
Allows Grid Services to be upgraded during their lifetime (change protocol, add new protocol,…)
Two level Naming Grid Service Handle (GHS) Mapped by Handle
Resolution Service No protocol, no protocol binding, no network address Invariant
Grid Service Reference (GSR) Use to send requests Change over service’s lifetime
OGSA OGSI – Service Life Cycle
Negotiating an initial lifetime Explicit termination Requesting a lifetime modification
A client requests a lifetime modification by directing keep-alive messages
The client sends periodic keep-alive requests to indicate its continued interest in the service
What happens next?
OGSA OGSI – Service Life Cycle(cont) One of three things happens:
The transfer completes, and the file transfer service instance terminates.
The client fails, and its failure to send further keepalive messages leads to the destruction of the transfer service instance once its lifetime expires.
The client decides that it is no longer interested in the transfer and, to conserve resources, performs an explicit destroy of the transfer service instance.
OGSA OGSI – Fault Model
Define common approach for conveying fault information from operations.
Comprises a standard XSD type, ogsi:FaultType Original service Time stamp
OGSA OGSI – Service Groups
Organizing group of service instances Why?
Someone want to group service instances together
OGSA - Core Services
Address such fundamental issues Name resolution and discovery
HandleResolver interface Service domains Security Policy Messaging, queuing, and logging Events
For interoperability Metering and accounting
Collect, deliver, store, and manage information about resource usage
OGSAData and Information
Services Data naming and access Replication
Tracking, discovering, and performing replication of data resources.
Metadata and provenance Describing and tracking how data are
created Regenerate data on demand
OGSAResource and Service
Management Provisioning and resource management Negotiating between resource consumers
and resource providers for dynamic resource allocation
Service orchestration Transactions Administration and deployment
OGSA and GT3
Agenda
Service Oriented Architecture Web Service Grid Service Open Grid Service Architecture (OGSA) Web Service Resource Framework
WSRF – Web Service Resource Framework
WSRF – Web Service Resource Framework
New standard that replaces OGSI WS Resource = Web Service + stateful
resource which is used in the execution of message exchanges
WSRF
What is a WS-Resource? Examples of WS-Resources:
Physical entities (e.g.. processor, communication link, disk drive)or Logical construct (e.g.. agreement, running task, subscription)
Real or virual
Static (long-lived, pre-existing) orDynamic (created and destroyed as needed)
Simple (one), or Compound (collection)
Unique (for the Web Service) - Has a distinguishable identity and lifetime
Stateful - Maintains a specific state that can be materialized using XML
May be accessed through one or more Web Services
WSRF
A set of six standards, of which only three have been released: WS-ResourceProperties:
how a Web Service interface relates to a WS-Resource WS-ResourceLifetime
lifetime management of WS Resources WS-Notification
event subscription and notification Unreleased:
WS-RenewableReference retrieving updates of invalid endpoint references
WS-ServiceGroup heterogeneous collections of Web Services
WS-BaseFaults faults / error messages
WSRFWhy it was developed?
Criticisms of OGSI from the Web services community: Too much stuff in one spec
=> functionality partitioned into a family of composable specifications
Does not work well with existing Web services tooling => WSRF tones down the usage of XML Schema
Too object oriented: OGSI v1.0 models a stateful resource as a Web service that encapsulates the resource’s state, with the identity and lifecycle of the service and resource state coupled=> WSRF makes an explicit distinction between the “service” and the stateful entities acted upon by that service
WSRF - Resource Properties
Defines the type and values of a WS-Resource’s state that can be viewed and modified
Resource properties document acts as a view on the actual state
Described using XML Schema
WSRF - Resource Properties
GetResourceProperty GetMultipleResourceProperties SetResourceProperties
Insert,update,delete QueryResourceProperties
Using a query expression such as Xpath
WSRF – An Example
WSRF – An Example
<SOAP-ENV:Header> . . . <rpimpl:CartId wsa:IsReferenceParameter="true">S1</rpimpl:CartId>
. . . </SOAP-ENV:Header>
<SOAP-ENV:Body> <wsrf-rp:GetResourcePropertyDocument/></SOAP-ENV:Body>
WSRF – An Example
<SOAP-ENV:Body> <wsrf-rp:GetResourcePropertyDocumentResponse> <ssc:SimpleShoppingCart> <ssc:Item>
<ssc:ProductCode>Cat-A2004-87968556</ssc:ProductCode>
<ssc:Description>Garden String - 150m</ssc:Description> <ssc:Quantity>1</ssc:Quantity> <ssc:ProductPrice>1.59</ssc:ProductPrice> </ssc:Item> </ssc:SimpleShoppingCart> </wsrf-rp:GetResourcePropertyDocumentResponse></SOAP-ENV:Body>
WSRF – Other Protocols
WS-ResourceLifetime How is resource created? How is resource destroyed?
WS-Notification Event subscription and notification
WSRF and GT4
Thank you for your attention !
Q & A
References
http://docs.oasis-open.org/wsrf/wsrf-primer-1.2-primer-cd-02.pdf
http://wikipedia.org/ http://gdp.globus.org/gt3-tutorial/ http://gdp.globus.org/gt4-tutorial/ WS-ResourceProperties:
http://docs.oasis-open.org/wsrf/wsrf-ws_resource_properties-1.2-spec-os.pdf
http://www.ibm.com/developerworks/library/specification/ws-resource/
Representational State Transfer: http://en.wikipedia.org/wiki/Representational_State_Transfer