So I was looking at the sample examples people have created for Duplex Communications namely when hosted by IIS and connected to via Silverlight. There are plenty of examples of this out there (this MSDN article is great), but all use the same paradigm:
User A connects to server A, it puts him in an in-memory list to receive future updates.
User B connects to server A, it notifies all users in list that someone "logged in".
... but what happens when
User C connects to server C, the in-memory list for server C doesn't contain User A or B.
The problem is that I'm looking to implement this in a clustered (web farm) environment. This complicates things because I cannot verify which machine will wind up fielding the wcf call, so relaying any message out to all other users is difficult.
The best scenario I can think of is to actually have the clients connect to some sort of routing service that takes the incoming request and forwards the client to a particular machine. Of course, then I'm losing the benefit of the web farm, since a single machine is effectively fielding all incoming requests.
A less effective solution is to have the service continually polling something (either a file on the fileserver or a table in the DB) looking for changes. Once changes are present, push them out to the clients. This seems like a very ugly baby, tho.
What have I missed?
UPDATE - The routing system is impossible for my needs. My hosting company will not allow me to directly connect to a specific machine on the farm via IP. I can only connect to the generic load-balancer front-end, so cannot guarantee my users will wind up on the same server.
So far, we're down to polling the table in the db looking for changes. Still seems like an ugly baby.