[OTDev] Receiving task

Druzhilovsky dmitry.druzhilovsky at ibmc.msk.ru
Fri Feb 25 14:25:55 CET 2011


Dear Nina,

 

>I've asked in the previous email - why you have dataset  from apps.ideaconsult , but upload results into the other server ? Any reason for that, or just a mistake ?

 

[Druzhilovsky] 

 

Hm, what is wrong? It works both apps.ideaconsult and ambit.uni-plovdiv.

For rightness, let it go at that :

 

curl -X POST -d dataset_uri=https://ambit.uni-plovdiv.bg: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

 

See below:

 

 

From: Nina Jeliazkova [mailto:jeliazkova.nina at gmail.com] 
Sent: Friday, February 25, 2011 1:57 PM
To: opentox development mailing list
Cc: Druzhilovsky
Subject: Re: [OTDev] Receiving task

 

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?

 

[Druzhilovsky] 

MNA service doesn’t look whether there is database. Firstly service sends request to Ambit for authentication, but after that service downloads 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 ?

 

[Druzhilovsky] 

You are absolutely right! In the first place service looks whether user has access for login to our service, after that service looks whether user has access for dataset.

 


 

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. 

 

[Druzhilovsky] 

Hm…if I send dataset entirely then I don’t need to know which dataset I received, I have to know only “task”. But early you told me that opentox rule needs the task immediately.  Therefore MNA\QNA service divides dataset and sends compounds  one by one. If service speed is not important, we can change work of service, it make better.

 

 

 

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.  

 

[Druzhilovsky] 

 

Yes,it is really optimally, and we can make so, but we can’t give task ID until calculations will not be finished (i.c. through about 2 hours). It schema was made to produce task ID the sooner the better. If user will be tired to wait, he can see part of the base by this. PHP can’t work in background mode and if PHP will be disconnected then all will stop.

 

 


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