0

I'm looking for advice regarding asp.net mvc 3 support for real time events display and handling. The typical scenario would be events like startup,shutdown, soft-reset, cache complete etc, issued on the the server and displayed immediately in the brower app, in near real time.

What is the typical mechanism to support real time events in asp.net mvc 3? Is there a listener mechanism similar to WPF event handing, or would I need to poll for them using AJAX.

I'm not planning to use any external or third pary applications to handle the events, like e.g. Pusher.

Bob.

scope_creep
  • 4,213
  • 11
  • 35
  • 64
  • 1
    As alternatives to SignalR you could look at [WebSync](http://www.frozenmountain.com) and [pokein](http://pokein.com/) which also integrate with IIS. – leggetter Jan 30 '12 at 19:53
  • 1
    MVC has no built in support for "real-time events". You would have to do either polling or have a persisted connection. One excellent library that does that is SignalR: https://github.com/SignalR/SignalR – marcind Jan 29 '12 at 18:44

1 Answers1

0

I am unaware of any built-in listener mechanism similar to WPF event handling.

In the past, I've had success with Ajax-polling. I implemented a thread-safe queue-based TraceListener which I would use to log events when they occurred, and on the poll action dequeue all of the backed-up trace logs.

Stephen Swensen
  • 22,107
  • 9
  • 81
  • 136
  • thanks for the answer. Found this [link](http://ajaxpatterns.org/Periodic_Refresh) which is excellent. I was going to use SignalR. Now I might embeed it, and use it as an event aggregator on the server, and use ajax polling on client. – scope_creep Mar 01 '12 at 17:27