title: Server to Phonegap push: SignalR vs Azure Notification Hub
body: <p>Well, I'm in a kind of a dilemma to go on with my Phonegap application development: for real time event notification, should I go with Azure Notification Hub or SignalR? </p>
  
  <p>For my understanding, SignalR is good for real time web applications through the use of Web Sockets. Whereas notification hub makes it easy to send push notifications across multiple platforms. 
  To make it easy to respond, let me explain the structure that I currently have and what my app is supposed to do.</p>
  
  <p>The App:
  It's basically an app where users can create groups and invite other users. The user can also make a group "online" so other users can "enter" the group. While the group is online and the user have entered , they can send questions, exchange messages and so forth. </p>
  
  <p>The need: 
  When a user ask a question in a group, or enter/leave a group, the other users needs to see the new user in the app screen. I could do a polling on the server to check that and update the UI according, but this is something the modern days don't allow. My searches on the subject lead me to two things: SignalR and NotificationHub.</p>
  
  <p>The current architecture:
  Client -> PhoneGap application with backbone.js. 
  Backend -> Asp.NET Web API with Entity Framework and Azure Sql Server. </p>
  
  <p>I've already put some thinking in the use of notification hubs and tags for that.
  For example, when a user enter an online group, it sends a request to the server to register a "grouplisten:{groupId}" tag. The server then registers the tag with the user's device and also fires a notification to all other devices with the tag "grouplisten:{groupId}", so the other users update the UI with the recently joined user. Also when the user leaves the group, it sends a request to the server to remove the "grouplisten:{groupId}" tag and also notifiy the devices with "grouplisten:{groupId}". But with this simple example, looks like this can become unmanageable. </p>