Brady Gaster DEVB343 SignalR is an abstraction that intelligently decides how to enable realtime over HTTP SignalR on Oldschool Servers amp Clients When some lowercommon denominator polling mechanism is needed ID: 435466
Download Presentation The PPT/PDF document "Building Real-Time Applications with ASP..." 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.
Slide1Slide2
Building Real-Time Applications with ASP.NET SignalR
Brady Gaster
DEV-B343Slide3Slide4
SignalR is an
abstraction that intelligently decides how to enable
real-time
over
HTTPSlide5
SignalR on Old-school Servers & Clients
When some lower-common denominator polling mechanism is needed
Web Server
HTML Client
Got Data?
Got Data?
Got Data?
Got Data?
Got Data?
Got Data?
Got Data?
Got Data?
Here’s some dataSlide6
SignalR on Modern Servers & Clients
When
WebSockets
or some other real-time layer is supported
Web Server
HTML Client
I can party in real time. Can you?
Yep, I can party in real time
Let’s party in real time!Slide7
SignalR Core ConceptsSlide8
HubsSlide9
A real-time
hit counter
DemoSlide10
Any sufficiently advanced technology
is
indistinguishable from
magic
- Arthur
C. ClarkeSlide11
SignalR Hubs
A hub is a .NET class
that inherits from
Microsoft.AspNet.SignalR.Hub
Since Hubs are called on the client by name, the name can be customized if needed
The Clients property of a Hub class exposes dynamic properties useful for targeting specific clients
Hub classes also have virtual methods useful for responding to connected/disconnected eventsSlide12
Sending messages to
all connected clients
Jon
Scott
Brady
Hub
Clients.
All
.
doWork
()Slide13
Sending messages to the calling client
Jon
Scott
Brady
Hub
Clients.
Caller
.
doWork
()Slide14
Sending messages to
other connected clients
Jon
Scott
Brady
Hub
Clients.
Others
.
doWork
()Slide15
Sending messages to
specific users
Jon
Scott
Brady
Hub
Clients.
Users
(“Brady”)
.
doWork
()Slide16
Real-time WebSlide17
SignalR with Angular
DemoSlide18
Damian’s MoveShape
Demo
DemoSlide19
My MoveShape
Demo
DemoSlide20
Authorization with SignalR
DemoSlide21
Calling a SignalR Hub from the Server
DemoSlide22
Self-hosting SignalR using OWIN
DemoSlide23
Persistent ConnectionsSlide24
Persistent SignalR Connections
Low level
Work on top of transport abstraction
Pass untyped messages using Send() and Broadcast()
Client must parse message and know what to doSlide25
Persistent connections
DemoSlide26
Real-time EverywhereSlide27
Using SignalR’s
Native .NET Client
DemoSlide28
BackplanesSlide29
Hubs are
server-bound, so you’ll need to use a
backplane
if you’re running a web farmSlide30
How do Backplanes Work?
What does SignalR do without a backplane?
Web Server B
Web Server ASlide31
How do Backplanes Work?
Here’s how the Backplane solves the problem
Web Server A
Web Server B
BackplaneSlide32
Using a SignalR
Backplane
DemoSlide33
Thanks
for your time, I hope you enjoyed the session and that you start
partying
with
SignalR
!Slide34
DEV-B219 Latest Innovations for ASP.NET MVC
Development
DEV-B344 The Future of Microsoft .NET on the
Server
DEV-H215 Real-Time Web Applications with Microsoft ASP.NET SignalR
DEV-B318
Best Practices for Scaling Web Apps
Related content
Find Me
Later! Slide35
http://signalr.net
/
http://
www.asp.net/signalr
http://blogs.msdn.com/b/webdev/
Track resourcesSlide36
Resources
Learning
Microsoft Certification & Training Resources
www.microsoft.com/learning
Developer Network
http
://developer.microsoft.com
TechNet
Resources for IT Professionals
http://microsoft.com/technet
Sessions on Demand
http://channel9.msdn.com/Events/TechEdSlide37
TechEd Mobile app
for session evaluations
is
currently offline
SUBMIT YOUR TECHED EVALUATIONS
Fill out an evaluation via
CommNet Station/PC:
Schedule Builder
LogIn
:
europe.msteched.com/catalog
We value your feedback!Slide38
© 2014 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.