You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Richard Salz <rs...@us.ibm.com> on 2011/03/03 13:00:15 UTC

callbacks?

Is there a common and/or obvious way to do callbacks from server to 
client?  Anything planned?

thanks.

--
STSM, WebSphere Appliance Architect
https://www.ibm.com/developerworks/mydeveloperworks/blogs/soma/


Re: callbacks?

Posted by Rush Manbert <ru...@manbert.com>.
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


Re: callbacks?

Posted by Richard Salz <rs...@us.ibm.com>.
> 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.

        /r$

--
STSM, WebSphere Appliance Architect
https://www.ibm.com/developerworks/mydeveloperworks/blogs/soma/



Re: callbacks?

Posted by Roberto Aloi <ro...@erlang-solutions.com>.
Is it this what you're trying to do?

http://stackoverflow.com/questions/2554999/callbacks-in-thrift-asynchronous-functions

----- "Phillip B Oldham" <ph...@gmail.com> wrote:

> Can you describe the scenario/actions you're trying to achieve?
> 
> On 3 March 2011 12:00, Richard Salz <rs...@us.ibm.com> wrote:
> > Is there a common and/or obvious way to do callbacks from server to
> > client?  Anything planned?
> >
> > thanks.
> >
> > --
> > STSM, WebSphere Appliance Architect
> > https://www.ibm.com/developerworks/mydeveloperworks/blogs/soma/
> >
> >
> 
> 
> 
> -- 
> Phillip B Oldham
> phillip.oldham@gmail.com
> +44 (0) 7525 01 09 01

-- 
University of Kent - Erlang Solutions Ltd.
Blog: http://aloiroberto.wordpress.com
Twitter: @prof3ta


Re: callbacks?

Posted by Phillip B Oldham <ph...@gmail.com>.
Can you describe the scenario/actions you're trying to achieve?

On 3 March 2011 12:00, Richard Salz <rs...@us.ibm.com> wrote:
> Is there a common and/or obvious way to do callbacks from server to
> client?  Anything planned?
>
> thanks.
>
> --
> STSM, WebSphere Appliance Architect
> https://www.ibm.com/developerworks/mydeveloperworks/blogs/soma/
>
>



-- 
Phillip B Oldham
phillip.oldham@gmail.com
+44 (0) 7525 01 09 01