You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Neha Yadav <ne...@orkash.com> on 2010/01/18 10:11:13 UTC

simultaneously executing multiple deployment descriptors for UIMA-AS

Hi  all,
I have been working to create a UIMA-AS environment from last some days. 
As per the documentation I could achieve the Server and Client 
compatibility.
Now I am testing for multiple similar deployment descriptors to 
simultaneously run  and if multiple client requests are sent, so will 
the processing be executed on all the different or only one of them.
I even read in UIMA-AS documentation that there is a feature of sending 
multiple requests from the client. I want to know how can we send 
multiple requests in spite of the response from the server.

Thanks in advance,

Regards,
Neha


Re: simultaneously executing multiple deployment descriptors for UIMA-AS

Posted by Neha Yadav <ne...@orkash.com>.
Hi Eddie,
thanks for the reply.
Now I can make multiple requests for the same services successfully.

Thanks a ton,
regards,
Neha

Eddie Epstein wrote:
> Neha,
>
>   
>>   - I deploy one service on another machine with a Queue name say Q1 which
>> connect to the broker      on machine 1.
>> ./deployAsyncService.sh
>> $UIMA_HOME/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml
>>     
>
> As you say, this deploys a service on machine 1, presumably with Q1 as
> the queue name in the deployment descriptor.
>
>   
>>   - I start another service on third machine with Queue name say Q2.
>> ./deployAsyncService.sh
>> $UIMA_HOME/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml
>>     
>
> and another on machine 2. Did you change the queue name in
> Deploy_tokenSentenceaggreate.xml to be Q2 for this service instance?
>
>   
>>   - Now on the client machine I run this command:
>>   ./runRemoteAsyncAE.sh tcp://IPBrokerMachine:61616 Q1 -d
>> /hdd-1/AStest/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml
>>     
>
> The last argument, "-d /hdd....", is deploying another instance of the
> service on machine 1. According to your scenario, this is not needed
> as the service was already deployed.
>
>   
>>   - Now on client2 I run the same command.:
>>   ./runRemoteAsyncAE.sh tcp://IPBrokerMachine:61616 Q2 -d
>> /hdd-1/AStest/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml
>>     
>
> ditto.
>
>   
>> So my problem stands there itself, that how do I process different Document
>> ID's from different client machines on different instances of the same
>> service.
>> please suggest me what should I do.
>>     
>
> Double check that the deployment descriptor on machine 2 is specifying Q2.
>
> Eddie
>
>   


Re: simultaneously executing multiple deployment descriptors for UIMA-AS

Posted by Eddie Epstein <ea...@gmail.com>.
Neha,

>   - I deploy one service on another machine with a Queue name say Q1 which
> connect to the broker      on machine 1.
> ./deployAsyncService.sh
> $UIMA_HOME/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml

As you say, this deploys a service on machine 1, presumably with Q1 as
the queue name in the deployment descriptor.

>   - I start another service on third machine with Queue name say Q2.
> ./deployAsyncService.sh
> $UIMA_HOME/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml

and another on machine 2. Did you change the queue name in
Deploy_tokenSentenceaggreate.xml to be Q2 for this service instance?

>   - Now on the client machine I run this command:
>   ./runRemoteAsyncAE.sh tcp://IPBrokerMachine:61616 Q1 -d
> /hdd-1/AStest/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml

The last argument, "-d /hdd....", is deploying another instance of the
service on machine 1. According to your scenario, this is not needed
as the service was already deployed.

>   - Now on client2 I run the same command.:
>   ./runRemoteAsyncAE.sh tcp://IPBrokerMachine:61616 Q2 -d
> /hdd-1/AStest/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml

ditto.

> So my problem stands there itself, that how do I process different Document
> ID's from different client machines on different instances of the same
> service.
> please suggest me what should I do.

Double check that the deployment descriptor on machine 2 is specifying Q2.

Eddie

Re: simultaneously executing multiple deployment descriptors for UIMA-AS

Posted by Neha Yadav <ne...@orkash.com>.
hi Jerry,
Let me explain u my whole scenario.
well my work is to process documents. I run the CPE where my 
documentCollectionReader collects the input as document ID's form the 
Database and then the processing is done, and the output is stored in 
the database again by the CAS consumers.
now coming to UIMA-AS.for making my application to run asynchronously, I 
have embedded some folders in the same previous package to make it 
asynchronous. I added the examples folder which I got after extracting 
contents from UIMA-AS tar file. I added the UIMA_AS home folder in it 
and a bin folder.
Now I create the same environment at different machines. On the Broker, 
on the machine where the services are deployed and on the client machine.
Next- I start the broker on one machine.
    - I deploy one service on another machine with a Queue name say Q1 
which connect to the broker      on machine 1.
 ./deployAsyncService.sh 
$UIMA_HOME/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml
    - I start another service on third machine with Queue name say Q2.
 ./deployAsyncService.sh 
$UIMA_HOME/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml
    - Now on the client machine I run this command:
    ./runRemoteAsyncAE.sh tcp://IPBrokerMachine:61616 Q1 -d 
/hdd-1/AStest/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml
    - Now on client2 I run the same command.:
    ./runRemoteAsyncAE.sh tcp://IPBrokerMachine:61616 Q2 -d 
/hdd-1/AStest/uimas_test/examples/deploy/as/Deploy_tokenSentenceaggregate.xml

So what happens is that processing for client request 1 starts on 
machine 2, where the first services have been deployed.
And for the second client request with Queue name Q2, no processing is done.
So answer to my question, that how can I say that processing to second 
client request is not made. is I check in the database, the output is 
not stored.
And both the services are connected to the broker also, as the message 
for the same prints on the terminal.

So my problem stands there itself, that how do I process different 
Document ID's from different client machines on different instances of 
the same service.
please suggest me what should I do.

Thanks,
Neha



Jaroslaw Cwiklik wrote:
> Neha, if I understand your deployment you have two services that you deploy
> using the same deployment descriptor each running on a separate machine.
> Both of them connect to the same broker and use the same queue name. On the
> client side which API are you using synchronous (sendAndReceive) or
> asychronous (sendCAS)? How do you know that only one CAS is processed and
> others are not? Do you get a timeout or failure? If services are configured
> the same way, both of them should be processing CASes you send from your
> client. When you start your services do you see that both connect to a
> broker? UIMA AS service prints some info to the stdout on startup. Make sure
> that in both cases the output looks the same.
>
> Regards, Jerry C
>
>
> On Tue, Jan 19, 2010 at 12:07 AM, Neha Yadav <ne...@orkash.com> wrote:
>
>   
>> Jerry,
>> Thanks for ur reply.
>> Well , I started with UIMA-AS.
>> Similar to the Documentaion I had started Broker on one system, deployed a
>> service on another machine and sent a request form another. When I do this,
>> the request is processed on the system where the services are deployed and a
>> resulting message is shown on the client machine.
>>
>> Similar to the above, I tried to deploy the same service with 2 different
>> Queue name on different machine.
>> I made a client request form one of the machine with one queue name. the
>> request was executed on the respective machine where the services were
>> deployed with that very same Queue name.
>> Then when I tried to send a similar request but with the different queue
>> name it got executed on its respective  machine deploying services.
>> That is I could execute 2 different request with the same services
>> executed.
>>
>> But when I tried to deploy the same deployment descriptor with the same
>> Queue name on 2 different machine, and send multiple requests, then only one
>> of the request got executed and not the other ones.
>> The other request were processed on the client machine only.
>>
>> So now my question is that, when we have to deploy multiple services
>> simultaneously,so do we have to deploy each of them with different queue
>> names only or is there something which I am missing out.
>>
>> Thanks in advance,
>> Neha
>>
>>
>> Jaroslaw Cwiklik wrote:
>>
>>     
>>> Not sure if quite follow, but you *can* send multiple requests from a
>>> client
>>> to a UIMA AS service. There are two different methods for sending CASes
>>> from
>>> application that uses UIMA AS client:
>>>
>>> 1) synchronous, using sendAndReceive()
>>> 2) asychronous, using sendCAS()
>>>
>>> #1 above blocks until a reply is received. If you want to be able to send
>>> multiple requests from your application you need to instantiate as many
>>> UIMA
>>> AS clients as necessary.
>>>
>>> #2 above doesnt block. You can send as many CASes to a service as there
>>> CASes in your CAS Pool. In this case, you plug in to the UIMA AS client a
>>> Listener object to receive callbacks. The listener will be called with a
>>> unique CAS id before it is sent to the service. It is also called when a
>>> reply comes back.
>>>
>>> Please let me know if you need any more help.
>>>
>>> Regards, Jerry C
>>>
>>>
>>> On Mon, Jan 18, 2010 at 4:11 AM, Neha Yadav <ne...@orkash.com>
>>> wrote:
>>>
>>>
>>>
>>>       
>>>> Hi  all,
>>>> I have been working to create a UIMA-AS environment from last some days.
>>>> As
>>>> per the documentation I could achieve the Server and Client
>>>> compatibility.
>>>> Now I am testing for multiple similar deployment descriptors to
>>>> simultaneously run  and if multiple client requests are sent, so will the
>>>> processing be executed on all the different or only one of them.
>>>> I even read in UIMA-AS documentation that there is a feature of sending
>>>> multiple requests from the client. I want to know how can we send
>>>> multiple
>>>> requests in spite of the response from the server.
>>>>
>>>> Thanks in advance,
>>>>
>>>> Regards,
>>>> Neha
>>>>
>>>>
>>>>
>>>>
>>>>         
>>>
>>>       
>>     
>
>   


Re: simultaneously executing multiple deployment descriptors for UIMA-AS

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Neha, if I understand your deployment you have two services that you deploy
using the same deployment descriptor each running on a separate machine.
Both of them connect to the same broker and use the same queue name. On the
client side which API are you using synchronous (sendAndReceive) or
asychronous (sendCAS)? How do you know that only one CAS is processed and
others are not? Do you get a timeout or failure? If services are configured
the same way, both of them should be processing CASes you send from your
client. When you start your services do you see that both connect to a
broker? UIMA AS service prints some info to the stdout on startup. Make sure
that in both cases the output looks the same.

Regards, Jerry C


On Tue, Jan 19, 2010 at 12:07 AM, Neha Yadav <ne...@orkash.com> wrote:

> Jerry,
> Thanks for ur reply.
> Well , I started with UIMA-AS.
> Similar to the Documentaion I had started Broker on one system, deployed a
> service on another machine and sent a request form another. When I do this,
> the request is processed on the system where the services are deployed and a
> resulting message is shown on the client machine.
>
> Similar to the above, I tried to deploy the same service with 2 different
> Queue name on different machine.
> I made a client request form one of the machine with one queue name. the
> request was executed on the respective machine where the services were
> deployed with that very same Queue name.
> Then when I tried to send a similar request but with the different queue
> name it got executed on its respective  machine deploying services.
> That is I could execute 2 different request with the same services
> executed.
>
> But when I tried to deploy the same deployment descriptor with the same
> Queue name on 2 different machine, and send multiple requests, then only one
> of the request got executed and not the other ones.
> The other request were processed on the client machine only.
>
> So now my question is that, when we have to deploy multiple services
> simultaneously,so do we have to deploy each of them with different queue
> names only or is there something which I am missing out.
>
> Thanks in advance,
> Neha
>
>
> Jaroslaw Cwiklik wrote:
>
>> Not sure if quite follow, but you *can* send multiple requests from a
>> client
>> to a UIMA AS service. There are two different methods for sending CASes
>> from
>> application that uses UIMA AS client:
>>
>> 1) synchronous, using sendAndReceive()
>> 2) asychronous, using sendCAS()
>>
>> #1 above blocks until a reply is received. If you want to be able to send
>> multiple requests from your application you need to instantiate as many
>> UIMA
>> AS clients as necessary.
>>
>> #2 above doesnt block. You can send as many CASes to a service as there
>> CASes in your CAS Pool. In this case, you plug in to the UIMA AS client a
>> Listener object to receive callbacks. The listener will be called with a
>> unique CAS id before it is sent to the service. It is also called when a
>> reply comes back.
>>
>> Please let me know if you need any more help.
>>
>> Regards, Jerry C
>>
>>
>> On Mon, Jan 18, 2010 at 4:11 AM, Neha Yadav <ne...@orkash.com>
>> wrote:
>>
>>
>>
>>> Hi  all,
>>> I have been working to create a UIMA-AS environment from last some days.
>>> As
>>> per the documentation I could achieve the Server and Client
>>> compatibility.
>>> Now I am testing for multiple similar deployment descriptors to
>>> simultaneously run  and if multiple client requests are sent, so will the
>>> processing be executed on all the different or only one of them.
>>> I even read in UIMA-AS documentation that there is a feature of sending
>>> multiple requests from the client. I want to know how can we send
>>> multiple
>>> requests in spite of the response from the server.
>>>
>>> Thanks in advance,
>>>
>>> Regards,
>>> Neha
>>>
>>>
>>>
>>>
>>
>>
>>
>
>

Re: simultaneously executing multiple deployment descriptors for UIMA-AS

Posted by Neha Yadav <ne...@orkash.com>.
Jerry,
Thanks for ur reply.
Well , I started with UIMA-AS.
Similar to the Documentaion I had started Broker on one system, deployed 
a service on another machine and sent a request form another. When I do 
this, the request is processed on the system where the services are 
deployed and a resulting message is shown on the client machine.

Similar to the above, I tried to deploy the same service with 2 
different Queue name on different machine.
I made a client request form one of the machine with one queue name. the 
request was executed on the respective machine where the services were 
deployed with that very same Queue name.
Then when I tried to send a similar request but with the different queue 
name it got executed on its respective  machine deploying services.
That is I could execute 2 different request with the same services executed.

But when I tried to deploy the same deployment descriptor with the same 
Queue name on 2 different machine, and send multiple requests, then only 
one of the request got executed and not the other ones.
The other request were processed on the client machine only.

So now my question is that, when we have to deploy multiple services 
simultaneously,so do we have to deploy each of them with different queue 
names only or is there something which I am missing out.

Thanks in advance,
Neha

Jaroslaw Cwiklik wrote:
> Not sure if quite follow, but you *can* send multiple requests from a client
> to a UIMA AS service. There are two different methods for sending CASes from
> application that uses UIMA AS client:
>
> 1) synchronous, using sendAndReceive()
> 2) asychronous, using sendCAS()
>
> #1 above blocks until a reply is received. If you want to be able to send
> multiple requests from your application you need to instantiate as many UIMA
> AS clients as necessary.
>
> #2 above doesnt block. You can send as many CASes to a service as there
> CASes in your CAS Pool. In this case, you plug in to the UIMA AS client a
> Listener object to receive callbacks. The listener will be called with a
> unique CAS id before it is sent to the service. It is also called when a
> reply comes back.
>
> Please let me know if you need any more help.
>
> Regards, Jerry C
>
>
> On Mon, Jan 18, 2010 at 4:11 AM, Neha Yadav <ne...@orkash.com> wrote:
>
>   
>> Hi  all,
>> I have been working to create a UIMA-AS environment from last some days. As
>> per the documentation I could achieve the Server and Client compatibility.
>> Now I am testing for multiple similar deployment descriptors to
>> simultaneously run  and if multiple client requests are sent, so will the
>> processing be executed on all the different or only one of them.
>> I even read in UIMA-AS documentation that there is a feature of sending
>> multiple requests from the client. I want to know how can we send multiple
>> requests in spite of the response from the server.
>>
>> Thanks in advance,
>>
>> Regards,
>> Neha
>>
>>
>>     
>
>   


Re: simultaneously executing multiple deployment descriptors for UIMA-AS

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Not sure if quite follow, but you *can* send multiple requests from a client
to a UIMA AS service. There are two different methods for sending CASes from
application that uses UIMA AS client:

1) synchronous, using sendAndReceive()
2) asychronous, using sendCAS()

#1 above blocks until a reply is received. If you want to be able to send
multiple requests from your application you need to instantiate as many UIMA
AS clients as necessary.

#2 above doesnt block. You can send as many CASes to a service as there
CASes in your CAS Pool. In this case, you plug in to the UIMA AS client a
Listener object to receive callbacks. The listener will be called with a
unique CAS id before it is sent to the service. It is also called when a
reply comes back.

Please let me know if you need any more help.

Regards, Jerry C


On Mon, Jan 18, 2010 at 4:11 AM, Neha Yadav <ne...@orkash.com> wrote:

> Hi  all,
> I have been working to create a UIMA-AS environment from last some days. As
> per the documentation I could achieve the Server and Client compatibility.
> Now I am testing for multiple similar deployment descriptors to
> simultaneously run  and if multiple client requests are sent, so will the
> processing be executed on all the different or only one of them.
> I even read in UIMA-AS documentation that there is a feature of sending
> multiple requests from the client. I want to know how can we send multiple
> requests in spite of the response from the server.
>
> Thanks in advance,
>
> Regards,
> Neha
>
>