Spico Florin | 1 Feb 11:11
Picon

UimaAsynchronousEngine client poor performance when the pipeline is slow processing the CAS

Hello!
I have application client that is receiving messages from a Queue via JMS.
The message is then packed in a JCas and sent to the UIMA AS pipeline via
UimaAsynchronousEngine.
If the UIMA AS pipeline processing is slow then it impacts the client in
the way that the received messages from the
Queue will not be sent as they arrived. I'm using sendCAS(CAS) method of
UimaAsynchronousEngine, thus the call to pipeline should be asynchronous
(as specfied in the spec).
 In my opinion the described behavior is not as expected (i.e. the client
should not be affected by the UIMA pipeline performance and
it should send the received messages for processing right away, without
waiting some responses).
  My questions are:
1. I suspect, that my client is somehow waiting the response from the
pipeline. Is there any way to disable the response feature?
2. I'm using a thread pool executor that is sending the messages to UIMA
pipeline. Is this a good approach?
3. How to design my client in order to send the messages to the pipeline
without concerning the pipeline performance?

I look forward for your answers and advices.
 Thank you.
   Best regards,

    Florin
Marshall Schor | 1 Feb 15:45

Re: UimaAsynchronousEngine client poor performance when the pipeline is slow processing the CAS

Are you following the examples in
http://uima.apache.org/downloads/releaseDocs/2.3.0-incubating/docs-uima-as/html/uima_async_scaleout/uima_async_scaleout.html#ugr.ref.async.api.usage

You may be limited by the size of the CAS pool (see the example code for how to 
set this).

-Marshall

On 2/1/2012 5:11 AM, Spico Florin wrote:
> Hello!
> I have application client that is receiving messages from a Queue via JMS.
> The message is then packed in a JCas and sent to the UIMA AS pipeline via
> UimaAsynchronousEngine.
> If the UIMA AS pipeline processing is slow then it impacts the client in
> the way that the received messages from the
> Queue will not be sent as they arrived. I'm using sendCAS(CAS) method of
> UimaAsynchronousEngine, thus the call to pipeline should be asynchronous
> (as specfied in the spec).
>   In my opinion the described behavior is not as expected (i.e. the client
> should not be affected by the UIMA pipeline performance and
> it should send the received messages for processing right away, without
> waiting some responses).
>    My questions are:
> 1. I suspect, that my client is somehow waiting the response from the
> pipeline. Is there any way to disable the response feature?
> 2. I'm using a thread pool executor that is sending the messages to UIMA
> pipeline. Is this a good approach?
> 3. How to design my client in order to send the messages to the pipeline
> without concerning the pipeline performance?
>
(Continue reading)

Jaroslaw Cwiklik | 1 Feb 15:52
Picon

Re: UimaAsynchronousEngine client poor performance when the pipeline is slow processing the CAS

Florin from you description I cant figure out the cause of the slowness
that you see. Are you saying that your application thread is stuck in
sendCAS() method as if it was waiting for a reply? This is certainly not
intent behind this API. It is an asynchronous call and should not wait for
a reply when the request is dispatched. How are you getting CASes? Do you
have your own CAS pool or use the one the UimaAsynchronousEngine provides.
How big is the CAS pool? Are you getting any replies via a
entityProcessComplete() callback? Which version of uima-as are you using:
2.3.1 or recent build from svn?

To your questions:

1) What do you mean by "..disable the response feature"? The sendCAS() is
asynch method which should not block. If it is blocking, than this is a bug
in UIMA AS client. To debug this problem, you can
2) The UimaAsynchronousEngine can be called from multiple threads and use
of ThreadPoolExecutor seems fine.
3) Have you tried to scale the pipeline to allow multiple CASes to be
processed at the same time? .

Jerry

On Wed, Feb 1, 2012 at 5:11 AM, Spico Florin <spicoflorin@...> wrote:

> Hello!
> I have application client that is receiving messages from a Queue via JMS.
> The message is then packed in a JCas and sent to the UIMA AS pipeline via
> UimaAsynchronousEngine.
> If the UIMA AS pipeline processing is slow then it impacts the client in
> the way that the received messages from the
(Continue reading)

Jaroslaw Cwiklik | 1 Feb 15:55
Picon

Re: UimaAsynchronousEngine client poor performance when the pipeline is slow processing the CAS

Sorry didnt finish my thought on question #1. If you see sendCAS()
blocking, attach jConsole to the application (you may need to enable JMX),
view the threads and check where your application thread is blocking.

JC

On Wed, Feb 1, 2012 at 9:52 AM, Jaroslaw Cwiklik <uimaee@...> wrote:

> Florin from you description I cant figure out the cause of the slowness
> that you see. Are you saying that your application thread is stuck in
> sendCAS() method as if it was waiting for a reply? This is certainly not
> intent behind this API. It is an asynchronous call and should not wait for
> a reply when the request is dispatched. How are you getting CASes? Do you
> have your own CAS pool or use the one the UimaAsynchronousEngine provides.
> How big is the CAS pool? Are you getting any replies via a
> entityProcessComplete() callback? Which version of uima-as are you using:
> 2.3.1 or recent build from svn?
>
> To your questions:
>
> 1) What do you mean by "..disable the response feature"? The sendCAS() is
> asynch method which should not block. If it is blocking, than this is a bug
> in UIMA AS client. To debug this problem, you can
> 2) The UimaAsynchronousEngine can be called from multiple threads and use
> of ThreadPoolExecutor seems fine.
> 3) Have you tried to scale the pipeline to allow multiple CASes to be
> processed at the same time? .
>
> Jerry
>
(Continue reading)

Spico Florin | 1 Feb 16:23
Picon

Need Parallel processing explanations

Hello!
  We have a pipeline that uses the parallel flow controller to coordinate
parallel remote AE. They are annotating the same message.
Our pipeline runs two annotators in parallel and the outputs of them are
sent to one CAS consumer. The two annotators don't depend on each other.
  I would like to know how UIMA AS manage the parallel behavior of the two
processes when one annotator is running slower than the other?
  Will the faster annotator consumes more messages than slower one? Or they
work at the same level, and the faster one will wait until the slower one
  gets its job done, and then it consumes the next message from the
pipeline?

 I look forward for your answers.
 Thank you.

Best regards,
 Florin
Jaroslaw Cwiklik | 1 Feb 17:52
Picon

Re: Need Parallel processing explanations

UIMA AS aggregate client waits for all replies to come back from Parallel
step before allowing a CAS to move on to the next step in the flow. From
the UIMA AS service point of view, services are independent and consume
messages(CASes) as soon there is capacity to do so. Faster service will
consume more messages than the slow one.

Jerry C

On Wed, Feb 1, 2012 at 10:23 AM, Spico Florin <spicoflorin@...> wrote:

> Hello!
>  We have a pipeline that uses the parallel flow controller to coordinate
> parallel remote AE. They are annotating the same message.
> Our pipeline runs two annotators in parallel and the outputs of them are
> sent to one CAS consumer. The two annotators don't depend on each other.
>  I would like to know how UIMA AS manage the parallel behavior of the two
> processes when one annotator is running slower than the other?
>  Will the faster annotator consumes more messages than slower one? Or they
> work at the same level, and the faster one will wait until the slower one
>  gets its job done, and then it consumes the next message from the
> pipeline?
>
>  I look forward for your answers.
>  Thank you.
>
> Best regards,
>  Florin
>
Guillaume Vauvert | 1 Feb 17:57
Picon

parent-pom version 4-SNAPSHOT

Hi,

The parent-pom with version 4-SNAPSHOT is not available on standard 
maven repositories (for instance 
http://mvnrepository.com/artifact/org.apache.uima/parent-pom).

Have you chosen to not release this version, and why ?

Or is it the fault of other maven repositories ?

Or should I add a UIMA maven repository ?

Best,
--
Guillaume Vauvert

Marshall Schor | 1 Feb 18:28

Re: parent-pom version 4-SNAPSHOT

SNAPSHOTs are available in the repository at repository.apache.org in the 
"Snapshot" section.

Include this in your pom to access it, in the <repositories> section

<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>http://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>

-Marshall

On 2/1/2012 11:57 AM, Guillaume Vauvert wrote:
> Hi,
>
> The parent-pom with version 4-SNAPSHOT is not available on standard maven 
> repositories (for instance 
> http://mvnrepository.com/artifact/org.apache.uima/parent-pom).
>
> Have you chosen to not release this version, and why ?
>
> Or is it the fault of other maven repositories ?
>
> Or should I add a UIMA maven repository ?
>
> Best,
(Continue reading)

Marshall Schor | 1 Feb 18:30

Re: parent-pom version 4-SNAPSHOT

To answer your question more directly, we do plan to release this version.  Our 
development process does development in "trunk" as -SNAPSHOTs, and from time to 
time, we make releases.  During that process the SNAPSHOTs are upgraded to 
released version numbers, and the artifacts get promoted to the main Maven 
repositories.

-Marshall

On 2/1/2012 11:57 AM, Guillaume Vauvert wrote:
> Hi,
>
> The parent-pom with version 4-SNAPSHOT is not available on standard maven 
> repositories (for instance 
> http://mvnrepository.com/artifact/org.apache.uima/parent-pom).
>
> Have you chosen to not release this version, and why ?
>
> Or is it the fault of other maven repositories ?
>
> Or should I add a UIMA maven repository ?
>
> Best,
> -- 
> Guillaume Vauvert
>

Guillaume Vauvert | 1 Feb 19:41
Picon

Re: parent-pom version 4-SNAPSHOT

Marshall,

Thank you very much for your detailed answer, Marshall.

OK, so UIMA 2.4.0 uses parent-pom version 3, since parent-pom version 
4-SNAPSHOT is for UIMA 2.4.1-SNAPSHOT .

And SNAPSHOT versions are not deployed on standard maven repositories 
(it is a normal behavior).

--
Guillaume

Le Wed Feb  1 18:30:36 2012, Marshall Schor a écrit :
> To answer your question more directly, we do plan to release this 
> version. Our development process does development in "trunk" as 
> -SNAPSHOTs, and from time to time, we make releases. During that 
> process the SNAPSHOTs are upgraded to released version numbers, and 
> the artifacts get promoted to the main Maven repositories.
>
> -Marshall
>
> On 2/1/2012 11:57 AM, Guillaume Vauvert wrote:
>> Hi,
>>
>> The parent-pom with version 4-SNAPSHOT is not available on standard 
>> maven repositories (for instance 
>> http://mvnrepository.com/artifact/org.apache.uima/parent-pom).
>>
>> Have you chosen to not release this version, and why ?
(Continue reading)


Gmane