0

I'm working on a C# MVC 4 application and I want to make a notification system much like facebook.

I thought about adding a notification in a table for each event, and then make AJAX calls to the database each 1 minute to retrieve notifications for the current user.

But I'm afraid it's too heavy.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
NOr
  • 1,043
  • 2
  • 11
  • 13
  • Take a look at this: http://stackoverflow.com/questions/1342216/how-to-do-long-polling-ajax-requests-in-asp-net-mvc – JAM May 14 '13 at 06:41
  • 2
    I would take a look at signalR to abstract out the real time connection. It will save you a lot of effort over using jquery. Plus it will automagically use the most efficient notification method. – Aron May 14 '13 at 06:43
  • I was going to suggest the same thing as Aron, signalR is supppperrrr powerful and will do everything you need for notifications - http://www.asp.net/signalr – krilovich Mar 05 '15 at 19:31

1 Answers1

4

Your best bet would be to go with SignalR. Its designed for the purpose of real time notification

introduction-to-signalr

Abdul Khan
  • 363
  • 3
  • 13