thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rush Manbert <r...@manbert.com>
Subject Re: callbacks?
Date Wed, 09 Mar 2011 19:20:59 GMT

On Mar 9, 2011, at 7:33 AM, Richard Salz wrote:

>> http://stackoverflow.com/questions/2554999/callbacks-in-thrift-
>> asynchronous-functions
> 
> Not quite.  If I wanted that I'd be pushing for futures (c.f., 
> http://lists.boost.org/Archives/boost/2007/05/120674.php ).  I'm thinking 
> more along the lines of starting a thrift RPC, and then having the server 
> call back to the client to get the next chunk of data, for example.
> 

We do something like this with one of our apps. It's actually a daemon that handles all server
interactions on behalf of the daemon's Thrift clients. It talks to the Thrift server, and
the reply can contain "client work" items. The daemon client's responsibility is to do what
the server asks it to do. So a client work could be "send me the next chunk of data".

That's the very simplified description. Works well, but it's synchronous. If you want to do
something asynchronous, that's another story.

Best regards,
Rush


Mime
View raw message