You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Jhelum Bisht <jh...@gmail.com> on 2017/06/07 07:41:29 UTC

Server <-> Client communication in thrift C++?

Hi,

Is there a way to get two way communication from client to server and
server to client using thrift w/o starting new second server on client C++
application too?

Thanks!

Re: Server <-> Client communication in thrift C++?

Posted by Randy Abernethy <ra...@apache.org>.
Didn't see an answer go out on this, sorry if someone already did.

The short answer is no, Thrift is an RPC client/server system.

Lots of examples of custom return paths exist though:
- The one you mention, the client passes the server a callback endpoint and
implements a thrift service
- The client upgrades an HTTP channel to create a websocket return path for
async server messages to the client
- Write a custom transport layer that supports OOB responses from the
server, delivering them up a side channel to the client

Lots more I'm sure but those are some nice designs I have seen. I like the
last in particular because you don't need a second TCP connection.

-Randy

On Wed, Jun 7, 2017 at 12:41 AM, Jhelum Bisht <jh...@gmail.com>
wrote:

> Hi,
>
> Is there a way to get two way communication from client to server and
> server to client using thrift w/o starting new second server on client C++
> application too?
>
> Thanks!
>