thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Paton <>
Subject Re: Two Way Asynchronous function in thrift
Date Tue, 10 Jul 2012 19:33:49 GMT
I've done something like this in the past. In my application, the client had a number of worker
threads. To make an asynchronous call, it would place a request in a queue. The threads dequeue
requests and make a synchronous Thrift call. Each request has a callback that gets called
when the Thrift call returns. The individual worker threads get blocked on the Thrift call,
but the calling threads of execution do not.

-- Jim

On Jul 10, 2012, at 4:15 AM, Karthik Abinav wrote:

> Hi,
> I would like to know how to use a two direction asynchronous function
> using thrift server. This is my current requirement. I have multiple
> clients sending requests to the thrift server. This in turn sends the
> request to a graph database. Problem is graph database cannot handle
> multiple connections at the same time. Hence, I dont want the client to
> wait till the thrift returns a response. Ideally, I would want to implement
> something like, a client posts a request to the thrift server and continues
> with its processing without being stalled. Once the thrift returns the
> response back, I want the client to be notified and process the response.
> Please give me guidelines on how to implement such a thing in thrift
> service.
> Thanks,
> Karthik Abinav

View raw message