Sam Basu | @samidip
Developer Advocate | Telerik
Real Time Apps with SignalR
Some History …
 Crux of it all
 Lots of optimizations
 About the same fundamentals
 Chat .. Duh!
 Stock Tickers
 Live Auctions/Polls
 Sports/News Updates
 Collaboration
 Games
 Location services
 Progress Indicators
 And many many more ..
 This is hard
 Transcends technology stacks
 Varying platforms/devices
 Web apps want to be Stateless
 Bandwidth & Data limits
 Network failures
 Data loss
Wishlist: Open transport channel between client-server, for bidirectional or full-duplex communications.
Some Solutions …
Periodic/Ajax Polling
Not real-time | Unnecessary trips
 Server does not respond unless something happens
 Client polls after receiving data or timing out
Needs orchestration | Custom code on either end
 HTML 5 Magic Unicorn stuff for low latency exchanges
 Persistent connection for bi-directional communications
Support varies by platform | Needs timeout/reconnection
 Flash sockets – Best not to talk about Plugins
 Server-Sent Events – Push updates from server
 Forever Frames – Script blocks in hidden IE iFrame
 gRPC – Lightweight ProtoBuf RPC | Great for MicroServices
Transport layer takes work | Nothing is perfect | Custom logic
SignalR across Web/Mobile/Desktop
Compilers Languages Runtime components
COMMON INFRASTRUCTURE
.NET STANDARD LIBRARY
TOOLS
$_
 For both ASP.NET & ASP.NET Core
 Allows for easy addition of Real-Time communications
 Wrapper so developers can be worry free about network
 Chooses best Transport
 Handles connection management
 APIs for client management
 Supports variety of platforms
 Scales nicely with some orchestration
 Hub of communication between server-client
 High-level pipeline
 Server & Clients can call Methods on each other
 Hubs manage Clients & network Context
 Support for magic strings or strongly typed parameters
 Essentially Middleware for ASP.NET Core
 Choices in Hub data transfer protocols
 SignalR takes care of Serialization/De-Serialization
 Built-in – Text protocol based on JSON/NewtonSoft.JSON
 Alternatively, use MessagePack
 MessagePack – Binary Serialization/De-Serialization
 More compact & performant over JSON
Modern .NET UI Made Easy
Any App | Any Platform
Build Better Web Apps Faster
Bring Your Framework
Care for some Demos?
 Lots of Configuration options
 Authentication/Authorization
 Security
 Streaming
 Logging/Diagnostics
 SignalR vs SignalR Core
Redis Backplane – In-memory DB | Maintains key-value pairs | Tracks connections across servers
 Infinite Scale with client connections
 Managed SignalR Hosting | Service acts as Proxy
 Broad client platform support
 Great with Serverless architectures
 Use full spectrum of other Azure services
 Provides REST API for easy manageability
Let’s keep chatting | @samidip
Thank You!

Real Time Apps with SignalR Core

  • 1.
    Sam Basu |@samidip Developer Advocate | Telerik Real Time Apps with SignalR
  • 2.
  • 4.
     Crux ofit all  Lots of optimizations  About the same fundamentals
  • 5.
     Chat ..Duh!  Stock Tickers  Live Auctions/Polls  Sports/News Updates  Collaboration  Games  Location services  Progress Indicators  And many many more ..
  • 6.
     This ishard  Transcends technology stacks  Varying platforms/devices  Web apps want to be Stateless  Bandwidth & Data limits  Network failures  Data loss Wishlist: Open transport channel between client-server, for bidirectional or full-duplex communications.
  • 7.
  • 8.
  • 9.
     Server doesnot respond unless something happens  Client polls after receiving data or timing out Needs orchestration | Custom code on either end
  • 10.
     HTML 5Magic Unicorn stuff for low latency exchanges  Persistent connection for bi-directional communications Support varies by platform | Needs timeout/reconnection
  • 11.
     Flash sockets– Best not to talk about Plugins  Server-Sent Events – Push updates from server  Forever Frames – Script blocks in hidden IE iFrame  gRPC – Lightweight ProtoBuf RPC | Great for MicroServices Transport layer takes work | Nothing is perfect | Custom logic
  • 12.
  • 14.
    Compilers Languages Runtimecomponents COMMON INFRASTRUCTURE .NET STANDARD LIBRARY TOOLS $_
  • 17.
     For bothASP.NET & ASP.NET Core  Allows for easy addition of Real-Time communications  Wrapper so developers can be worry free about network  Chooses best Transport  Handles connection management  APIs for client management  Supports variety of platforms  Scales nicely with some orchestration
  • 20.
     Hub ofcommunication between server-client  High-level pipeline  Server & Clients can call Methods on each other  Hubs manage Clients & network Context  Support for magic strings or strongly typed parameters  Essentially Middleware for ASP.NET Core
  • 21.
     Choices inHub data transfer protocols  SignalR takes care of Serialization/De-Serialization  Built-in – Text protocol based on JSON/NewtonSoft.JSON  Alternatively, use MessagePack  MessagePack – Binary Serialization/De-Serialization  More compact & performant over JSON
  • 22.
    Modern .NET UIMade Easy Any App | Any Platform
  • 23.
    Build Better WebApps Faster Bring Your Framework
  • 24.
  • 25.
     Lots ofConfiguration options  Authentication/Authorization  Security  Streaming  Logging/Diagnostics  SignalR vs SignalR Core
  • 26.
    Redis Backplane –In-memory DB | Maintains key-value pairs | Tracks connections across servers
  • 28.
     Infinite Scalewith client connections  Managed SignalR Hosting | Service acts as Proxy  Broad client platform support  Great with Serverless architectures  Use full spectrum of other Azure services  Provides REST API for easy manageability
  • 30.
    Let’s keep chatting| @samidip Thank You!