Recently we had a community event where one of my friends, Jon Limjap presented SignalR and how it could enable interactivity between browsers. The sample/demo was a simple chat application; that I was able to locate on the web and re-create on my machine.
Then of course, I tinkered with the idea of hosting such an app on Azure.
Jon indicated that SignalR uses WebSockets.. something that I am unsure if is available on Azure since app instances on azure are not really on “real” machines.
First thing that came to mind was to use a queue, but that would be stupid 😀
Could not even decide whether to use a website or a web role.
Am not really keen on azure websites, haven’t really used them extensively so I try with web roles.. and the Service Bus, for message transfer between roles in a nicely loosely coupled manner.
So, I have my existing demo of the signalr chat app and convert it to an azure webrole by adding a cloud project and choosing it as the web role.
So.. what to do to use service bus?
Navigate the Azure management portal and turn on service bus. :p
Then modify Global.asax to hold the connection string for the servicebus
And.. where to get the connectionstring?
Back to the management portal, select the servicebus namespace you created earlier and get the connectionstring.
Then on the app, paste the connection string and change the instance count to 2