You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by Emre Brookes <em...@biochem.uthscsa.edu> on 2015/06/01 13:59:54 UTC

Re: Registry API for Genapp

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 
> <ma...@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.
>
>


Re: Registry API for Genapp

Posted by Abhishek Kapoor <ab...@gmail.com>.
Hello Pierce,
I meant , I checked out the airavata-snadbox using svn instead of
git.Apparently,  We can clone git repository using svn also and I also
pulled a request and added some files.

Re: Registry API for Genapp

Posted by Emre Brookes <em...@biochem.uthscsa.edu>.
Airavata is using git and GenApp is currently using svn.

Abhishek - yes, you are going to have to use both git and svn.
You should see if you can use git following Suresh's recommendations so
you don't have to always rsync to your git clone on gw106.iu.xsede.org 
and can keep it locally.

-Emre.

Pierce, Marlon wrote:
> Hi Abhishek, I’m not sure what you mean by “used svn and it is working 
> fine”.
>
> Marlon
>
>
> From: Abhishek Kapoor <abhishek.kapoor52@gmail.com 
> <ma...@gmail.com>>
> Reply-To: "dev@airavata.apache.org <ma...@airavata.apache.org>" 
> <dev@airavata.apache.org <ma...@airavata.apache.org>>
> Date: Tuesday, June 2, 2015 at 7:49 AM
> To: "dev@airavata.apache.org <ma...@airavata.apache.org>" 
> <dev@airavata.apache.org <ma...@airavata.apache.org>>
> Subject: Re: Registry API for Genapp
>
> Hello Suresh Sir,
> I have used svn and its working fine with me.If in case I had to work 
> with multiple repositories, I will switch to ssh.


Re: Registry API for Genapp

Posted by "Pierce, Marlon" <ma...@iu.edu>.
Hi Abhishek, I’m not sure what you mean by “used svn and it is working fine”.

Marlon


From: Abhishek Kapoor <ab...@gmail.com>>
Reply-To: "dev@airavata.apache.org<ma...@airavata.apache.org>" <de...@airavata.apache.org>>
Date: Tuesday, June 2, 2015 at 7:49 AM
To: "dev@airavata.apache.org<ma...@airavata.apache.org>" <de...@airavata.apache.org>>
Subject: Re: Registry API for Genapp

Hello Suresh Sir,
I have used svn and its working fine with me.If in case I had to work with multiple repositories, I will switch to ssh.

Re: Registry API for Genapp

Posted by Abhishek Kapoor <ab...@gmail.com>.
Hello Suresh Sir,
I have used svn and its working fine with me.If in case I had to work with
multiple repositories, I will switch to ssh.

Re: Registry API for Genapp

Posted by Suresh Marru <sm...@apache.org>.
Abhishek,

You can also try github ssh protocol if https is not working. Just google for github connectivity issues behind firewall and you might find an answer based on your institution firewall settings. 

Suresh

> On Jun 2, 2015, at 5:48 AM, Abhishek Kapoor <ab...@gmail.com> wrote:
> 
> 
> Hello Sir,
> I will shift the register file in languages in genapp so that , menu.json and directives.json would not be a problem.
> I will start git asap.


Re: Registry API for Genapp

Posted by Abhishek Kapoor <ab...@gmail.com>.
Hello Sir,
I will shift the register file in languages in genapp so that , menu.json
and directives.json would not be a problem.
I will start git asap.

Re: Registry API for Genapp

Posted by Emre Brookes <em...@biochem.uthscsa.edu>.
Abhishek Kapoor wrote:
>
> Sir,
> Due to some reasons, I am unable to checkout the repository. My 
> network is blocking it
> abhishek@abhishek-notebook:~/Desktop/gsoc2015$ git clone 
> https://github.com/abhikgp/airavata-sandbox.git
> Cloning into 'airavata-sandbox'...
> fatal: unable to access 
> 'https://github.com/abhikgp/airavata-sandbox.git/': Failed to connect 
> to github.com <http://github.com> port 443: Network is unreachable
>
> I am looking for a looking for a solution till then here 
> <https://www.dropbox.com/sh/3ab2cv0pu3vdava/AAC75FZdoIyCv0a0D8EiLZcda?dl=0> 
> is registry code and executable jar file
> to check it just put the jar file in genapptest folder and execute it 
> (Note: before executing remove any leading comments from 
> directives.json and menu.json)
Abhishek,

You will need to get access to github.com port 443.
That is a standard https port and it will be very difficult to proceed 
if you can not access the github tree.
As a work-around, you could clone it to your directory on 
gw106.iu.xsede.org and from your local system
use 'rsync'.

You can not require even access to menu.json and directives.json to run 
the registry.
This is "short-circuiting" GenApp.

menu.json & directives.json and all the json files in modules/ can be 
changed arbitrarily by the user of GenApp
and should not effect the previously produced output.  They can even be 
removed.

The GenApp "promise" to the user is that everything in 
output/{language}/ is a complete independent code base
that is produced during the run of genapp.pl.  The one exception to this 
rule is appconfig.json.

You will need to build your code as fragments of code which are 
assembled by entries in genapp/languages/{language}.json
This is a very important concept to develop further parts of GenApp (and 
will be essential in creating new language variants).
I have written up some of the capabilities here 
http://gw105.iu.xsede.org/genapp/wiki/dn_frag2code
which should get you started.

Emre






Re: Registry API for Genapp

Posted by Abhishek Kapoor <ab...@gmail.com>.
Sir,
Due to some reasons, I am unable to checkout the repository. My network is
blocking it
abhishek@abhishek-notebook:~/Desktop/gsoc2015$ git clone
https://github.com/abhikgp/airavata-sandbox.git
Cloning into 'airavata-sandbox'...
fatal: unable to access 'https://github.com/abhikgp/airavata-sandbox.git/':
Failed to connect to github.com port 443: Network is unreachable

I am looking for a looking for a solution till then here
<https://www.dropbox.com/sh/3ab2cv0pu3vdava/AAC75FZdoIyCv0a0D8EiLZcda?dl=0>
is registry code and executable jar file
to check it just put the jar file in genapptest folder and execute it
(Note: before executing remove any leading comments from directives.json
and menu.json)

Re: Registry API for Genapp

Posted by Suresh Marru <sm...@apache.org>.
On Jun 1, 2015, at 10:51 AM, Emre Brookes <em...@biochem.uthscsa.edu> wrote:
> 
> Abhishek,
> 
> You should from this point forward put all code in the sandbox Suresh setup.
> 
> Suresh wrote:
>> Please check in your code into sandbox repository to Emre and rest of us can use the github tools to review and make suggestions.
>> 
>> Checkout - and check in your code into genapp-airavata-gsoc2015 directory [1], you will need to checkout the parent repo [2] and make commits. [3] will provide you instructions on how to submit pull requests.
>> 
>> Suresh
>> [1] - https://github.com/apache/airavata-sandbox/tree/master/genapp-airavata-gsoc2015
>> [2] - https://github.com/apache/airavata-sandbox
>> [3] - http://airavata.apache.org/community/how-to-contribute-code.html
>> 
> 
> Also, we do not want to force genapp users to have java installed unless they are targeting
> the "java" language in genapp, so at some point,  there should be a php version and a
> c++ version of the registry code.   Perhaps this is best after we have perfected the java version.
> It should not be too difficult, as call sequence should all be the same.

+ 1. Thats the whole point of thrift based API and we should take advantage of it.

Suresh

> 
> Thanks,
> Emre.
> 
> Abhishek Kapoor wrote:
>> 
>> Hello Sir(Emre and Suresh),
>> I am able to register all the genapp exectuables with airavata . Currently it is written in java, I will send you the code and also the jar file for you to check.
>> Also, If the Airavata server is not running and we try to register it gives error which would be better if it could be change to throw exceptions if Server not running.
> 


Re: Registry API for Genapp

Posted by Emre Brookes <em...@biochem.uthscsa.edu>.
Abhishek,

You should from this point forward put all code in the sandbox Suresh setup.

Suresh wrote:
> Please check in your code into sandbox repository to Emre and rest of 
> us can use the github tools to review and make suggestions.
>
> Checkout - and check in your code into genapp-airavata-gsoc2015 
> directory [1], you will need to checkout the parent repo [2] and make 
> commits. [3] will provide you instructions on how to submit pull 
> requests.
>
> Suresh
> [1] - 
> https://github.com/apache/airavata-sandbox/tree/master/genapp-airavata-gsoc2015
> [2] - https://github.com/apache/airavata-sandbox
> [3] - http://airavata.apache.org/community/how-to-contribute-code.html
>

Also, we do not want to force genapp users to have java installed unless 
they are targeting
the "java" language in genapp, so at some point,  there should be a php 
version and a
c++ version of the registry code.   Perhaps this is best after we have 
perfected the java version.
It should not be too difficult, as call sequence should all be the same.

Thanks,
Emre.

Abhishek Kapoor wrote:
>
> Hello Sir(Emre and Suresh),
> I am able to register all the genapp exectuables with airavata . 
> Currently it is written in java, I will send you the code and also the 
> jar file for you to check.
> Also, If the Airavata server is not running and we try to register it 
> gives error which would be better if it could be change to throw 
> exceptions if Server not running.


Re: Registry API for Genapp

Posted by Abhishek Kapoor <ab...@gmail.com>.
Hello Sir(Emre and Suresh),
I am able to register all the genapp exectuables with airavata . Currently
it is written in java, I will send you the code and also the jar file for
you to check.
Also, If the Airavata server is not running and we try to register it gives
error which would be better if it could be change to throw exceptions if
Server not running.