Web Services and Grid Services
-
Upload
alika-tyler -
Category
Documents
-
view
47 -
download
0
description
Transcript of Web Services and Grid Services
![Page 1: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/1.jpg)
http://www.epcc.ed.ac.uk/~ogsanet
February 24th-25th 2004
Web Services and Grid Services
Mike Jackson – EPCC
Some slides in this presentation are graciously provided by the OGSA-DAI Project
![Page 2: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/2.jpg)
2
Purpose
XML and Web Services Grids OGSA OGSI
![Page 3: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/3.jpg)
3
XML and Web Services
![Page 4: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/4.jpg)
4
Web Services (1/2)
Network-enabled application Exposes a well-defined interface Often Stateless:
– Born– Services Request– Dies
State maintenance dependant on service hosting environment Accessible using common Internet protocols:
– HTTP
XML-oriented technology:– Describe services and their interfaces:
• WSDL – Web Services Description Language
– Support messaging:• SOAP – Simple Object Access Protocol
![Page 5: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/5.jpg)
5
WSDL
Web Services (2/2)
Client
Web ServiceApplication
Code
Application Code Database
SOAP Request
SOAP Response
![Page 6: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/6.jpg)
6
XML
eXtensible Markup Language Standard format for structured documents and data:
– Supports exchange over heterogeneous platforms
Human-readable:– Less efficient than proprietary formats
Address the limitations of HTML:– Application-specific syntax and semantics
![Page 7: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/7.jpg)
7
An Example of XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- A list of attendees on some course -->
<attendees>
<attendee id=“123”>
<name first-name=“Mike” last-name=“Jackson”/>
<institution>EPCC</institution>
</attendee>
<attendee id=“456”>
<name first-name=“Daragh” last-name=“Byrne”/>
<institution>EPCC</institution>
</attendee>
</attendees>
![Page 8: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/8.jpg)
8
XML Namespaces (1/3)
<film-types>
<film-type>RomCom</film-type>
<film-type>Spaghetti Western</film-type>
</film-types>
<film-types>
<film-type>amphipathic</film-type>
<film-type>hydrophobic</film-type>
</film-types>
![Page 9: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/9.jpg)
9
XML Namespaces (2/3)
Telephone numbers:– Within Edinburgh University: 50-5141
– Within Edinburgh: 650-5141
– Within the UK: 0131-650-5141
XML namespaces:
<xmlns:bio=“http://bio.stuff/membrane” bio:film-types>
– Namespace prefix:• Declaration: xmlns:• Maps to URI reference: bio
– URI reference:• Global URI: “http://bio.stuff/membrane”
– Local part: film-types– Qualified name: bio:film-types
![Page 10: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/10.jpg)
10
XML Namespaces (3/3)
<xmlns:cinema=“http://world.cinema/flix” cinema:film-types>
<cinema:film-type>RomCom</cinema:film-type>
<cinema:film-type>Spaghetti Western</cinema:film-type>
</cinema:film-types>
<xmlns:bio=“http://bio.stuff/membrane” bio:film-types>
<bio:film-type>amphipathic</bio:film-type>
<bio:film-type>hydrophobic</bio:film-type>
</bio:film-types>
![Page 11: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/11.jpg)
11
XML Schema
Specify the structure of XML documents:– Names of elements and attributes
– Content of elements
– Values of attributes
– Namespaces of elements
XML Schema are XML documents Facilitates validation of XML documents:
– Check conformance of document to XML Schema:• Are elements nested legally?• Do elements have legal attributes?• Do attributes have legal values?
More information from:– http://www.w3.org/XML/Schema
![Page 12: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/12.jpg)
12
SOAP (1/2)
Simple Object Access Protocol:– a stateless,– one-way,– message exchange paradigm
Framework to convey application-specific information in an extensible manner
Specifies rules for:– SOAP envelopes – container for:
• Header: originator and destination and application-specific information e.g. payment or authentication details about the SOAP message
• Body: message data
– Data encoding format– Conventions for message encoding:
• Document-style• RPC-style
![Page 13: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/13.jpg)
13
SOAP Example (1/2)
<soapenv:Envelope>
<soapenv:Header>
<wsse:Security
soapenv:actor=“http://some.security.intermediary"
soapenv:mustUnderstand=“1">
. . .
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<!–- An RPC call to a sayHelloWorld() operation -->
<sayHelloWorld/>
</soapenv:Body>
</soapenv:Envelope>
![Page 14: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/14.jpg)
14
SOAP Example (2/2)
<soapenv:Envelope> <soapenv:Header> <wsse:Security soapenv:actor=“http://some.security.intermediary" soapenv:mustUnderstand=“1"> . . . </wsse:Security> </soapenv:Header> <soapenv:Body> <sayHelloWorldResponse> <!–- The result of the sayHelloWorld() operation --> <helloMessage>Hello World!</helloMessage>
</sayHelloWorldResponse> </soapenv:Body></soapenv:Envelope>
![Page 15: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/15.jpg)
15
SOAP (2/2)
Silent on: – Semantics of any application-specific data it conveys– Routing of SOAP messages– Reliable data transfer
– Firewall traversal Can operate over various transports:
– HTTP– FTP– SMTP
Fully describes the required actions to be taken by a SOAP node on receiving a SOAP message
More information from– http://www.w3.org/2000/xp/Group/
![Page 16: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/16.jpg)
16
WSDL (1/2)
Web Services Description Language – 1.1 XML description of Web Services:
– Define input and output messages– Define operations in terms of input and output messages– Aggregate operations into portTypes:
• Application-specific collections of related operations.
– Combine portTypes with a concrete network protocol and message format to form a binding:
• How to communicate to a service’s portType.
– Combine a binding and a network address to define a concrete network endpoint or port:
• Where to find a service’s portType.
– Aggregate ports into an abstract network endpoint or service
![Page 17: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/17.jpg)
17
WSDL (2/2)
WSDL is extensible:– Allows description of endpoints and their messages – Regardless of what message formats or network protocols are used to
communicate
Typically used in conjunction with following protocols and message formats:– SOAP 1.1– HTTP GET/POST– MIME
More information from:– http://www.w3.org/TR/wsdl
![Page 18: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/18.jpg)
18
WSDL Example (1/3)<?xml version="1.0" encoding="UTF-8"?><definitions name="HelloWorld"> <types> <xsd:schema> <!-- For example <helloMessage>HelloWorld!</helloMessage> --> <xsd:complexType name="HelloMessageType"> <xsd:sequence> <xsd:element name="helloMessage“ type="xsd:string"/> </xsd:sequence> </xsd:complexType> <!-- For example <sayHelloWorld/> --> <xsd:element name="sayHelloWorld"> <xsd:complexType/> </xsd:element> <!-- For example <sayHelloWorldResponse> <helloMessage>HelloWorld!</helloMessage> </sayHelloWorldResponse/> --> <xsd:element name="sayHelloWorldResponse" type="HelloMessageType"/> </xsd:schema>
</types>
![Page 19: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/19.jpg)
19
WSDL Example (2/3)
<message name="HelloInputMessage"> <part name="parameters“ element="sayHelloWorld"/> </message> <message name="HelloOutputMessage"> <part name="parameters" element="sayHelloWorldResponse"/> </message> <portType name="HelloWorldPortType"> <operation name="sayHelloWorld"> <input message="HelloInputMessage"/> <output message="HelloOutputMessage"/> </operation> </portType>
![Page 20: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/20.jpg)
20
WSDL Example (3/3)
<binding name="HelloWorldSOAPBinding" type="helloworld:HelloWorldPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="sayHelloWorld"> <soap:operation
soapAction="http://www.tutorial.org/myservices/helloworld#sayHelloWorld"/>
<input><soap:body namespace="http://www.tutorial.org/myservices/helloworld" use="literal"/></input> <output><soap:body namespace="http://www.tutorial.org/myservices/helloworld" use="literal"/></output> </operation> </binding></definitions>
![Page 21: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/21.jpg)
21
Web Services – Summary
XML:– eXtensible Markup Language– Namespaces– XML Schema
SOAP:– Simple Object Access Protocol– Stateless, one-way message exchange paradigm
WSDL:– Web Services Description Language– Abstract interface description– Concrete service location and communication information.
Web Services:– Stateless– XML-oriented technology
![Page 22: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/22.jpg)
22
Grids
![Page 23: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/23.jpg)
23
Motivating Grids
Difficult problems – “Grand Challenges” – require:– Collaboration– Sharing:
• Ideas
• Efforts
• Resources – computational, data, storage
Emerging Open Grid Infrastructures will:– Support global collaboration– Change the way that we work
![Page 24: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/24.jpg)
24
What are Grids?
Grids are about dynamic Virtual Organisations (VOs) sharing data and computing resources
Virtual Organisations:
“Dynamic groups of individuals, institutions, and resources, which have a well-defined set of sharing and Quality-of-Service (QoS) rules associated with
them”P. Z. Kunszt, The Open Grid Services Architecture: A Summary and Evaluation, CERN, April 2002.
![Page 25: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/25.jpg)
25
Virtual Organisations
VOs include:– Resource users– Resource providers:
• Including application, data and storage service providers
Resources include:– Data resources– Servers– Other programs
Resource Usage Policies:– Grid end-users can utilise resources according to:
• The policies (rules) of the VO of which they are a member of• The policies of the resource providers
Dynamic VOs:– VOs should be able to change in scope and extension, transparently from the
end users, or clients
![Page 26: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/26.jpg)
26
Examples of VOs
Scientific Collaborations:– e.g. Astronomers, Geneticists, Physicists, Medics:
• Need to share and integrate data
• Need to share computing power for data analysis
Engineering Collaborations:– e.g. Aircraft design and construction consortia:
• Need to share computing power for simulations for design
• Need to share and integrate analysis data and results
Business:– e.g. Business-to-Business (B-to-B):
• Need to share and integrate data
• Need to share computing power for e.g. data mining, market simulations
![Page 27: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/27.jpg)
27
Open Grids
Open Grids enable:
– Coordinated and coherent collaboration
– Resource sharing
Service component-based Grids enable heterogeneous environments to be integrated and reconciled to accomplish complex tasks
Service components support heterogeneity:
– Interface- and message-passing-based
– Hide platform and implementation
![Page 28: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/28.jpg)
28
OGSA
![Page 29: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/29.jpg)
29
What is OGSA?
Open Grid Services Architecture:
– Open Grid Architecture + Web Services = Grid Services
Grid Services:– Dynamic– Transient– Stateful – have a finite lifetime– Defined by a well-defined set of interfaces and behaviours
More information from:– http://forge.gridforge.org
![Page 30: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/30.jpg)
30
OGSA Characteristics
Supports:– Resource access
– Resources sharing
– Service integration
– Uniform access to services
Specifies protocols and standards that:– Are:
• Implementation-independent• Platform-independent
– Support:• Communication• Data access, transfer, translation and transformation• Access and security• Auditing and logging
![Page 31: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/31.jpg)
31
Best of Both Worlds
Web Services
Business integration
Secure and universal access
Applications on demand
Grid Protocols
Vast resourcescalability
Global Accessibility
Resourceson demand
ContinuousAvailability
Accessresource
Manageresource
Shareresource
Open Grid Services Architecture
![Page 32: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/32.jpg)
32
OGSA Structure
System Management Services
Web Services
Open Grid Services Infrastructure
Grid Services
![Page 33: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/33.jpg)
33
OGSI
![Page 34: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/34.jpg)
34
What is OGSI?
Open Grid Services Infrastructure Minimum set of standards and behaviours with which Grid Services must
comply Exploits existing Web Services properties:
– Interface abstraction via WSDL portTypes– Web Service protocols– Hosting platform-independent
Extends these to provide for:– State management– Event notification– Service location and access– Lifecycle management– Service data
More information from:– http://forge.gridforge.org
![Page 35: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/35.jpg)
35
OGSI PortTypes (1/2)
GridService:– findServiceData– setServiceData– requestTerminationBefore– requestTerminationAfter– destroy
Factory:– createService
HandleResolver:– findByHandle
ServiceGroup ServiceGroupRegistration:
– add– remove
![Page 36: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/36.jpg)
36
OGSI PortTypes (2/2)
ServiceGroupEntry NotificationSource:
– subscribe
NotificationSubscription NotificationSink:
– deliverNotification
![Page 37: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/37.jpg)
37
Grid Service Identification
Grid Services are identified by means of a– Grid Service Handle (GSH), which is used to find the– Grid Service Reference (GSR) that is unique to an instance of a Grid
Service.– A HandleResolver service is used to provide a GSR given a GSH
GSH:– Type of URI (or URL)– Constant for the lifetime of the Grid Service.
GSR:– Representation of the service interfaces:
• Can be a WSDL document
– Can change if the service evolves
![Page 38: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/38.jpg)
38
Anatomy of a Grid Service (1/4)
Hosting Environment
•Service Data Access•Lifetime Management
•Service Creation•Service Grouping•Notification•Handle Resolution
•Other functions e.g:•Workflow•Auditing•Resource Management
HandleHandle
Grid Service
GridService portType(required)
Other PortTypes(Optional)
![Page 39: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/39.jpg)
39
Anatomy of a Grid Service (2/4)
Hosting Environment
•Service Data Access•Lifetime Management
GridService portType(required)
Other PortTypes(Optional)
•Service Creation•Service Grouping•Notification•Handle Resolution
•Other functions e.g:•Workflow•Auditing•Resource Management
HandleHandle
ServiceDataSet
![Page 40: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/40.jpg)
40
Anatomy of a Grid Service (3/4)
Hosting Environment
•Service Data Access•Lifetime Management
GridService portType(required)
Other PortTypes(Optional)
•Service Creation•Service Grouping•Notification•Handle Resolution
•Other functions e.g:•Workflow•Auditing•Resource Management
HandleHandle
Service
Data
Service
Data
Service
Data
![Page 41: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/41.jpg)
41
Anatomy of a Grid Service (4/4)
Grid Service
PortType PortTypePortType PortType
SDESDE
SDEServiceData
SDESDE
SDEServiceData
SDESDE
SDEService Data
SDESDE
SDEServiceData
PortTypeImpl.cs PortTypeImpl.cs PortTypeImpl.cs PortTypeImpl.cs
![Page 42: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/42.jpg)
42
WSDL and GWSDL
WSDL 1.1:– Lack of portType inheritance:
• A portType cannot be defined in terms of an aggregation or extension of one or more other portTypes
– Lack of an open content model:• Needed for specifying service data
GWSDL:– portType inheritance– Open content model
GWSDL => WSDL 1.1:– Flattening the inheritance hierarchy– The “most-derived” portType
WSDL 2.0:– Currently a draft standard– Replace GWSDL
![Page 43: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/43.jpg)
43
GWSDL and Flattening
GridService
setServiceData() findServiceData()
requestTerminationBefore() requestTerminationAfter()
destroy()
ServiceGroup
ServiceGroupRegistration
add() remove()
MyService
setServiceData() findServiceData()
requestTerminationBefore() requestTerminationAfter()
destroy()
add()
remove()
myOperation()
MyService
myOperation()
![Page 44: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/44.jpg)
44
OGSI Implementations
Microsoft .NET:– EPCC: MS.NETGridOGSI Release 1.2– University of Virginia: OGSI.NET Release 2.1
Java:– Globus: Globus Toolkit 3 Release 1.0– Unicore
Perl:– University of Manchester: OGSI::Lite
Python:– Lawrence Berkley National Labs: pyGlobus
![Page 45: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/45.jpg)
45
WSRF
Web Services Resource Framework Access and manipulate state via Web Services:
– WS-Resource – a stateful resource
Replaces OGSI:– WS-Addressing for resource identification– WS Resource Framework rendered in terms of six new specifications:
• WS-ResourceProperties• WS-ResourceLifetime• WS-Notification• WS-RenewableReferences• WS-ServiceGroup• WS-BaseFault
More information from:– http://www.globus.org/wsrf – Especially: “From Open Grid Services Infrastructure to WS-Resource
Framework: Refactoring”
![Page 46: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/46.jpg)
46
OGSI => WSRF
GWSDL => WSDL1.1
+ portType flattening pending WSDL 2.0 GSH => WS-Addressing Endpoint Reference
+ WS-RenewableReferences GSR => WS-Addressing Endpoint Reference Service data => Resource properties GridService portType => WS-ResourceProperties
+ WS-ResourceLifetime Factory portType => Factory pattern ServiceGroup portTypes => WS-ServiceGroups Notification portTypes => WS-Notification HandleResolver portType => WS-RenewableReferences Operation Faults => WS-BaseFault
![Page 47: Web Services and Grid Services](https://reader036.fdocuments.us/reader036/viewer/2022062407/56812b04550346895d8ee532/html5/thumbnails/47.jpg)
47
Grid Services – Summary
Grids:– Virtual Organisations
– Sharing, access and management of distributed, heterogeneous resources
Open Grid Services Architecture:– Grid Services = Web Services + Open Grid Architecture
– State + lifetime
Open Grid Services Infrastructure:– Building blocks of OGSA service
– Service lifetime management, state access, registration, notification, creation, access
– Service identification – GSH + GSR
– Service description – GWSDL
Web Services Resource Framework