uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslaw Cwiklik <uim...@gmail.com>
Subject Re: Accessing uima as pipeline from a REST interface
Date Wed, 26 Feb 2014 14:41:23 GMT
Mihaela, does your REST service provide threading to handle client
requests? If so, you can consider using a shared instance of
client. Each thread would call sendAndReceive() and block until reply
comes. This would be the most efficient way of doing this I think.

Jerry C

On Tue, Feb 25, 2014 at 2:15 PM, Mihaela M <mmihaela1985@yahoo.com> wrote:

> Hello,
> I have an Uima As pipeline that has more annotators running in parallel.
> On top of this I want to build a REST service that would invoke the
> pipeline for a given text and return the annotations found back to the
> client. The REST service should support a high number of concurrent
> requests.
> Because of the need of having a synchronous call to the pipeline I thought
> I should use UimaAsynchronousEngine's sendAndReceive(CAS) method, but
> because this method is synchronized and blocks until the pipeline returns
> the reply, if I have only one instance of UimaAsynchronousEngine and the
> processing time is not that good all the calls of the web service will be
> handled synchronously, not in parallel.
> In this case , is it feasible to create a pool of UimaAsynchronousEngine
> clients (the pool size will match the CAS pool size of the uima as
> pipeline, which will add also more running instances of each annotator) and
> in the web service have one of the available clients in the pool reused to
> call the uima as pipeline synchronously? I know that each such client opens
> some connections to the ActiveMQ broker (at least two) so I expect to add
> some overhead to the message broker and my web server but I don't know how
> bad could it be.
> If I tune the pipeline so that is supports high throughput, what would be
> the best approach for adding this REST client with high throughput as well?
> I'm looking forward for any feedback or suggestions.
> Thanks,
> Mihaela

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message