title: SignalR for tracking online users and chat
body: <p>We are working on a social network application and are going to implement couple of new features.
  1. Tracking online users
  2. Chat (one to one chat and later group chat)</p>
  
  <p>I have looked into SingalR and it seems promising. We are using ASP.NET MVC 3 and are thinking of using hubs.
  My question to start with is whether SignalR be better instead of simple polling for chat? What will be better as far as scalability is concerned? I have seen other questions on SO but was not able to find out which one of them is better as far as scalability is concerned.</p>
  
  <p>The second question is if we use SignalR, can we use it to also track online users. We can call a server side function from each client at regular interval to say "I am online" and in the hub method we can just set the isOnline bit in the DB. Once the client is disconnected we can unset the bit. Will this work or is simple polling is better here ? How do we set user as offline if we use simple polling?</p>