Push question

Jul 13, 2010 at 6:57 PM

You mention that "Push subscription model (clients are not addressable)" is not a design goal. Does this mean that there is no way to send a specific client a message from the server?


Jul 15, 2010 at 4:50 AM
In internet scale deployments, web clients cannot establish listening endpoints to which others can connect to as clients. For example, an Ajax application cannot start listening for incoming HTTP requests at a specific address. Even if such capability existed in a browser, the constraints of the environment in which web clients typically run would prevent incoming connections from reaching this client (e.g. due to firewall restrictions). Even HTML 5 Websockets are not going to address this scenario - it is the client who needs to initiate the connection with a server (after which a fully duplex communication can occur). Now there is a way to simulate client addressability with higher level application protocols, like the publish\subscribe this project proposes. One can use a pattern by which each client creates a new, unique topic and subscribes to it. The topic then can be considered an "address" via which this client can be reached. Tomasz
Jul 15, 2010 at 6:48 PM

I think perhaps I was not clear in my question and for that I apologize.

Our scenario is this:

-          A SL client connects to our central server (we call it a proxy)

-          The proxy keeps track of all connected clients. We have a large number of proxy servers running concurrently.

-          Additional server side processes are running (game servers) and passing messages/data to the proxy servers.

-          At some point, the proxy decides that it needs to send data to a particular client that is in its list of connected clients

We currently handle this scenario by having the SL client poll every ten seconds. If data is waiting, the proxy sends it down the wire. We’re using Agatha RRSL (http://code.google.com/p/agatha-rrsl/) on top of basicHttpBinding which is working quite well with one exception.

The ten second delay is not tenable for certain user scenarios. For example, displaying chat messages on a ten second delay results in a strange batched conversation that is not natural.

The question for you is, can the proxy servers can send data down to a specific connected client any time they like?

Thank you,



Jul 16, 2010 at 6:12 AM
Rick, the communication pattern between the client and the proxy server you are describing is sometimes called HTTP short polling. As you noted, its disadvantage is the potentially high notification delivery latency (i.e. the client may get a message with a delay of up to the polling interval). In contrast to short polling, Laharsub is using HTTP long polling, which offers much lower latency (http://en.wikipedia.org/wiki/Long_polling#Long_polling). To address you question: even with HTTP long polling the server cannot send a message to the client any time it wants, but the server has such capability most of the time (in particular, more often compared to short polling). This is because the client in this protocol issues a new outstanding HTTP long poll as soon as it receives a response to the previous one. Thanks, Tomasz