SignalR Brendan Kowitz brendankowitz DEV315A Agenda Getting started with SignalR Adding Realtime updates to an existing app Advanced scenarios Rich client Performance and scaling Why ID: 524999
Download Presentation The PPT/PDF document "Real-time web applications with" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Real-time web applications with SignalR
Brendan Kowitz@brendankowitz
DEV315ASlide2
Agenda
Getting started with SignalRAdding Real-time updates to an existing app
Advanced scenarios
Rich client
Performance and scalingSlide3
Why SignalR?Slide4
Why use SignalR?
Anytime the user needs to refresh the screenDashboards and monitoring
Collaborative
anything
Job
progress
Real-time
forms and concurrency management
“
But I just write forms over data apps
..”
GamingSlide5
Getting startedSlide6
SignalR Hosts
Host agnostic – run in asp.net or stand alone with self-host on OWINSlide7
Hubs and Connections
Connections – LOW LEVELRaw strings up and downBroadcast to all clients, groups or
individuals
Connection, reconnection and disconnection
semantics
Hubs – Bit higher level
Client-server and server-client
Automatic client proxy generationSlide8
Try it yourself:
PM> Install-Package Microsoft.AspNet.SignalR.SampleSlide9
What to include?
<script src="jquery.js"></
script
>
<script
src
="
jquery.signalR.js
"></script
>
<
script
src
="
signalr
/hubs
"></script>Slide10
Demo
Getting started with SignalRSlide11
Adding SignalR to an existing appSlide12
Agile DashboardSlide13
Agile dashboard libraries
DurandalJSKnockout
Postal
ToastrSlide14
Demo
Adding in Hubs and responding to changeSlide15
Security?
Same as any other web applicationSlide16
SignalR clients?
Clients for pretty much everybody.
.NET
4/5
SL5
Store apps
Phone apps
Portable apps
Monotouch
/
droidSlide17
Rich client SignalRSlide18
Rich client SignalR – how is it different?
var hubConnection = new
HubConnection
("http://www.contoso.com
/");
IHubProxy
stockTickerHubProxy
=
hubConnection.
CreateHubProxy
("
StockTickerHub
");
stockTickerHubProxy
.On
<Stock
>
("
UpdateStockPrice
",
stock
=>
Console.WriteLine
("Stock update for {0} new
price
{1}",
stock.Symbol
,
stock.Price
));
await
hubConnection.Start
();Slide19
Demo
SignalR in Excel? – oh my.Slide20
Agile dashboard…In Excel!!Slide21
Performance & ScaleSlide22
Performance
Throughput100,000s of messages per secondVery low memory overhead
Scale
Fully
async
to optimise resource utilisation
1,000s of connections per server (concurrent)
Supports horizontal
scaleout
using pluggable message
bus backplaneSlide23
Which are currently valid scale-out options for SignalR?
SQL Server
Windows Azure Service Bus
ZeroMQ
Redis
Messaging Ferrets
http://animals.nationalgeographic.com/animals/mammals/black-footed-ferret/
http://www.asp.net/signalr/overview/performance-and-scaling/scaleout-in-signalrSlide24
How does it work?Slide25
Demo
Using a backplane - RedisSlide26
What’s next?
http
://www.quickmeme.com/meme/35dm11/Slide27
Further watching
Microsoft ASP.NET SignalR: The Real-Time Web Made Simple
http://
channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DEV-B302
Building Real-time Web Apps with ASP.NET
SignalR
http://
channel9.msdn.com/Events/Build/2012/3-034
Introducing ASP.NET
SignalR
- Push Services with
Hubs
http://pluralsight.com/training/courses/TableOfContents?courseName=signalr-introductionSlide28
Take-away
Getting started with SignalRAdding Real-time updates to an existing app
Performance
Advanced scenariosSlide29
Get the source!
https://github.com/brendankowitz/AgileR
Got a question?
@
brendankowitz
brendan.kowitz@readify.netSlide30
Related content
WPH322 -
Cross Platform Mobile Web
DevelopmentSlide31
Developer Network
Resources for Developers
http://
msdn.microsoft.com
/en-au/
Learning
Virtual Academy
http://www.microsoftvirtualacademy.com/
TechNet
Resources
Sessions on Demand
http://channel9.msdn.com/Events/
TechEd
/Australia/2013
Resources for IT Professionals
http://technet.microsoft.com/en-au/Slide32
© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.