18
1 Grid Computing Globus Toolkit 4 - GT4 Jean-Marc Pierson December 2007 pierson at irit.fr 2 Grid Computing by the fathers of the Grid Ian Foster: “Resource sharing & coordinated problem solving in dynamic, multi-institutional virtual organizations”. http://www- fp.mcs.anl.gov/~foster/ “HW and SW infrastructure that provides dependable, consistent, pervasive and inexpensive access to high-end computational capabilities” 3 Grid Definition Refined Use Open Protocols Is decentralized Deliver non-trivial QoS 4 Service Oriented Architecture Open Grid Service Architecture WSRF : Web Service Resource Framework Everything is resources, WS-Resources Access through services

Grid Computing Globus Toolkit 4 - GT4 - IRIT

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Grid Computing Globus Toolkit 4 - GT4 - IRIT

1

Grid ComputingGlobus Toolkit 4 - GT4

Jean-Marc PiersonDecember 2007

pierson at irit.fr

2

Grid Computing by thefathers of the Grid

Ian Foster: “Resource sharing & coordinatedproblem solving in dynamic, multi-institutionalvirtual organizations”. http://www-fp.mcs.anl.gov/~foster/

“HW and SW infrastructure that providesdependable, consistent, pervasive and inexpensiveaccess to high-end computational capabilities”

3

Grid Definition RefinedUse Open ProtocolsIs decentralizedDeliver non-trivial QoS

4

Service OrientedArchitecture

Open Grid Service ArchitectureWSRF : Web Service Resource FrameworkEverything is resources, WS-ResourcesAccess through services

Page 2: Grid Computing Globus Toolkit 4 - GT4 - IRIT

2

5

Basic useful services

VO Management Service: resources allocation toeach Virtual Organization.

Resource Discovery and Management Service Job Management Service And much more: security (authentication,

authorisation, data management)…

All all services interact: example Job ManagementService needs Resource Discovery

Need Standardization for interfaces to services Example: JobSubmissionService has a submitJob() method

6

Base infrastructure toimplement the

architecture OGSA?The method invocation should also be

standardized.Corba? RMI? RPC?No : Web Services!!

But need Stateful Web Services!

WSRF: Web Services Resource Framework

7

© Globus Tutorial

8

Web Services in Grid?Pros:

XML, language and platform independenceHTTP usage for transmitting messages, no

security problems with firewall

Cons:XML, overhead by the verbosityLack of versatility, only basic invocation (no

other services provided, unless using higherlevel Web Services, role of WSRF)

Page 3: Grid Computing Globus Toolkit 4 - GT4 - IRIT

3

9

© Globus Tutorial10

GT4 and othersGT4 is an implementation of WSRF

specificationDeveloped by the Globus Alliance,

www.globus.org

WSRF.NET is another one for instancehttp://www.cs.virginia.edu/~gsw2c/wsrf.net.html

11

© Globus Tutorial

12

Web Services invocation

Page 4: Grid Computing Globus Toolkit 4 - GT4 - IRIT

4

13

The Web servicesWSDL/SOAP/HTTP

pancake

14

More inside Webservices invocations

You don’t have to program the stubs/nor the SOAP requests/responsesJust like Corba and RMI

15

Another view of thepancake

Normal services, written in Java for instance

SOAP engine: to marshall/serialize requests/response

Ex: in GT4, it is Axis

Application Server: for instance Jakarta/Tomcat

Apache for instance

16

From stateless tostateful WS

Using the concept ofresources

Page 5: Grid Computing Globus Toolkit 4 - GT4 - IRIT

5

17

WS-Resources

Web Service + Resource = WS-Resources

To address these, we need a endpoint reference to specify the resource

18

Specification, WSRF and more

WS-ResourceProperties: defined in the WSDLinterface

WS-ResourceLifetime: manage lifecycle of the WS-Resources

WS-ServiceGroup: group services or WS-Resources together allow to find in the group services meeting a particular

property allow also to address all services of the group by one

entry point

WS-BaseFaults: for fault reportingWS-Notification: producer/consumer modeWS-Addressing: to address the WS-Resources

19 20

Writing a WSRFWeb/Grid Service

Five Steps, only !1. Define the service’s interface. This is done with

WSDL2. Implement the service. This is done with Java.3. Define the deployment parameters. This is done

with WSDD and JNDI4. Compile everything and generate a GAR file.

This is done with Ant5. Deploy service. This is also done with a GT4 tool

Page 6: Grid Computing Globus Toolkit 4 - GT4 - IRIT

6

21

A example serviceinterface

public interface Math{

public void add(int a);public void subtract(int a);public int getValueRP();

}

In Java or IDL, the description is simple…

22

WSDLservice description

<?xml version="1.0" encoding="UTF-8"?><definitions name="MathService”

targetNamespace="http://www.globus.org/namespaces/examples/core/MathService_instance"

xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.globus.org/namespaces/examples/core/MathService_instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-

draft-01.xsd" xmlns:wsrpw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-

draft-01.wsdl" xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/WSDLPreprocessor" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-

draft-01.wsdl" location="../../wsrf/properties/WS-ResourceProperties.wsdl" />

23

<!--==== P O R T T Y P E ==========--><portType name="MathPortType"wsdlpp:extends="wsrpw:GetResourceProperty"wsrp:ResourceProperties="tns:MathResourceProperties">

<operation name="add"><input message="tns:AddInputMessage"/><output message="tns:AddOutputMessage"/></operation>

<operation name="subtract"><input message="tns:SubtractInputMessage"/><output message="tns:SubtractOutputMessage"/></operation>

<operation name="getValueRP"><input message="tns:GetValueRPInputMessage"/><output message="tns:GetValueRPOutputMessage"/></operation></portType></definitions>

24

<!--====== M E S S A G E S ======--><message name="AddInputMessage">

<part name="parameters" element="tns:add"/></message><message name="AddOutputMessage">

<part name="parameters" element="tns:addResponse"/></message>

<message name="SubtractInputMessage"><part name="parameters" element="tns:subtract"/></message>

<message name="SubtractOutputMessage"><part name="parameters" element="tns:subtractResponse"/></message>

<message name="GetValueRPInputMessage"><part name="parameters" element="tns:getValueRP"/>

</message><message name="GetValueRPOutputMessage"><part name="parameters" element="tns:getValueRPResponse"/>

</message>

Page 7: Grid Computing Globus Toolkit 4 - GT4 - IRIT

7

25

<! === T Y P E S ========--><types><xsd:schema

targetNamespace="http://www.globus.org/namespaces/examples/core/MathService_instance"xmlns:tns="http://www.globus.org/namespaces/examples/core/MathService_instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<!-- REQUESTS AND RESPONSES --><xsd:element name="add" type="xsd:int"/><xsd:element name="addResponse"><xsd:complexType/></xsd:element>

<xsd:element name="subtract" type="xsd:int"/><xsd:element name="subtractResponse"><xsd:complexType/></xsd:element>

<xsd:element name="getValueRP"><xsd:complexType/></xsd:element><xsd:element name="getValueRPResponse" type="xsd:int"/> 26

<!-- RESOURCE PROPERTIES -->

<xsd:element name="Value" type="xsd:int"/><xsd:element name="LastOp" type="xsd:string"/>

<xsd:element name="MathResourceProperties"><xsd:complexType><xsd:sequence>

<xsd:element ref="tns:Value" minOccurs="1" maxOccurs="1"/><xsd:element ref="tns:LastOp" minOccurs="1" maxOccurs="1"/></xsd:sequence>

</xsd:complexType></xsd:element>

</xsd:schema></types>

27

Mapping between WSDLand Java Classes

http://www.globus.org/namespaces/examples/core/MathService_instance=org.globus.examples.stubs.MathService_instance

http://www.globus.org/namespaces/examples/core/MathService_instance/bindings=org.globus.examples.stubs.MathService_instance.bindings

http://www.globus.org/namespaces/examples/core/MathService_instance/service=org.globus.examples.stubs.MathService_instance.service

File: namespace2package.properties28

{http://www.globus.org/namespaces/examples/core/MathService_instance}Value

A utility class: Qnamepackage org.globus.examples.services.core.first.impl;import javax.xml.namespace.QName;public interface MathQNames {public static final String NS =“http://www.globus.org/namespaces/ examples/core/MathService_public”;static final QName RP_VALUE = new QName(NS, "Value");public static final QName RP_LASTOP = new QName(NS, "LastOp");public static final QName RESOURCE_PROPERTIES = new QName(NS,"MathResourceProperties");}

Notion of QName(Qualified Names)

Page 8: Grid Computing Globus Toolkit 4 - GT4 - IRIT

8

29

Our first Globus service:service and resource together

package org.globus.examples.services.core.first.impl;import java.rmi.RemoteException;

import org.globus.wsrf.Resource;import org.globus.wsrf.ResourceProperties;import org.globus.wsrf.ResourceProperty;

import org.globus.wsrf.ResourcePropertySet;import org.globus.wsrf.impl.ReflectionResourceProperty;import org.globus.wsrf.impl.SimpleResourcePropertySet;

import org.globus.examples.stubs.MathService_instance.AddResponse;import

org.globus.examples.stubs.MathService_instance.SubtractResponse;import org.globus.examples.stubs.MathService_instance.GetValueRP;

public class MathService implements Resource, ResourceProperties { …}

30

Resources Properties/* Resource Property set */private ResourcePropertySet propSet;

/* Resource properties */private int value;private String lastOp;/* Get/Setters for the RPs */public int getValue() { return value; }public void setValue(int value) { this.value = value; }public String getLastOp() { return lastOp; }public void setLastOp(String lastOp) { this.lastOp =

lastOp; }

/* Required by interface ResourceProperties */public ResourcePropertySet getResourcePropertySet() {return this.propSet; }

Caution:Properties have same names than inWSDL, Beware of uppercase/lowercase

31

Constructorpublic MathService() throws RemoteException {this.propSet = new SimpleResourcePropertySet(MathQNames.RESOURCE_PROPERTIES);

try {ResourceProperty valueRP = new ReflectionResourceProperty(MathQNames.RP_VALUE, "Value", this);this.propSet.add(valueRP);setValue(0);

ResourceProperty lastOpRP = new ReflectionResourceProperty(MathQNames.RP_LASTOP, "LastOp", this);this.propSet.add(lastOpRP);setLastOp("NONE");

} catch (Exception e) { throw newRuntimeException(e.getMessage());}

} 32

The service itself(finally ;))

public AddResponse add(int a) throwsRemoteException {

value += a;lastOp = "ADDITION";return new AddResponse();}

public int getValueRP(GetValueRP params)throws RemoteException {

return value;}

But in WSDL, we said different !

Page 9: Grid Computing Globus Toolkit 4 - GT4 - IRIT

9

33

Parameters handling:boxing

From:void multiply(int a1, int a2);

To:public MultiplyResponse multiply(Multiply params)

throws RemoteException{int a1 = params.getA1()int a2 = params.getA2()// Do somethingreturn new MultiplyResponse();}

Boxing return type if void or complex type

Boxing parameters if numberis not one, or not simple type

34

Service done,are we ready/finished?

Configuring the deploymentWith WSDD and JNDI

Deploying into a container

35

WSDD file<?xml version="1.0" encoding="UTF-8"?><deployment name="defaultServerConfig" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

This will translate to http://localhost:8080/wsrf/services/examples/core/first/MathService <service name="examples/core/first/MathService" provider="Handler" use="literal"

style="document"> <parameter name="className”

value="org.globus.examples.services.core.first.impl.MathService"/> Automatically generated from Math.wsdl written before.<wsdlFile>share/schema/examples/MathService_instance/Math_service.wsdl</wsdlFile> <parameter name="allowedMethods" value="*"/> <parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/> <parameter name="scope" value="Application"/> <parameter name="providers" value="GetRPProvider"/> Resource Property provider <parameter name="loadOnStartup" value="true"/> </service>

</deployment> 36

JNDI file:linking Service to Resource(s)

<?xml version="1.0" encoding="UTF-8"?><jndiConfig xmlns="http://wsrf.globus.org/jndi/config">

<service name="examples/core/first/MathService"><resource name="home"

type="org.globus.wsrf.impl.ServiceResourceHome"><resourceParams><parameter><name>factory</name><value>org.globus.wsrf.jndi.BeanFactory</value></parameter></resourceParams></resource></service></jndiConfig>

Page 10: Grid Computing Globus Toolkit 4 - GT4 - IRIT

10

37

Generating a GAR file:Grid Archive

What to be done:1. (Pre-) Processing the WSDL file to add

missing pieces (such as bindings)2. Creating the stub classes from the WSDL3. Compiling the stubs classes4. Compiling the service implementation5. Organize all the files into a very specific

directory structure38

UsingAnt anda shell

script forthis!

./globus-build-service.sh -d <service base directory> -s <service’s WSDL file>

39

Deployment in theGlobus container

Using the globus-deploy-gar command$ globus-deploy-gar name_of_gar.gar

undeployment: globus-undeploy-gar

Start container, verify if service is running$ globus-start-container -nosec // starting container without security checks // lot of service, normally ours…// on a line like this:http://127.0.0.1:8080/wsrf/services/examples/core/first/MathService

40

A simple clientpackage org.globus.examples.clients.MathService_instance;import org.apache.axis.message.addressing.Address;import org.apache.axis.message.addressing.EndpointReferenceType;

import org.globus.examples.stubs.MathService_instance.MathPortType;import org.globus.examples.stubs.MathService_instance.GetValueRP;importorg.globus.examples.stubs.MathService_instance.service.MathServiceAddressingLocator;

public class Client {public static void main(String[] args) {MathServiceAddressingLocator locator = new MathServiceAddressingLocator();try { String serviceURI = args[0];

// Create endpoint reference to service+resourceEndpointReferenceType endpoint = new EndpointReferenceType();endpoint.setAddress(new Address(serviceURI));MathPortType math = locator.getMathPortTypePort(endpoint);math.add(10);math.subtract(5);System.out.println(“Value: "+ math.getValueRP(new GetValueRP()));

} catch (Exception e) {e.printStackTrace(); }}}

Page 11: Grid Computing Globus Toolkit 4 - GT4 - IRIT

11

41

CompilingInvoking the client: it works!!!

$ source $GLOBUS_LOCATION/etc/globus-devel-env.sh$ javac -classpath

./build/stubs/classes/:$CLASSPATHorg/globus/examples/clients/MathService_instance/Client.java

// client compiled

$ java -classpath ./build/stubs/classes/:$CLASSPATHorg.globus.examples.clients.MathService_instance.Clienthttp://127.0.0.1:8080/wsrf/services/examples/core/first/MathService

Value: 5// if we call again, we will have: Value:10, then

Value: 15, … The grid service is stateful!42

From aservice+resource embedded

to …service/resource home/resource

43

Link with thefirst part case

Remember : in JNDI file, we had <resource name="home" type="org.globus.wsrf.impl.ServiceResourceHome">

44

Changes to do…WSDL file: no change, only the

implementation will change !!Utility class Qname: no change, except the

package name ;)Resource class: same as previous service

one, except removing the operations(add/substract/…), and the ResourceProperty initialization is changed fromConstructor to a method initialize()

Page 12: Grid Computing Globus Toolkit 4 - GT4 - IRIT

12

45

Service changes:Resource Properties are

no longer therepublic AddResponse add(int a) throws RemoteException{MathResource mathResource = getResource();mathResource.setValue(mathResource.getValue() + a);mathResource.setLastOp("ADDITION");return new AddResponse();}private MathResource getResource() throws RemoteException {Object resource = null;try { resource =

ResourceContext.getResourceContext().getResource();} catch (Exception e) { throw new RemoteException("", e); }MathResource mathResource = (MathResource) resource;return mathResource;} 46

Resource Home

package org.globus.examples.services.core.singleton.impl;import org.globus.wsrf.Resource;import org.globus.wsrf.impl.SingletonResourceHome;public class MathResourceHome extends SingletonResourceHome

{public Resource findSingleton() {try {// Create a resource and initialize it.MathResource mathResource = new MathResource();mathResource.initialize();return mathResource;} catch (Exception e) {e.printStackTrace();return null;}}}

47

Deployment and test

No change in WSDD, except the names of serviceand class ;)

In JNDI, change to indicate the new service nameand its associated Resource Home:

<servicename="examples/core/singleton/MathService">

<resource name="home"type="org.globus.examples.services.core.singleton.impl.MathResourceHome">

Creating GAR file, deploying GAR file, testing withthe same client !

48

FromSingle resource to

Multiple resources:Factories come into the play

Page 13: Grid Computing Globus Toolkit 4 - GT4 - IRIT

13

49

Factory in GT4

50

New needs

Factory is a service that must be developed anddeployed, just as the normal one: write WSDL, Javaimplementation

Service: no change (quick look back) Resource: must implement a ResourceIdentifier

interface (getId() method), meaning giving anidentifier (any type here) to the resource

Resource Home: only change to extendResourceHomeImpl able to handle multipleresources

WSDD and JNDI file must be changed to integratenew Factory service, and the link between Factoryand Service: in JNDI, we have now:

<resource name="home"type="org.globus.examples.services.core.factory.impl.MathResourceHome">

51

A client using Factories// nota: package and import are missing…public class Client {public static void main(String[] args) {FactoryServiceAddressingLocator factoryLocator = newFactoryServiceAddressingLocator();MathServiceAddressingLocator instanceLocator = newMathServiceAddressingLocator();try { String factoryURI = args[0];

EndpointReferenceType factoryEPR, instanceEPR;FactoryPortType mathFactory;MathPortType math;

factoryEPR = new EndpointReferenceType();factoryEPR.setAddress(new Address(factoryURI));mathFactory = factoryLocator.getFactoryPortTypePort(factoryEPR);

CreateResourceResponse createResponse =mathFactory.createResource(new CreateResource());

instanceEPR = createResponse.getEndpointReference();// this instanceEPR can be written to a file for other clients to use it

math = instanceLocator.getMathPortTypePort(instanceEPR);math.add(10); math.subtract(5);… 52

More about Resource Properties:WS-ResourceProperties interface

GetResourceProperty: to retrieve a propertyvalue (same role as the get accessor)

GetMultipleResourcePropertiesSetResourceProperties: possibility to update,

insert or delete a RPQueryResourceProperties: with a Xpath

syntax, since RP are in XML document

Page 14: Grid Computing Globus Toolkit 4 - GT4 - IRIT

14

53

From WSDL def to RP document<!-- RESOURCE PROPERTIES --><xsd:element name="Value" type="xsd:int"/><xsd:element name="LastOp" type="xsd:string"/><xsd:element name="MathResourceProperties"><xsd:complexType><xsd:sequence><xsd:element ref="tns:Value" minOccurs="1" maxOccurs="unbounded"/><xsd:element ref="tns:LastOp" minOccurs="1" maxOccurs="unbounded"/></xsd:sequence></xsd:complexType></xsd:element>Corresponding RP document after some calls to the service: <MathResourceProperties

xmlns:tns="http://www.globus.org/namespaces/examples/core/MathService_instance”><tns:Value>10</tns:Value><tns:Value>30</tns:Value><tns:Value>50</tns:Value><tns:Value>40</tns:Value><tns:LastOp>ADDITION</tns:LastOp><tns:LastOp>ADDITION</tns:LastOp><tns:LastOp>ADDITION</tns:LastOp><tns:LastOp>SUBTRACTION</tns:LastOp></MathResourceProperties>

54

Revisit the first examplewith WS-ResourceProperties

Change in the WSDL file, adding:<portType name="MathPortType"wsdlpp:extends="wsrpw:GetResourcePropertywsrpw:GetMultipleResourcePropertieswsrpw:SetResourcePropertieswsrpw:QueryResourceProperties"wsrp:ResourceProperties="tns:MathResourceProperties">

Change in the WSDD file, changing the providers line to<parameter name="providers" value="GetRPProvider GetMRPProvider

SetRPProvider QueryRPProvider"/>

55

Accessing theResourceProperty

private void printResourceProperties(MathPortType math)throws Exception {

GetResourcePropertyResponse valueRP, lastOpRP;String value, lastOp;

valueRP = math.getResourceProperty(MathQNames.RP_VALUE);lastOpRP = math.getResourceProperty(MathQNames.RP_LASTOP);

value = valueRP.get_any()[0].getValue();lastOp = lastOpRP.get_any()[0].getValue();System.out.println("Value RP: " + value);System.out.println("LastOp RP: " + lastOp);

Since what is returned is a XML document, with potentially different values, we have to access the right one

56

Some basics of GlobusGlobus Toolkit

Some already existing services, deployed in a“container” : globus-start-container

Some libraries/tools to falicitate thedevelopment of new services and theirdeployment : globus-deploy-gar

Some command line tools for managing the jobson the grid : grid-proxy-init, globusrun-ws, …

Page 15: Grid Computing Globus Toolkit 4 - GT4 - IRIT

15

57

Using gridFTP in GT4

globus-url-copy : copying from one site toanother, but gridFTP needs to run on bothmachine.

$ globus-url-copy -vbgsiftp://raisin.irit.fr/etc/issuefile:/tmp/foo

���Source: gsiftp://nodeb.ps.univa.com/etc/ ���Dest: file:/tmp/ ���issue -> foo

58

GRAM 4

GridFTPRFT

Delegation

GridFTP

GRAMservices

local sched.

user job

compute element

compute element and service host(s)

remote storage element(s)

FTP data

FTP control

clie

nt

job submit

delegate

xfer

requ

est

local job control

delegateGRAMadaptersu

do

59

Simple Job SubmissionSubmit job to a GRAM service

default factory EPRgenerate job RSL to default localhost

Command example:% globusrun-ws -submit -c /bin/touchtouched_itSubmitting job...Done.Job ID: uuid:002a6ab8-6036-11d9-bae6-0002a5ad41e5Termination time: 01/07/2005 22:55 GMTCurrent job state: ActiveCurrent job state: CleanUpCurrent job state: DoneDestroying job...Done.

60

Complete Factory Contact

•Override default EPRSelect a different host/service : here theservice is located on machine raisin.irit.fr, onport 8443Relies on proprietary knowledge of EPR format!

•Command example:% globusrun-ws -submit –Fhttps://raisin.irit.fr:8443/wsrf/services/ManagedJobFactoryService -c /bin/touch touched_it

Page 16: Grid Computing Globus Toolkit 4 - GT4 - IRIT

16

61

Read RSL from File

Command:% globusrun-ws -submit -f touch.xml

Contents of touch.xml file:<job><executable>/bin/touch</executable> <argument>touched_it</argument></job>

62

Batch Job Submissions

% globusrun-ws -submit -batch -o job_epr -c/bin/sleep 50Submitting job...Done.Job ID: uuid:f9544174-60c5-11d9-97e3-0002a5ad41e5Termination time: 01/08/2005 16:05 GMT

% globusrun-ws -monitor -j job_eprjob state: ActiveCurrent job state: CleanUpCurrent job state: DoneRequesting original job description...Done.Destroying job...Done.

63

Jobs using files, using gridFTP<job>

<executable>/bin/echo</executable><directory>/tmp</directory><argument>Hello</argument><stdout>job.out</stdout><stderr>job.err</stderr><fileStageOut> <transfer> <sourceUrl>file:///tmp/job.out</sourceUrl> <destinationUrl> gsiftp://host.domain:2811/tmp/stage.out </destinationUrl> </transfer></fileStageOut>

</job>

globusrun-ws -S -submit -F https://192.168.159.94:8443/wsrf/services/ManagedJobFactoryService -f job.xml

64

RFT Options<fileStageOut>

<transfer> <sourceUrl>file:///tmp/job.out</sourceUrl> <destinationUrl> gsiftp://host.domain:2811/tmp/stage.out </destinationUrl>

<rftOptions> <subjectName>

/DC=org/DC=doegrids/OU=People/CN=Stuart Martin 564728

</subjectName>

<parallelStreams>4</parallelStreams> </rftOptions>

</transfer>

</fileStageOut>

Page 17: Grid Computing Globus Toolkit 4 - GT4 - IRIT

17

65

RSL Variable Example

<job><executable>/bin/echo</executable><argument>HOME is ${GLOBUS_USER_HOME}</argument><argument>SCRATCH =${GLOBUS_SCRATCH_DIR}</argument><argument>GL is ${GLOBUS_LOCATION}</argument><stdout>${GLOBUS_USER_HOME}/echo.stdout</stdout><stderr>${GLOBUS_USER_HOME}/echo.stderr</stderr>

</job>

66

WSDL interfacesManagedJobFactory portType

createManagedJob operation Input:

Initial Termination Time Job ID

UUID of the job resource, for job reliability/recoverability

Subscribe Request Client can include a request to subscribe for job state notifications with

the job submission to avoid an extra operation call

Job Description / RSL Either a single or multi-job description

Output: newTerminationTime - new termination time of the job

resource managedJobEndpoint - EPR of the newly created job resource subscriptionEndpoint - EPR of the notification subscription

67

ManagedJob portType

release operation Release a holdState set in the job description

Only one hold state can be set/released

Input: None Output: None

State change notifications State - job state (Active, Pending, Done, Cleanup…) Fault - fault causing a Failed state (if applicable) Exit Code - exit code of the job process Holding - boolean indicating if the job is in a hold state

68

ManagedExecutableJobServiceExecutes the requested job process(es)

specified in the RSLResource Properties

(ManagedExecutableJobPortType) serviceLevelAgreement - the RSL / Job Description state - the current job state faults - the fault causing a Failed state localUserId - the username of the resource owner userSubject - the GSI subject of the resource owner holding - boolean indiciating the job is holding stdoutURL - the GridFTP URL to the stdout file stderrURL - the GridFTP URL to the stderr file credentialPath - the local path to the user proxy file exitCode - the exit code of the job proces (if applicable)

Page 18: Grid Computing Globus Toolkit 4 - GT4 - IRIT

18

69

ManagedMultiJobService Processes a multi-job RSL

submits the sub-jobs to the specifiedManagedJobFactoryService.

Sub-jobs cannot be multi-jobs themselves.

Resource Properties (ManagedMultiJobPortType) serviceLevelAgreement - the multi-job RSL / Job Description state - the current overall state faults - the fault causing a Failed state localUserId - the username of the resource owner userSubject - the GSI subject of the resource owner holding - boolean indiciating all jobs are holding subJobEndpoint - list of endpoints to the sub-jobs

70

BibliographyThe Grid 2: Blueprint for a New Computing

Architecture. Ian Foster, Carl Kesselman

The Globus Toolkit 4 Programmer’sTutorial, Borja Sotomayor

www.globus.org