For real time push notification I know SignaR and Server Sent Events in HTML5(EventSource)?
Whatever SignalR is doing, I can achieve with server sent events. My doubt is in which scenario I should use SignaR and SSE.
Thank you.
Server sent event is supported by only a few set of browsers.
That said, one of the goal of SignalR is to create an abstraction of the transport protocol. It allows the developer to focus on the logic of the application. Not how the data is transferred. Under the hood, SignalR will choose the appropriate transport, depending both on the server and the client capabilities.
With modern browsers, WebSockets will be used, whereas on old long polling will be used.
More info in the Transports section in the official documentation.
Update May 2020
Server Sent Events are supported by all major Browsers, just not in IE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With