microsoft signal r
Post on 14-Jan-2015
928 Views
Preview:
DESCRIPTION
TRANSCRIPT
Pranav Rastogi
Program ManagerMicrosoft
Twitter : rustd
ASP.NET SignalRReal time web made
simple
www.devconnections.com
ASP.NET SIGNALR
INTRODUCTIONSIt always helps to know who you’re dealing with, so here’s a little background on me.
@rustd
ASP.NETProgram Manager
http://blogs.msdn.com/pranav_rastogi/
Author
www.devconnections.com
ASP.NET SIGNALR
WHAT IS ASP.NET SIGNALR?Incredibly simple real-time web for .NET
Simplicity
Reach
Performance
www.devconnections.com
ASP.NET SIGNALR
HOW SIMPLE?
www.devconnections.com
ASP.NET SIGNALR
HOW CAN I USE REAL-TIME IN MY APP?Anytime a user refreshes the page or you use polling
Dashboards & monitoring
Collaborative anything
Job progress
Real-time forms & concurrency management
Gaming…
www.devconnections.com
ASP.NET SIGNALR
SHOOTR.SIGNALR.NET
www.devconnections.com
ASP.NET SIGNALR
SIMPLICITYREACHPERFORMANCE
www.devconnections.com
ASP.NET SIGNALR
SIMPLICITY: TWO-LEVEL API
ConnectionsLow level
Raw strings up & down
Broadcast to all clients, groups or individuals
Connection, reconnect & disconnect semantics
HubsBuilt on top of connections
RPC from client-server *AND* server-client
Automatic client proxy generation (JavaScript)
www.devconnections.com
ASP.NET SIGNALR
CONNECTIONS VS. HUBS
www.devconnections.com
ASP.NET SIGNALR
CONNECTION LIFETIMEA SignalR connection’s lifetime may be made up of many physical connections
Events are raised on both server and client
Fast disconnect for “clean” abort, timeout based for “unclean”
www.devconnections.com
ASP.NET SIGNALR
SIMPLICITYREACHPERFORMANCE
www.devconnections.com
ASP.NET SIGNALR
REACH: BUT WHAT ABOUT WEBSOCKETS?WebSockets works if…You use ASP.NET 4.5 on Windows Server 2012 AND
Client uses IE10 or latest Chrome, FF, Safari AND
Your load balancer/reverse proxy supports it AND
Client proxy server/NAT supports it AND
Everybody between client & server supports it AND
You’re happy coding against raw sockets AND
You manage scale-out yourself
SignalR works…Everywhere
We’ll try WebSockets then fallback to:
• Server Sent Events
• Forever Frame
• Long Polling
We give you a simple & powerful API to work with
We do our best to keep the logical connection up, including retry logic if transports fail
We scale-out to web-farms
www.devconnections.com
ASP.NET SIGNALR
TRANSPORT NEGOTIATION
www.devconnections.com
ASP.NET SIGNALR
REACH: CLIENTS FOR EVERYBODY!
Right nowJavaScript (jQuery)
.NET 4.0/4.5
Silverlight 5
Windows Store apps
Windows Phone 8
Portable Class Library
MonoTouch
MonoDroid
In the futureC++
Pure JavaScript (no jQuery)
iOS native
Java
.NET Micro Framework
…
www.devconnections.com
ASP.NET SIGNALR
MIXED CLIENTS
www.devconnections.com
ASP.NET SIGNALR
SIMPLICITYREACHPERFORMANCE
www.devconnections.com
ASP.NET SIGNALR
PERFORMANCE: THROUGHPUT & SCALEThroughput
Very high performance on a single box
100,000’s of messages per second
Very low memory overhead
Scale
Fully async to optimize resource utilization
1,000’s of connections per server
Supports horizontal scale-out using a pluggable message bus backplane (Azure Service Bus, Redis, SQL)
www.devconnections.com
ASP.NET SIGNALR
SCALE-OUT
web nodes
clients
backplane
www.devconnections.com
ASP.NET SIGNALR
THERE’S MORE…
Host-agnosticRun it in your ASP.NET application or standalone with self-host on OWIN
Cross-platformRun it on OSX or Linux with Mono
Open Source#1 watched C# repo on GitHub
SupportedSupported part of the ASP.NET family
Documentation at www.asp.net/signalr
www.devconnections.com
ASP.NET SIGNALR
RELATED CONTENT
ASP.NET Identity & Security Introduction to .NET Web Development
on Azure Microsoft ASP.NET, Web, and Cloud
Tools Preview
www.devconnections.com
ASP.NET SIGNALR
THANK YOU!!!
top related