title: Using SignalR in Azure Worker Roles
body: <p>I have an Azure hosted web application which works alongside a number of instances of a worker role. Currently the web app passes work to these workers by placing messages in an Azure queue for the workers to pick up. The workers pass status and progress messages back by placing messages into a 'feedback' queue. At the moment, in order to inform my browser clients as to progress, I make ajax based periodic polling calls in the browser to an MVC controller method which in turn reads the Azure 'feedback' queue and returns these messages as json back to the browser.</p>
  
  <p>Obviously, SignalR looks like a very attractive alternative to this clumsy polling / queing approach, but I have found very little guidance on how to go about doing this when we are talking about multiple worker roles (as opposed to the web role) needing to send status to individual or all clients .</p>
  
  <p>The SignalR.WindowsAzureServiceBus <a href="http://vasters.com/clemensv/CommentView,guid,e8d14433-f773-4a19-91c0-138a9770a7c8.aspx#commentstart" rel="noreferrer">by Clemens vasters</a> looks superb but leaves one a bit high and dry at the end i.e. a good example solution is lacking.</p>
  
  <p><strong>Added commentary</strong>: From my reading so far it seems that no <strong>direct</strong> communication from <em>worker</em> role (as opposed to <em>web</em> role) to browser client via the SignalR approach is possible. It seems that workers have to communicate with the web role using queues. This in turn forces a polling approach ie the queues must be polled for messages from the worker roles - this polling has to originate (be driven from) from the browser it appears (how can a polling loop be set up in a web role?)  </p>
  
  <p>In summary, SignalR, <em>even with</em> the SignalR.WindowsAzureServiceBus scale out approach of Clemens Vasters, cannot handle direct comunication from worker role to browser.</p>
  
  <p>Any comments from the experts would be appreciated.</p>