2. What is “Real Time”
experience
“Real Time” web techniques
What is signalR
SignalR protocol
Connection & Hub
Groups and private
messages
.Net client
Self Hosting
Scaleout
5. • Not all servers support web sockets
• Not all network components support web sockets
• It’s API is limited
6. • Code once, deploy everywhere
• As cross-platform as possible
• Simple API to work with
7. • Open source project
• Abstraction layer over connection technique
• Can be self-hosted
• Call client methods from the server
WebSocket
ServerSentEvents
= ForeverFrames
Long-Polling
Polling
8. WebSocket SignalR
• Good performance • Abstraction layer
• Strict prerequisites • Reach API
• Limited API • Supports WebSocket
14. • Abstraction over signalR connection
• Service-like API
• Call clients methods from the server
15.
16. • You can use connection ID
• You can access a particular client by it
Clients.Client(connectionId).sendMessage(message)
17. • Part of Hub API
• Stored on client
• Not persistent
18.
19. _connection = new
HubConnection("http://localhost/RanWahle.Blog.SignalR.Demo");
IHubProxy proxy = connection.CreateHubProxy("soccerResultsHub");
_connection.Start().ContinueWith(
//define proxies
);
//invoke server methods
_proxy.Invoke(“HubServerMethod“ , args…));
20.
21. • Three NuGet packages to install
• Create class with Configuration method.
• Map hub in the Configuration method
• Use the class as a type parameter to
WebApplication.Start
22.
23. • signalR supports ASP.NET authentication &
authorization
• AuthorizeAttribute
• Accessing user data from context
• Authenticated request may downdgrade
to serverSentEvents in some clients.
24.
25. • Install Redis for Linux or Clone the windows porting
• Add One line of code
• On Windows – run redis from command line
• Your app is ready to scaleout
26.
27. Real time experience is more than
just polling
Using signalR can use the best
available technique
It can be self hosted
It can scale out
It has several clients