airavata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emre Brookes <e...@biochem.uthscsa.edu>
Subject Re: Registry API for Genapp
Date Mon, 01 Jun 2015 11:59:54 GMT
Note - I moved this discussion to the Airavata developers list.

You should first make it work from the command line in the appropriate 
language.
To run a non Airavata GenApp module, say "align", it is simply
$ {executable_path}/align '{... json input ... }' > json_output
so you need to make this work through Airavata.

You can see what Nadeem did for html5/php here:
https://github.com/NadeemAnjum/GenAppAiravata/blob/master/genapp/languages/html5/base.php
You will see he included his airavata.php code (line 4) and then
ran through steps to call (lines 267-273)
* createProject()
* createExperiment()
* launchExperiment()
* polled getExperimentStatus() until COMPLETED
* getOutput()

This was with a previous version of Airavata.  Examining the current 
API, the functions seem to be the
same except getOutput() -> getExperimentOutputs()
I don't know if there are any extra steps with the current Airavata, but 
I don't think so.

The polled getExperimentStatus() is a bit of an issue.  We should avoid 
polling, or if we do,
use a fall back timer, so that it checks, say after 
1,2,4,8,16,32,64,64,64,64 seconds so
at least it is not checking every 1 second as in Nadeem's original code.
Also, the execution may fail, so simply checking for COMPLETED is not 
good enough.
It should check for all known return values and take appropriate measures.
If an unknown return value is received, it should also give an error.

Also, Nadeem worked on a previous version of GenApp, so his html5/php 
code was present
in a different program fragment (base.php).  Our current implementation 
has this in jobrun.php.
But before you try to put this within GenApp, make it work from the 
command line in
a program with the same language as your target language (php, c++, java).

-E.



priyanshu patra wrote:
> Sir, how to proceed after registering the modules so as to run them on 
> server via genapp?
>
> On Mon, Jun 1, 2015 at 3:14 PM, Emre Brookes <emre@biochem.uthscsa.edu 
> <mailto:emre@biochem.uthscsa.edu>> wrote:
>
>     Abhishek Kapoor wrote:
>
>
>         Sir,
>         I was checking directives.json for executable path and I saw
>         something that seems a bit weird, We have given executable
>         path for all the languages separately but we are using same
>         path for all the languages, Is there any chance that in future
>         executable_paths for different languages would be different?
>         because in that case as you said earlier we have to define
>         register for different languages separately.
>         Last year, what nadeem did was, he took executable_path only
>         from html5 and registered the modules, but he didn't check if
>         other languages have different executable_paths.
>
>     Hi Abhishek,
>
>     Yes, each language can have its own executable_path (as you can
>     see by it's definition in directives.json)
>     But on a remote compute resource, it maybe different.  We will in
>     future extend the appconfig.json to have
>     resource specific executable_path also.  For now, I would at least
>     support the differing language specific
>     paths.  And that's ok, since each language generated which
>     supports Airavata execution should have
>     it's own Airavata registry code.  So you could easily prefix a
>     language specific tag to the module name
>     and use that as a registry identifier.  This is a benefit to doing
>     making language specific registry programs
>     (in genapp/languages/xyz/util/) and using the
>     genapp/languages/xyz.json to define their creation upon
>     genapp.pl <http://genapp.pl> execution.
>
>     -E.
>
>


Mime
View raw message