Functions for management of data on GROWL/ HPCPortal server referred to as ``desktop files''.
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
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.
[frame=single]
int growl_listDir(char* sessionId,
char **list)
sessionId
On entry: id of a valid session
list
On exit: ``;'' separated list of files in the session directory
[frame=single] int growl_putInput(char* sessionId, char *input, char **response)
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.
[frame=single] int growl_getOutput(char* sessionId, char **output)
sessionId
On entry: id of a valid session
output
On exit: name of string which will contain the output.
[frame=single] int growl_getError(char* sessionId, char **output)
sessionId
On entry: id of a valid session
output
On exit: name of string which will contain the error log.
[frame=single]
int growl_fileUpload(char* sessionId,
char *localFile,
char *target,
char *remoteFile,
char **response)
sessionId
On entry: id of a valid session
localFile
On entry: name of file on local system including complete path name or
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
[frame=single]
int growl_fileDown(char* sessionId,
char *source,
char *remoteFile,
char *localFile,
char **response)
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
Integer, 0=success, !0=failure.
SOAP error message if there is a problem.
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:
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.
Put the example code here. Should also be provided as part of the distribution.
[frame=single] Part of code listing