Setup a Calculation Service

The calculation service consists of an simple HTTP server that can receive the commands from an exciting@web server and start the calculation in a job manager.

The server itself is a python script: When you launch it, it will just tell you that it has started the server and the port where it is reachable. When the server receives a POST request from the exciting@web client, it will try to execute the exciting program with the requested input data by calling the shellscript. This script merely tries to change into the calculation directory created by and submit the job with the use of an queuing system, e.g., torque.

cd $1
qsub -e stderr -o stdout ../ > job

You may use this example

This is enough to start jobs, but we also want to be able to survey the job remotely. The getstatus script is called by when the client requests the job status. This small script gets the jop ID of the requested calculation and queries the job management system for its status. This status is displayed on the jobs page of exciting@web. The other services available via include getting the info.xml, download the results, and delete the data on the server.

The getstatus script must be executable ((chmod 755) and it is dependent on the specifics of the queuing system.


These are the commands the calculation service understands

command HTTP request
start calculation POST input.xml content to http://$host:$port/$sha1hash(input.xml)/ returns: POST OK
get info.xml GET http://$host:$port/$sha1hash(input.xml)/ returns: content of info.xml
get status GET http://$host:$port/$sha1hash(input.xml)/status returns: XML with job status
get sdtout stderr GET http://$host:$port/$sha1hash(input.xml)/stdout returns: XML files list with stdout and sdterr
get results GET http://$host:$port/$sha1hash(input.xml)/import returns: XML files list with all xml data
delete GET http://$host:$port/$sha1hash(input.xml)/delete returns: error code


It is maybe important o note hat this version of the includes no authentication mechanism. A mechanism for using an API key is provisioned in the exciting@web client but currently not checked by this server. Usually the service should be used in a trusted environment, or access should be restricted by other means (firewall).

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License