OGCE-REST

From Ogce

Contents

OGCE Bridge Clients Information

Submit Job

Used to submit job to resource using GFAC. This service needs a xml message with job parameters and header data to submit job to compute resource (queenbee, lonestar or Ranger)

Service URL :

    http://dropbox.ucs.indiana.edu:8080/ogce-rest/service/run/async


Sample XML :


<?xml version="1.0" encoding="UTF-8"?>
<Message>
  <Header>
       <serviceName>Echoservice</serviceName>
       <hostname>queenbee.loni-lsu.teragrid.org</hostname>
       <processorcount>16</processorcount>
       <queuename>workq</queuename>
       <walltime>60</walltime>
       <userdn>/C=US/O=National Center for Supercomputing Applications/CN=Ultrascan3 Community User</userdn>
 </Header>
   <Body>
       <Method>run</Method>
       <input>
          <parameters>
            <name>x</name>
            <value>hello</value>
          </parameters>
          <parameters>
              <name>y</name>
              <value>hello</value> 
          </parameters> 
       </input>
   </Body>
</Message>


All these parameters are set by Client call. Parameters like processercount, queuename and walltime are optional. GFAC have default value for optional parameter.

This service returns you a xml message with experimentid in following format

<?xml version="1.0" encoding="UTF-8"?>
 <MessageResponse>
   <experimentid>Experiment-1c15651c-d872-4234-a561-f58df81fb542</experimentid>
 </MessageResponse>


Job Status

To get status of current experiment. You need to create following url with experimentid which was returned from Submit job service.

Service URL :

 http://dropbox.ucs.indiana.edu:8080/ogce-rest/service/jobstatus/$experimentid


Service will return xml message with status of current job status on compute resource. Response format is

<?xml version="1.0" encoding="UTF-8"?>
<MessageResponse>
   <status>COMPLETED</status>
   <message>Job working folders etc</message>
   <output>
      <parameters>
         <name>outputData</name>
         <value>
             http://dropbox.ucs.indiana.edu:8080/output/Experiment-72bea69c-ec39-4392-8090-debc1c17926b/output.dat
         </value>
      </parameters>
   </output>
</MessageResponse>

Note: output tag will only come when status is complete.

Other status are : SUBMITTED| INITIALIZED | PENDING | ACTIVE | COMPLETED | CANCELED | FAILED | UNKNOWN (if job id does not exit in job database)

Cancel Job

To cancel running or queued jobs from compute resource. Pass experimentID from Submit Job service.

Service URL :

      http://dropbox.ucs.indiana.edu:8080/ogce-rest/service/canceljob/$experimentid

Service will return call status. It can either be Success or Already Canceled in following xml format

<?xml version="1.0" encoding="UTF-8"?>
<MessageResponse>
    <status>Success</status>
</MessageResponse>

Services Code and setup

To checkout from SVN location

svn co https://ogce.svn.sourceforge.net/svnroot/ogce/incubator/ogceservices
cd ogceservices
vi config/ogcerestservice.properties
mvn clean install

Add your myproxy parameters to ogcerestservice.properties to cancel the job. Copy the war file to tomcat or jetty directory. To run inbuild jetty service run mvn jetty:run.

Web site tools