0

I am working on a web application (Angular 2 and Asp.net web API) that expected to be notified the user when some task has been created by another user(An entry on the Tasks table in the Database). Notification can be something similar to Facebook notification.

What are the technologies can be used to achieve this real-time notification? I am new to real time applications so please help me to choose the right path.

chenk
  • 372
  • 7
  • 26
  • Maybe this helps you: http://stackoverflow.com/questions/9570522/how-to-implement-socket-io-with-asp-net-iisnode-node-js-and-sql-server-for-ev – rinukkusu May 11 '16 at 07:21

2 Answers2

2

Real-time data is not cheap be it financially or overhead on resources.

To enable this using a Web Api would require long polling which is not the best way of doing it and have can be very costly on resources (Database hits every half-a-second!). This would give the appearance that data is real-time.

Alternatively one can look at SQL Service broker using sqldependency as signalr. The initial setup can be tricky. Signalr does have a list of limitations though.

I would suggest looking at technologies like RethinkDB or Firebase for real-time data feeds. There are financial cost implications though. One can also look at the combination of socket.io and react.js/node.js.

Companies like LinkedIn and AirBnb make use of Kafka which is distributed messaging system for real-time notifications. Facebook makes use of a combination of technologies.

Conrad Lotz
  • 7,324
  • 3
  • 21
  • 26
1

It depends on what kind of notifications you want to use.

  • A traditional notification system that shows notifications to the user when he's surfing the website can be created with WebSockets. A service is https://pusher.com
  • A new kind of app-like notifications can be delivered even when the user is not surfing the website. They are supported by Chrome for example and can be created using the W3C Push API (together with service workers and the Notification API). A service is https://pushpad.xyz (I am the founder)

For example Facebook supports both types.

collimarco
  • 29,854
  • 31
  • 89
  • 120
  • Thanks. I want to use the kind of notification that you mentioned first. I would have a look at Pusher. – chenk May 12 '16 at 05:13