Search code examples
c#thrift

Can Apache Thrift push notifications to clients?


I'm looking to use Apache Thrift to have one client send data to the server and then have the server push that data to any clients. Is this possible, or would the client need to periodically check for new data? I'm looking for something similar to WCF's callbacks.

I'm pretty new to Apache Thrift and I'm using it in C#/.NET currently and will likely have a Java client. Thanks.


Solution

  • I don't know whether the Thrift RPC mechanism is built to handle calls going both ways on a single socket connection.

    If it doesn't, a simple workaround is to open two sockets -- one for the client to make calls to the server and another for the server to make calls to the client.

    Another workaround would be to implement two-way calling yourself. The Thrift library is relatively pluggable so you might be able to plug your own code in there to handle two-way calling without having to mess around with the other stuff.

    You'll probably get better answers if you ask this question on the Thrift mailing lists.