[MOBY-dev] async services

Enrique de Andres Saiz enrique.deandres at pcm.uam.es
Thu Feb 22 18:31:58 UTC 2007


Hi,

As Romina says, it is the behavior from the client side.

>From the server side, it is required to have:

- one method called service which answers the synchronous invocations
with typical moby messages. From the perldoc MOBY::Async:

  sub sayHello {
    my $self = shift @_;
    # Here you can choose between sync or error
    return $self->sync($sayHello, 180, @_); # tries to execute
    #return $self->error(@_); # returns directly an exception
  }

- one method called service_submit which answers the request
(submission) of asynchrnous invocations with the job identifier.

  sub sayHello_submit {
    my $self = shift @_;
    return $self->async($sayHello, @_);
  }

Note that here we use $self->async and in the previous $self->sync (or
$self->error)... if not, it could be possible that sayHello return an ID.

I have been checking the code and I don't see anything wrong, then I
don't think it is a bug.... but could you send me more details? Which is
that service which has that behavior.

I hope it helps.

Regards,
Enrique.


Johan Karlsson wrote:
> I think Romina is describing it correctly. Maybe the problem you 
> experienced was a temporary bug in the async server-side library of Perl?
> 
> Kind regards,
> Johan
> 
> Edward Kawas wrote:
>> Hi Romina,
>>
>> So you are describing what I actually thought is supposed to happen. I am
>> just slightly confused, because while we were debugging some of the wsdl
>> issues, I remember that one of the async services when called in sync mode
>> returned a job id.
>>
>> Maybe that was just a one time thing ...
>>
>> Eddie
>>
>> -----Original Message-----
>> From: moby-dev-bounces at lists.open-bio.org
>> [mailto:moby-dev-bounces at lists.open-bio.org] On Behalf Of Romina Royo
>> Sent: Thursday, February 22, 2007 8:15 AM
>> To: Core developer announcements
>> Subject: Re: [MOBY-dev] async services
>>
>> Hello!
>>
>> This is how I understood that async services should work (and how I'm 
>> implementing them so far).
>> Please anyone correct me if I'm doing it wrong!
>>
>> For example:
>>
>> The service runClustalwFast (authURI inb.bsc.es) is an asynchronous 
>> service.
>>
>> It can be executed in a synchronous mode (like all sync services):
>>
>> my $Service = MOBY::Client::Service->new(service => $WSDL);
>> my $result = $Service->execute(XMLinputlist => [['sequences', [$data,$data2]
>>                                         ]]);
>>
>> and this would return the normal moby message.
>>
>> Or it can be called in an asynchronous mode:
>>
>> my $Service = MOBY::Async::Service->new(service => $WSDL);
>> my $result = $Service->execute(XMLinputlist => [['sequences', [$data,$data2]
>>                                         ]]);
>>
>> which would _submit, _poll and finally return the results.
>>
>> Is this the behauviour everyone is expecting?
>>
>> Thanks!
>> Romina
>>
>> Edward Kawas wrote:
>>   
>>> Hi,
>>>
>>>  
>>>
>>> I wanted to verify something. If a synchronous client calls an async
>>> service, the async service is meant to act in synchronous mode, right? Of
>>> the handful of services that I have seen that are asynchronous, I don't
>>> believe that is the case. I believe that I have seen them return a message
>>> that contained a job id, and not the 'normal' moby message. 
>>>
>>>  
>>>
>>> This question is aimed mainly at the good folks at the inb, as I believe
>>> they are the only ones to have implemented any real asynchronous services.
>>>
>>>  
>>>
>>> Thanks,
>>>
>>>  
>>>
>>> Eddie
>>>
>>>  
>>>
>>>  ***CONFIDENTIALITY NOTICE***
>>>
>>>  This electronic message is intended only for the use of the addressee and
>>> may contain information that is privileged and confidential. Any
>>> dissemination, distribution or copying of this communication by
>>>     
>> unauthorized
>>   
>>> individuals is strictly prohibited. If you have received this
>>>     
>> communication
>>   
>>> in error, please notify the sender immediately by reply e-mail and delete
>>> the original and all copies from your system.
>>>
>>>  
>>>
>>> _______________________________________________
>>> MOBY-dev mailing list
>>> MOBY-dev at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/moby-dev
>>>   
>>>     
>> _______________________________________________
>> MOBY-dev mailing list
>> MOBY-dev at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/moby-dev
>>
>> _______________________________________________
>> MOBY-dev mailing list
>> MOBY-dev at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/moby-dev
>>
>>   
> 

-- 
Enrique de Andres Saiz
Unidad de Bioinformática (INB GNHC-1)
Parque Cientifico de Madrid
Ctra. de Colmenar, Km. 15.
Campus UAM, Cantoblanco - Pabellon C
28049 Madrid

Tel. (+34) 91 497 3448
Fax. (+34) 91 497 3471
http://www.fpcm.es
http://www.inab.org



More information about the MOBY-dev mailing list