CLIENT API EXAMPLES ----------------------- This package provides some client APIs examples for the gLite WMS services. Each subdirectory provide a given set of simple examples which describe how it is possible to interface over the job description, submission, monitoring and control services made available by the gLite WMS. The examples are structured as folows: ________ /api-test| | _________ |-- /fibonacci| | | | |-- fibonacci | |-- fibonacciFromFile | |-- fibonacciJob | |-- fibonacciJob2 | |-- fibonacciJobGlite-io | | ________ | `--/glite-io| | | | `-- fibonacciGlite-io | |-- jobStatusLoggingOutput |-- jobstatus `-- submit In order to compile an example just switch to the related directory and type: make PROGRAM=example_name where example_name is the name of the example executable as depicted in the directory tree shown above. Examples Description -------------------- Here follows a brief description of each example: o---| submit |---o Instantiates a job description object from the JDL file path passed as input. Sets the deafult values for Rank and Requirements (The modifications to the job description will be applied if not already present). If the CEId where the job has to be submitted is passed as agument then the direct submission is performed. Otherwise, performs job submission to the specified NS (ns host, ns port) and stores job information to the specified LB (lb host, lb port). The returned job identifier is then printed on screen. o--| jobstatus |--o Instantiates a job description object from the job id passed as input. This examples demonstrate how it is possible to query the Logging & Bookeeping Services and handle the returned status informations. The status of the job is polled continuously upon its completion. o---| fibonacciJob |---o Creates a job description object and sets the JDL attributes for the job (executable, input sandbox, output sandbox, arguments etc). Performs job submission to the specified NS (passed as an argument). The executable is the program fibonacci which calculates the fibonacci sequence of a number to a specified order. The number and order are given as arguments to the executable. The output is put in a file fib.out which is returned in the output sandbox. o---| fibonacciJob2 |---o This example is the same as fibonacciJob with the exception that a job-list-match is performed and the job is submitted to the CE with the highest rank. o---| fibonacciJobGlite-io |---o This example also follows fibonacciJob in terms of submitting a job which calculates a fibonacci series. In this case the executable, fibonacciGlite-io (described below), reads the number and order for the series from a file stored in a SE and registered in the Fireman Catalog and, similarly, outputs the series by creating a new file stored in a SE. o---| fibonacciGlite-io |---o Calculates a fibonacci series using glite-io to input the number and order and output the series where the input and output files are stored in a SE and registered in the Fireman Catalog. The lfns for the input and output files are provided as arguments. Please note that the input file will be accessed from a worker node (i.e. by a different user to the one who created the file using, for example, a UI): the files' permissions must be such that it can be read. Similarly, the permissions for the output file must be such that the user on the UI can access the file.