Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF Duplex Communications in a clustered environment
    text
    copied!<p>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 (<a href="http://msdn.microsoft.com/en-us/library/cc645027(VS.95).aspx" rel="nofollow noreferrer">this MSDN article is great</a>), but <em>all</em> use the same paradigm:</p> <p>User A connects to server A, it puts him in an in-memory list to receive future updates.<br> User B connects to server A, it notifies all users in list that someone "logged in".</p> <p>... but what happens when</p> <p>User C connects to server C, the in-memory list for server C doesn't contain User A or B.</p> <p>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.</p> <p>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.</p> <p>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.</p> <p>What have I missed?</p> <p>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.</p> <p>So far, we're down to polling the table in the db looking for changes. Still seems like an ugly baby.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload