A warm welcome to my blog ! Today we will be focusing on the guy who is Microsoft’s powerful and real-time communication technology – SignalR !
ASP.NET SignalR is a new library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available. SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers. SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorization.
In simple terms,
Is SignalR only used for chat applications ?
No.Not at all. It can be used for many other types of applications as well. Below are few of them:
- Dashboard & Monitoring
- Collaborative anything
- Job progress
- Real time forms
3 Main principles of SignalR ?
Let’s cover these topics in some more details.
ASP.NET SignalR Real-time
- Low level
- Raw strings up and down
- Broadcast to all clients, groups or individuals
- Connect, reconnect & disconnect semantics
- High level
- Built on top of connections
- RPC (Remote Procedure Call) from client-server AND server-client
Web sockets works if …
- You use ASP.NET on windows server 2012
- Client used IE10 or latest chrome, Firefox, Safari browsers
- Your load balancer/reverse proxy supports it
- Client proxy server/NAT supports it
- You are happy coding against raw sockets
- You manage scale-out yourself
On the other hand …
- SignalR works everywhere
- SignalR try Web Sockets the fallback to –
- Server Sent Events
- Forever Frame
- Long Polling
- It gives a simple and powerful API to work with
- SignalR does its best to keep the logical connection up, including retry logic if transport fails
- It scale-out to web-farms
- Very high performance in a single box
- 100,000’s of messages per second
- Very low memory overhead
- Fully async to optimize resource utilization
- 1,000’s of connections per server
- Supports horizontal scale-out using a pluggable message bus backplane (Service Bus, Redis, SQL)
That’s all for now. We will be back with some real examples and scenarios related to SignalR. Meanwhile, you can check out some of our ASP.NET & HTML 5 articles.
What do you Think ?
If you have any questions or suggestions please feel free to email us or put your thoughts as comments below. We would love to hear from you. If you found this post or article useful then please share along with your friends and help them to learn.
Happy Learning 🙂