On Nov 10, 2008, at 2:28 PM, Rush Manbert wrote:

We have a Thrift server application that manages data on behalf of numerous clients. We would like to add the capability for clients to be notified when the managed data is changed. Clients would tell the server what data they care about, and would be notified asynchronously if the data changes.

You're talking about a classic pub/sub architecture here.

Clients talk to the server through an object interface that we have layered on top of the Thrift client side interface. We were thinking that we could add the notifications capability by adding a Thrift server to the client side object. This server would listen for notification messages on a runtime-selected port address. He would register the port address with the managed data server when the client side object is instantiated.

We like this approach because it means all of our client/server interactions use a Thrift interface. It lets us easily have clients be remote to the server.

You don't need to listen on random ports at client side, which can cause all sorts of problems if there is any firewall in between. You can have a subscription/topic manager at the server side to manage connections from the clients.

My question is whether this seems like a good approach to the list readers and the Thrift developers. Is there some mechanism already in place within the Thrift library for this? Is there some other better approach?

I don't think there is an equivalent of subscription/topic manager in Thrift. The problem has been solved comprehensively before and elsewhere though. See IceStorm for some ideas:

http://zeroc.com/doc/Ice-3.3.0-IceTouch/manual/IceStorm.html

__Luke

Reply via email to