3.
Client User's Tutorial
Up one level
Introduction
This tutorial shows how to use the basic GRIA application services (the Job and Data services) as a client.
Running the client
Once you have installed the client, run it to open the Grid resource browser:
> gridcli
The initial display will not show any resources or services. The main client window is made up of three main areas.
- The area on the left of the client is the resource browsing and this area allows you to view the relationships between resources and between services and resources. The are currently two views that can be used :
- Service view is a tree view displaying resources under the service at which they are created.
- Management view is a tree view displaying resources under the resource which they are manged by
- The area on the right of the client (initially displaying the GRIA logo) is the resource viewing area which allows more detailed information about a resource or service.
- The lower area on the client is the logging and information area.

Adding services
To add a service you need to know the URL of its WSDL, which describes what the service can do and how to access it. Typically, your service provider will have a public web page containing links to the WSDL of each service they run.
The GRIA Demo Services (https://griademo1.it-innovation.soton.ac.uk) WSDL's are :
- https://griademo1.it-innovation.soton.ac.uk/gria-basic-app-services/services/JobService?wsdl
- https://griademo1.it-innovation.soton.ac.uk/gria-basic-app-services/services/DataService?wsdl
The easiest way to add the service is to drag the link from your web-browser into the the Grid client application's list of services:

If you can't do this (e.g., because you have been given the WSDL URL on a piece of paper) then you can add the service using the menu instead:
- Select the Services menu from the top menu bar.
- Choose Add a service.
- Enter the URL of the service's WSDL.
After adding a service it will appear in the list and the client will contact it to find any resources at the service to which you have access. If you haven't used the service before then typically there won't be any, unless someone has granted you access to some resources already or there are public resources at the service.
Add at least one JobService and at least one DataService now. If you don't know of any existing service providers you can access the Basic Application Services package on the GRIA demo systems or install the package yourself.
Management requirements
Services may be set up so that you don't require any pre-existing agreement in order to use them, or they may require you to have a service level agreement with the supplier first. There are three cases:
-
The service can be used without any pre-existing agreement:

-
The service requires an account or Service Level Agreement (SLA), and you have direct access to this:

-
The service requires an account or Service Level Agreement (SLA), and you have access to a local client management service which manages your access to these resources for you:

To find out how the service you are using has been configured, try creating a new data stager now:
- Right-click on the data service you added above and choose Create New data stager.
- Enter a name for the new stager if permitted.

When you do this, the client queries the data service to find out what it needs in order to use the service. The service may reply that it needs an SLA at the service provider's SLA service(s), or it may report that no pre-existing resource is necessary to create new stagers.
If a new stager is created, then the service does not require an agreement before use. You can skip the next section and jump to Using a data stager.
Otherwise, you should see a message dialog box explaining that you need an SLA (Service Level Agreement) in order to use the service. The next section explains how to get an SLA.
Getting access to an SLA
If you try to use a service and get told that you need an account or SLA then follow these instructions to get one. Normally SLAs are created by a different person in your organisation and you are granted access to them. There are three ways to get access to the required resource:
- You are responsible for making SLA agreements
-
Follow the client management guide to create the required SLA.
- Someone else agrees SLAs for you and there is no client management service
-
If someone else in your organisation is responsible for agreeing SLAs then ask them to create one (by following the client management guide) and give you access to it. They will tell you to add the SLA service to your client, at which point the client will discover the SLA. If you have already added the SLA service to the client before you had access to the SLA, right-click on the service and choose Discover existing resources to check again. If you have more than one SLA valid at a supplier, you can make the client prefer one of them by right-clicking on it and choosing Set as Default SLA from the menu. The SLA will go red to indicate that it is the default.
- Your organisation uses a client management service
-
Ask the person in your organisation who is responsible for agreeing SLAs to create one (by following the client management guide) and give you access to it. They may tell you to add your organisation's local client management service to your client, at which point the client will discover your private account. If you have already added the service to the client before you had access to the private account, right-click on the client management service and choose Discover existing resources to check again. Right-click on the private account and choose Set default private account from the menu. The account will be shown with a tick mark:
Once you have followed one of the three routes above, you will be able to create new data stagers.
Using a data stager
You should now be able to create new data stagers:
- Right-click on the data service and choose New data stager.
- Enter a name for the new stager.
A new data stager is created and appears in the display. You can use the popup menu to upload or download data, to transfer data to or from another stager, or to grant others permission to read or modify the contents. On some systems, you can also upload data by dragging a file from your file manager to the data stager, though this is not currently available on Microsoft Windows systems.
To view more details about a Data Stager, click on it and its details will appear on the right hand side of the client in the resource viewing area.

You can copy data between stagers directly, without having to download from one and upload to another. To try this:
- Create another data stager, as described above.
- Drag the source data stager onto the new stager.
The client automatically opens an authorisation on the target stager, allowing the source stager to write to it.
To download the data from the target, bring up the menu over the target stager and choose Download data, then choose where to save it on your local computer.
Delegating access to a data stager
You can also give other users read or write permission on a data stager. For example:
- Click on the data stager to show it in the resource viewing area.
- Switch to the Access Control tab.
- Click 'Load Access Control Rules' button. This shows the current rules for this Data Stager. If you just created this stager it should show a rule giving you the owner role on the reource.
- Click on Add Rule to show the Access Control Wizard
- Choose a process role from the first drop down menu, for a Data Stager there should be a reader role.
- Choose a rule type from the second drop down menu.
- Choose the Subject DN is... option box
- In the dialog that appears open the certificate file (.crt) for the user you want this rule to apply to.
- In the second dialog that appears open the certificate file (.crt) of the issuer of the users certificate.

Access can later be revoked by choosing the access control rule in the table and clicking the Remove Rule button.
To use the data stager, another user will also need to discover the stager. They will right-click on the data service and choose Discover existing resources.
Note: having read or write access does not give you permission to grant read and write access to others. Since transferring data between stagers requires you to grant permission for one of the services to use the other, you will need to invoke the appropriate copy operation on whichever data stager you don't own:
- If you own the source stager, perform a Copy from operation on the destination. The client will grant the destination read access on the source.
- If you own the destination stager, perform a Copy to operation on the source. The client will grant the source write access on the destination.
Creating a job
Ensure you have a job service shown in your client (see Adding Services if not). Then create a new job:
- Right-click on the job service and choose New job.
- The client will check the service's policy. If you need an SLA to create a job and you don't have one you will get a message saying so. See Management requirements above in this case.
- The client will query the job service to find out which applications it supports. Choose one from the list.

The new job appears appears in the window under the job service. Under the job itself more resources appear, one for each input and one for each output. Inputs and outputs are just data stagers, and you can use the menu to upload the inputs for the job in the normal way. You can also transfer the data from another stager (including transferring from the output of another job).
Running a job
Once the inputs are uploaded, you can start the job running by right-clicking on it and choosing Start job from the menu or you can start the job and monitor its progress by choosing Start Job and Monitor. You will be prompted to enter any arguments for the job:
The sample applications don't take any arguments, so you can just click on OK to start the job. If you choose Start Job and Monitor a job progress monitor window appears in the resource viewing area.

If the job will run for a long time you can resume monitoring it later, by clicking on the job and selecting the Job Monitor tab.
Once the job has finished, you can download the result from the output(s) using the output's popup menu, as for a normal data stager.
