Subsections


FILES

Summary

Functions for management of data on GROWL/ HPCPortal server referred to as ``desktop files''.

Attributes

Version: 1.0
Public calls: growl_upload growl_download
Public modules: libgrowl.a
Other modules required: gSOAP v2.1.4, Globus
Date: 2005
Origin: Hand-Knitted Software, R.J. Allan, CCLRC Daresbury Laboratory
Language: C
Conditions on external use: Standard, see separate chapter
Workspace: internal workspace is allocated in all these routines by the gSOAP system for the long return string. This should be freed by the user when it is no longer required.
Use of globals: none
Other routines called directly: none
Input/ output: none
Restrictions:
Notes:

How to use the Package

This package is used through MODULE Files. It encapsulates simple functionality to upload and download files of any type from the user's desktop system to the GROWL server from where they can be transferred using GridFTP or other means to other Grid systems. This is a ``staging'' process, but avoids the firewall and installation problems associated with using GridFTP.

Currently files are embedded in a SOAP packet. We will later try using GSI-scp or other mechanism such as a SOAP attachment.

To distinct types of routine are provided:

1) growl_putInput(), growl_getOuput() and growl_getError() copy a string from memory to the GROWL server for input via stdin to an application or copy from a stdout or stderr file from an application to a string in memory on the client side.

2) growl_fileUpload() and growl_fileDownload() copy from a local file to a file on the GROWL server or the reverse.

Specification of Files Module

Specification of growl_listdir

[frame=single]
int growl_listDir(char* sessionId,
                  char **list)

Argument List

sessionId
On entry: id of a valid session

list
On exit: ``;'' separated list of files in the session directory

Specification of growl_putinput

[frame=single]
int growl_putInput(char* sessionId,
		   char *input, 
		   char **response)

Argument List

sessionId
On entry: id of a valid session

input
On entry: name of string which contains the input.

response
On exit: response from the function.

Specification of growl_getoutput

[frame=single]
int growl_getOutput(char* sessionId, 
		    char **output)

Argument List

sessionId
On entry: id of a valid session

output
On exit: name of string which will contain the output.

Specification of growl_geterror

[frame=single]
int growl_getError(char* sessionId, 
		    char **output)

Argument List

sessionId
On entry: id of a valid session

output
On exit: name of string which will contain the error log.

Specification of growl_fileupload

[frame=single]
int growl_fileUpload(char* sessionId, 
                     char *localFile,
                     char *target,
		     char *remoteFile,
		     char **response)

Argument List

sessionId
On entry: id of a valid session

localFile
On entry: name of file on local system including complete path name or Argument List

sessionId
On entry: id of a valid session

localFile
On entry: name of file on local system including complete path name or relative to executable calling this function

target
On entry: name remote system host which is the target for the file

remoteFile
On entry: name of file on remote system

response
On exit: message from Web service

Specification of growl_filedownload

[frame=single]
int growl_fileDown(char* sessionId, 
                   char *source,
                   char *remoteFile,
		   char *localFile,
		   char **response)

Argument List

sessionId
On entry: id of a valid session

source
On entry: name of remote system host which is the source of the file

remoteFile
On entry: name of file on remote system

localFile
On entry: name of file on local system including complete path name or relative to executable calling this function

response
On exit: message from Web service

Information returned to the User

Integer, 0=success, !0=failure.

Error Returns

SOAP error message if there is a problem.

Method

GSI-SCP is used from the Globus and NCSA distributions. fileUpload and fileDownload are provided as two separate functions for ease of programming in the GROWL prototype.

Example

Put the example code here. Should also be provided as part of the distribution.

Example text

[frame=single]
Part of code listing
Rob Allan 2009-11-10