2. • Overview of ASP.NET SignalR
• How SignalR can be used for realtime
communications
Agenda
3. What is ASP.Net SignalR?
Real-time, persistent connection abstraction over HTTP
for .NET
Largest followed C# repo on GitHub
Simple and powerful API’s
Many techniques use to keep the logical connection up,
including retry logic if transports fail
Scale-out to web-farms using backplanes
6. SignalR Connections
Many techniques used to maintain connection
• WebSockets
• bidirectional stream
• Server Sent Events
• Push notifications from server to browser using DOM events
• Forever Frame
• uses HTTP 1.1 chunked encoding to establish a single long-lived
HTTP connection in a hidden iframe
• Internet Explorer only
• Long Polling
• hit the server hit the server hit the server hit the server hit server
and hope something comes back with data
11. PersistentConnection And Hub
The two primary components in SignalR are hubs and
persistent connections.
Connection persistence is how the server can
communicate with one or more clients.
The vehicle to communicate with clients is a hub.
13. PersistentConnection
- Easiest implementation
- Has to have message type embed in the payload
to support different types of messages with different
payloads.
Hub – RPC over a connection
- Allows call methods on the client from the server
and from the server to the client
- Allows to pass strongly typed parameters to
methods
PersistentConnection Vs Hub
16. Scale-Out
Three options for deploying backplane
- Service Bus
- SQL Server
- Redis
Open source in memory database that persists on disk
Requires libraries from the GitHub project currently not
in Microsoft SignalR
Local context
Access to the file system and devices, and can make cross-domain HTTP requests
Web context
Externally downloaded code
Must use iframe element
Local context
Access to the file system and devices, and can make cross-domain HTTP requests
Web context
Externally downloaded code
Must use iframe element
More details on all supported platforms - http://www.asp.net/signalr/overview/getting-started/supported-platforms
More details on all supported platforms - http://www.asp.net/signalr/overview/getting-started/supported-platforms