Signal rity1

22
SignalRity Yaniv Rodenski Senior Architect – Sela Group Level: Intermediate - Advanced

description

 

Transcript of Signal rity1

Page 1: Signal rity1

SignalRity

Yaniv RodenskiSenior Architect – Sela Group

Level: Intermediate - Advanced

Page 2: Signal rity1

The way I used to get my data

Page 3: Signal rity1

The way She is Getting her Data

Page 4: Signal rity1

How do I get my data?

Page 5: Signal rity1

Real-Time Web

Page 6: Signal rity1

SignalRity

Yaniv RodenskiSenior Architect – Sela Group

Level: Intermediate - Advanced

Page 7: Signal rity1

About me:

• Senior Architect - Sela Group• Windows Azure MVP• Coauthor of Developing Windows Azure

and Web Services (MOC 20487)

Page 8: Signal rity1

Evolution of the real-time web

Polling

Long Polling

Forever-Frame

Server-sent Events

WebSockets

Page 9: Signal rity1

Demo

Using WebSockets

Page 10: Signal rity1

Why WebSockets are not Enough?

• HTML5 standard – great if you are living in 2020

• Low-level API• Strict prerequisites

Page 11: Signal rity1

Introducing SignalR

• Rich API for real-time web applications• Supports WebSockets• Fallback to other mechanisms

Page 12: Signal rity1

Hubs

• Hubs are high-level SignalR APIs• Provide a service-like abstraction• Provide a mechanism for invoking client

methods

Page 13: Signal rity1

Demo

Hello Hubs

Page 14: Signal rity1

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)

Page 15: Signal rity1

Groups

• Clients can be registered with a group• Part of the Hubs API

Groups.Add(Context.ConnectionId, groupName);

Clients.Group(groupName).invokeSomeClientMethod(args…);

Page 16: Signal rity1

Demo

Clients and Groups

Page 17: Signal rity1

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

Page 18: Signal rity1

Demo

Scaling out with Windows Azure

Page 19: Signal rity1

SignalR .NET Clients

• You can create SignalR clients in any .NET environment– .NET applications– Windows 8, Windows Phone 8 Apps– Even Silverlight– Xamarin

Page 20: Signal rity1

Demo

A .NET Client

Page 21: Signal rity1

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

Page 22: Signal rity1

Resources

• http://signalr.net/• Twitter: @DamianEdwards, @davidfowl• http://sdrv.ms/152qU0b• @YRodenski