SignalRity
Yaniv Rodenski
Senior Architect – Sela Group
Level: Intermediate - Advanced
The way I used to get my data
The way She is Getting her Data
How do I get my data?
Real-Time Web
SignalRity
Yaniv Rodenski
Senior Architect – Sela Group
Level: Intermediate - Advanced
About me:
• Senior Architect - Sela Group
• Windows Azure MVP
• Coauthor of Developing Windows Azure
and Web Services (MOC 20487)
Evolution of the real-time web
Polling
Long Polling
Forever-Frame
Server-sent Events
WebSockets
Demo
Using WebSockets
Why WebSockets are not Enough?
• HTML5 standard – great if you are
living in 2020
• Low-level API
• Strict prerequisites
Introducing SignalR
• Rich API for real-time web applications
• Supports WebSockets
• Fallback to other mechanisms
Hubs
• Hubs are high-level SignalR APIs
• Provide a service-like abstraction
• Provide a mechanism for invoking client
methods
Demo
Hello Hubs
Targeting Specific Clients
• When a client calls a hub, it gets a
connection id
• You can use this connection id to send a
message to this specific client
Clients.Client(connectionId).sendMessage(message)
Groups
• Clients can be registered with a group
• Part of the Hubs API
Groups.Add(Context.ConnectionId, groupName);
Clients.Group(groupName).invokeSomeClientMethod(args…);
Demo
Clients and Groups
Scaling out with SignalR
• One of the biggest issues with the “real-
time web” is scaling out
• SignalR can span across multiple hosts
using either Redis, SQL Server or
Windows Azure Service Bus
Demo
Scaling out with Windows Azure
SignalR .NET Clients
• You can create SignalR clients in any .NET
environment
– .NET applications
– Windows 8, Windows Phone 8 Apps
– Even Silverlight
– Xamarin
Demo
A .NET Client
Summary
• Real-time web does not need to be painful
• SignalR can let you use the best available
option
• SignalR is not just for web clients
• SignalR scales
Resources
• http://signalr.net/
• Twitter: @DamianEdwards, @davidfowl
• http://sdrv.ms/152qU0b
• @YRodenski

Signal rity1