This came up on the thrift-dev@ list just earlier today. Re-pasting my reply 
since the web archives don't seem to have a thread permalink view.

-----

Thrift doesn't support arbitrary message broadcasting. There aren't really any 
elegant solutions for this. The two closest options available are:

(1) Make your clients also be servers, use the "oneway" modifier to have the 
server connect to client and send an RPC for which there is no reply

(2) Use a COMET-style hanging request from the client to server with a long 
timeout -- this is going to be a mess and require nasty server-side threading

Neither of these are going to be particularly fun to implement. The Thrift 
server implementations and network protocol are designed assuming that clients 
initiate requests to servers, and servers only speak in direct response to 
client messages.


-----Original Message-----
From: Gyu [mailto:[email protected]] 
Sent: Monday, October 25, 2010 8:20 PM
To: [email protected]
Subject: How to send a message from Thrift server to client?

I want to know how to send a message from Thrift server to client.

I've searching for the way from so many web sites. But there is no way to that.

What I want to make is..

1.      An event happened in the server.
2.      Then the server send an event message to a client.
3.      Finally, client receive that message and display that.

Of course, other ways(like to use pooling in AJAX) I can do I know. But it’s 
not 
in real time.
I really sick with this problem. Please help me~ T_T


Reply via email to