[OTDev] Receiving task

Nina Jeliazkova jeliazkova.nina at gmail.com
Fri Feb 25 11:56:51 CET 2011


Dear Dmitry,

On 25 February 2011 12:35, Druzhilovsky <dmitry.druzhilovsky at ibmc.msk.ru>wrote:

> Dear Nina, All
>
> I would like to ask you a technical question. Last week I fixed a code of
> MNA\QNA services and
> dashed against next problem. When I receive request, for example:
>
> curl -X POST -d dataset_uri=
> https://apps.ideaconsult.net:8443/ambit2/dataset/2765 -d dataset_service=
> https://ambit.uni-plovdiv.bg:8443/ambit2/dataset -d username=OTlogin -d
> password=OTPassword http://195.178.207.160/OpenTox/MakeMNA -iv
>
> I have next stages:
> 1. Service checks presence of dataset
> https://apps.ideaconsult.net:8443/ambit2/dataset/2765 and if it presents,
> service uploads it.
>

I guess you mean MNA service downloads the dataset ?  How do you check the
"presense" of the dataset ? If you do GET , it is already a download of
dataset, and if I understood right, you are actually doing two GET requests
on this dataset?


> 2. Service returns a token.
>

e.g. you send the user and password to the OpenSSO Policy service and
receive an OpenSSO token ?  If yes, you should do this as a first step,
otherwise when our server will go protected, you will not be able to
retrieve the data.

Or did I misunderstood ?


> 3. Service gives request to
> https://ambit.uni-plovdiv.bg:8443/ambit2/dataset and receives task.
>

MNA service sends POST request to ambit.uni-plovdiv server to upload
calculated descriptiors, right ?


> 4. Service sends data into dataset in compliance with task dataset.
>
>
It is not quite clear to me, but in general, the (MNA) service should have
already send the data for upload and just polling the task.  It is not
necessary to wait for the task completion, neither to retrieve the result
dataset.



> Not difficult... but for good working of REST PHP I had to make some
> supplements and it makes service work very long. May be you can help me, how
> I have to change a work of our services. Look:
>
> Now I receive a task only after service (MNA or QNA) puts the first
> compound in https://ambit.uni-plovdiv.bg:8443/ambit2/dataset (i.c.
> https://ambit.uni-plovdiv.bg:8443/ambit2/dataset/63684). After that
> service begins to add all next data by means of PUT and constantly listens
> "task". That is, each subsequent structure is put in base using URI
> https://ambit.uni-plovdiv.bg:8443/ambit2/dataset/63684.   This schema
> brings to the cycle and growth of process time.
> 1. Whether there is a possibility that service received "task" prior to it
> sent first structure?
> 2. Whether there is a possibility that service could put data using only
> task (without dataset uri)?
>
>
That's definitely not the most efficient way.

Why not just storing the entire RDF of the dataset locally , until it is
completed , and then post the RDF to the dataset service.  Just one POST and
not need to listen to task completion at all.

Nina


>
> Thank you in advance.
>
>
> Best regards
>
> Dmitry S. Druzhilovsky
>
> Laboratory of Structure-Function Based Drug Design
> 119121, Russia, Moscow, Pogodinskaya street, 10
> Phone: +7 499 255-30-29
> Fax: +7 499 245-08-57
>
>
> _______________________________________________
> Development mailing list
> Development at opentox.org
> http://www.opentox.org/mailman/listinfo/development
>



More information about the Development mailing list