Whoa, hang on there. You can approximate this without "hanging requests" if
your client just checks back every so often to pick up notifications. If you
need instantaneous event-driven kind of behavior, Thrift can't help you
right now, but most people don't really need that.

On Mon, Oct 25, 2010 at 4:10 PM, Mark Slee <ms...@facebook.com> wrote:

> Well, Thrift *is* offering you a cross-language server. =)
>
> A cross-language bi-directional messaging protocol+implementation, however,
> is significantly more complicated (introduces need for all kinds of tricky
> things like muxing/windowing/interleaving, etc. -- not just on the server
> side code but also on the client, which now has to be ready to receive
> multiple types of data at any time, and have a mechanism for client
> application code to either poll for these events or receive them
> synchronously in a thread-safe way).
>
> -----Original Message-----
> From: Eugen Rata [mailto:eugen.r...@gmail.com]
> Sent: Monday, October 25, 2010 4:04 PM
> To: thrift-dev@incubator.apache.org
> Subject: RE: Broadcasting
>
> Hi Mark,
>
> Thx for feedback.
> It looks like I'll have to remain with WCF, heh, I wanted so much to have a
> cross-language server.
>
> \Eugen
>
> -----Original Message-----
> From: Mark Slee [mailto:ms...@facebook.com]
> Sent: Monday, October 25, 2010 3:57 PM
> To: thrift-dev@incubator.apache.org
> Subject: RE: Broadcasting
>
> Hi Eugene,
>
> 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.
>
> Cheers,
> mcslee
>
>
> -----Original Message-----
> From: Eugen Rata [mailto:eugen.r...@gmail.com]
> Sent: Monday, October 25, 2010 11:31 AM
> To: thrift-dev@incubator.apache.org
> Subject: Broadcasting
>
> Hi,
>
>
>
> Can Thrift be used to broadcast some type of info for some clients
> regarding
> the info they requested?
>
> Like, client would subscribe to a news channel, server would keep the
> client
> id or something, and then when at the server side some news appears to be
> ok
> for the client, the server would send them.
>
>
>
> In WCF I'm using Callbacks for this, how can I do this in Thrift?
>
>
>
> Thx
>
> \Eugen
>
>

Reply via email to