Grid Services I - Concepts

54
Grid Computing, B. Wilkinson, 2004 4.1 Grid Services I - Concepts

description

Grid Services I - Concepts. Grid service. The Global Grid Forum (GGF) developed standard interfaces, behaviors, core semantics, etc. for grid applications based upon web services. GGF introduced the term Grid Service as an extended web service that conforms to the GGF OGSI standard. - PowerPoint PPT Presentation

Transcript of Grid Services I - Concepts

Page 1: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.1

Grid Services

I - Concepts

Page 2: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.2

Grid service

The Global Grid Forum (GGF) developed standard interfaces, behaviors, core semantics, etc. for grid applications based upon web services.

GGF introduced the term Grid Service as an extended web service that conforms to the GGF OGSI standard.

Page 3: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.3

Grid Services

• Standard provides for interoperability of independently developed services

• Grid services based on extensions of Web Services

Page 4: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.4

The Globus Grid Forum (GGF) standard currently divided into:

Open Grid Services Architecture (OGSA)

and

Open Grid Services Infrastructure (OGSI)

Page 5: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.5

Open Grid Services Architecture(OGSA)

Page 6: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.6

OGSA

• Defines standard mechanisms for creating, naming, and discovering Grid service instances.

• Addresses architectural issues relating to interoperable Grid services.

• Described in “The Physiology of the Grid” http://www.globus.org/research/papers/ogsa.pdf

Page 7: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.7

OGSI(Open Grid Services Infrastructure)

Based upon Grid Service specification and specifies way clients interact with a grid service (service invocation management data interface, security interface, ...).

Details:

http://www-unix.globus.org/toolkit/draft-ggf-ogsi-gridservice-33_2003-06-27.pdf

Page 8: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.8Based on http://www.globus.org

Page 9: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.9

The core elements of the Open Grid Services Architecture (shared)

This layer eliminated in most recent version of standard under development

The Grid 2: Blueprint for a new Computing Infrastructure, Ian Foster, Carl Kesselman and Steve Tuecker Editors, Morgan Kaufmann 2004 -- Chapter 17: “The Open Grid Service Architecture,” by Ian Foster, Carl Kesselman and Steve Tuecker.

Page 10: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.10

Globus

Open source grid software toolkit.

Version 3 includes:

• A complete implementation of OGSI

• Additional Web service components, some built on top of OGSI.

We will use Globus 3.2 in assignment 2.

Page 11: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.11From http://www.globus.org

Page 12: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.12

Grid Service Example

The Grid 2: Blueprint for a new Computing Infrastructure, Ian Foster, Carl Kesselman and Steve Tuecker Editors, Morgan Kaufmann 2004 -- Chapter 17: “The Open Grid Service Architecture,” by Ian Foster, Carl Kesselman and Steve Tuecker.

Page 13: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.13

• In this example, the client accesses a file transfer service to perform actions such as transfer a file from one storage service to another.

• Because based upon web services, uses web services technology, XML, WSDL, etc.

Page 14: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.14

WSDL Service Definition<wsdl:definitions xmlns:tns=“…” targetNamespace=“…”> <message name=“getFileRequest”> <part name=“term” type=“xs:string”/> </message> <message name=“getFileResponse”> <part name=“value” type=“xs:string”/> </message> <portType name=“StorageServicechange”> <operation name=“getFile”> <input message=“getFileRequest”/> <output message=“getFileResponse”/> </operation> </portType></wsdl:definitions>

Page 15: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.15

<portType> element

• Defines interface

• Includes operations, defined by <operation>

<portType name=“StorageServicechange”> <operation name=“getFile”> <input message=“getFileRequest”/> <output message=“getFileResponse”/> </operation> </portType>

Page 16: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.16

• In this example, one operation, getFile, which requires one message from client to make request and will generate one message from service as a response:

<input message=“getFileRequest”/> <output message=“getFileResponse”/>

Page 17: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.17

<message> element• Defines the message used in operation:

<message name=“getFileRequest”> <part name=“term” type=“xs:string”/> </message> <message name=“getFileResponse”> <part name=“value” type=“xs:string”/> </message>

Both of these message are composed of a string (xs:string defined in system library).

Page 18: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.18

Message Composition

• Messages could also contain data of specific data types.

(Example in slides 3b)

Page 19: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.19

Binding

• In addition to definition, there will be a binding part, specifying the message protocols, data encoding, and transport used for sending messages

Page 20: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.20

<binding type=“glossaryTerms” name=“b1”> <soap:binding style=“document” transport= “http://scheme.xmlsoap.org/soap/http”/> <operation> <soap:operation soapAction= “http://example.com/getFile”/> <input> <soap:body use=“literal”/> </input> <output> <soap:body use=“literal”> </output> </operation></binding>

Binding

Page 21: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.21

• Grid services concept similar to Remote Procedure Call (RPC), Remote Method Invocation (RMI), only applied over HTTP

• In fact, Java implementations will use RMI underneath.

Page 22: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.22

Instances of Grid services

• Clients interact with instances of grid services.

• Apart from being the usual approach in an object oriented system, it enables clients to have access to different instances of a service and provides extended functionality to a web service. Allows for transient and private instances.

Page 23: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.23

Differences between a web service and a grid service

Grid services can be:

• Stateful or Stateless

• Transient or Non-Transient.

A web services is usually thought of as non-transient and stateless.

Page 24: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.24

Stateless Service

• An instance of a service is stateless if it cannot remember prior events.

Page 25: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.25

Stateful Services

• An instance of service is stateful if it can remember about prior actions.

Implies variables within service that can maintain values between accesses.

Page 26: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.26

QuestionHow can grid services remember information between each access to the service in Java, i.e. how are the variables declared?

Answer

Page 27: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.27

Transient Services

• A transient service instance is one that can be created and destroyed.

• Usually, they are created for specific clients and do not outlive its clients.

Page 28: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.28

Non-transient (persistent) services

• An instance of a service is non-transient if it outlives its client.

A Web service is non-transient. It does not have the concept of service creation and destruction.

Page 29: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.29

QuestionHow can instances of grid services be created and destroyed in Java?

Answer

Page 30: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.30

“Stateful Transient” Grid Service

• One instance of service assigned to each client and only that client can access stored information. The information is retained between accesses and pertains to the client.

• Service usually destroyed when its purpose has been fulfilled.

Page 31: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.31

“Stateful Non-Transient” Service

• Several clients share one instance of the service, and the stored information is available to all clients

Page 32: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.32

QuestionSuppose a grid service performs mathematical functions such as square, squareroot, etc. What type of grid service is it and what form of interaction would it have with its clients?

Answer

Page 33: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.33

QuestionSuggest a grid service that would stateful and non-transient?

Answer

Page 34: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.34

QuestionWhat is the sort of service-client interaction if the service is stateless and non-transient?

Answer

Page 35: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.35

Factory Services.

• Grid Services uses a Factory Service to create and manage service instances.

Page 36: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.36

Grid Services Factory

From http://www.globus.org

Page 37: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.37

Client - Service Interaction

• One-to-One -- a client has its own instance of a service. Most likely, instance destroyed with interaction finished.

• One-to-many -- instance of a services available to multiple clients. Information from service available to multiple clients.

Page 38: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.38

Grid Service Implementation

• Can be accessed remotely

• Potentially stateful

• Implements one of more WSDL portTypes

• Grid Service Factories can be used to create instances of services with many portTypes

• Introspection of a service to return information (list of portTypes it implements)

Page 39: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.39

Page 40: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.40

Grid Service Addressing

• As web services, addressed using URIs.

• Address called a Grid Service Handle (GSH) in OGSI -- described where service is -- must be unique. Each instance must be unique.

Page 41: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.41

Accessing Grid Service

• Grid Service Reference (GSR) -- an OGSI data structure describes how to communicate with service, methods, etc.

• GSR will be, in general, a WSDL file

• GSR created by passing a GSH to a resolver service.

Page 42: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.42

Grid Web Service Description Language (GWSDL)

• WSDL extended to support extra features in grid services not in web services.

Page 43: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.43

Service Discovery

• Web service use UDDI registry.

• Globus 3 uses its own index service.

Page 44: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.44

Service Data

• Structured collection of information associated with a grid service that allows a user to choose a service that satisfies its needs, e.g. functionality speed, cost.

• Introduced in OGSI -- exposes a service instance’s state data for query, update, and change.

• Index service used to locate service based upon user criteria.

Page 45: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.45

Service Data Elements(SDEs)

• Named typed XML elements within service data document which define information.

• May have additional properties such as how they can be modified during lifetime of service instance.

Page 46: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.46

Example WSDL Document for Service Data<wsdl:definitions xmlns=“…” targetNamespace=“…”> <gwsdl:portType name=“StorageService”

extends=“ogsi:GridService”> <wsdl:operation name=getFile> … </wsdl:operation> <sdf:serviceData name=“capacity” type=“xsd:integer”/> <sdf:serviceData name=“location” type=“xsd:string”/> <sdf:serviceData name=“speed” type=“xsd:integer”/> <sdf:serviceData name=“freeSpace” type=“xsd:integer”/> <sdf:serviceData name=“accessControlPolicy” type=“tns:PolicyType”/> … </gwsdl:portype></wsdl:defintions>

The Grid 2: Blueprint for a new Computing Infrastructure, Ian Foster, Carl Kesselman and Steve Tuecker Editors, Morgan Kaufmann 2004 -- Chapter 17: “The Open Grid Service Architecture,” by Ian Foster, Carl Kesselman and Steve Tuecker.

Page 47: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.47

OGSI “Notifications”

• Client can be informed of changes to a service such as new methods added etc.

• Grid service configured to inform clients of changes -- notification source.

• A Client registers interest in changes --

notification sink.

Page 48: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.48

“Notifications”

• Service must implement a notificationSource interface.

• Client must implement a notificationSink interface.

Page 49: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.49

Recent Changes to Grid Standards

• Introduction of Web Services Resource Framework (WSRF), January, 2004– Web services vendors recognized importance of

OGSI concept but would not adopt OGSI as it was defined (summer 2003)

– Globus Alliance teamed up with Web services architects and came up with WSRF (Jan., 2004)

• Beta versions of GT4 are anticipated Sept., 2004

Page 50: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.50

Changes in WSRF

• OGSI eliminated as it is very complex -- replaced with web services.

• Reduced object orientation by using web services, which does not have state.

• Easier to use existing web service tools.

Page 51: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.51

Page 52: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.52

More Information

• GGF: http://www.ggf.org

• Grid services:

http ://www.casa-sotomayor.net/gt3-tutorial/(Slides and assignment 2 based upon this tutorial)

Page 53: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.53

Material in Books

• The Grid 2: Blueprint for a new Computing Infrastructure, Ian Foster, Carl Kesselman and Steve Tuecker Editors, Morgan Kaufmann 2004– Chapter 17: “The Open Grid Service

Architecture,” by Ian Foster, Carl Kesselman and Steve Tuecker.

Page 54: Grid Services I - Concepts

Grid Computing, B. Wilkinson, 2004 4.54

What next?

• Writing our own grid service.

(Assignment 2)

• Security issues.