Microsoft recently announced a preview of Azure Web PubSub, a new real-time web application building service. Azure Web PubSub is a fully managed service that supports native and serverless WebSockets.
WebSockets allow full-duplex communication channels over a single TCP connection. Developers can leverage WebSockets in their web application implementation to open a two-way interactive communication session between the user’s browser and a server. It can be useful in scenarios where web applications require high frequency data updates such as games, auctions or applications that support cross-platform live chat such as chatbots, online customer support and shopping assistant in real time.
Balan Subramanian, associate director of product management, said in a preview service blog post:
WebSocket is a standardized protocol that provides full-duplex communication. It is essential for creating effective real-time web interactions and is supported by all major browsers as well as web servers.
Subramanian said in the same blog post:
You can use Azure Functions to integrate and process location data from IoT devices, then leverage the Azure Web PubSub service to stream location data to multiple live dashboard clients to view real-time location information for your customers.
Azure Web PubSub isn’t Microsoft’s only real-time service offering in Azure. It also provides Azure SignalRallowing developers to add real-time web functionality to applications over HTTP – also supporting similar scenarios. In one Twitter feed, David Fowlerpartner software architect at Microsoft on .NET, creator of SignalR and ASP.NET Core, explains the differences:
How is it different from SignalR, you ask? Well, internally it’s built on the same underlying technology, but the big difference is that there’s no client requirement or protocol requirement, BYOWL (bring your own WebSocket library).
Unlike SignalR, Azure Web Pubsub is just WebSockets; there are no long polling or server-sent events or automatic reconnection; it’s just you and your WebSocket client. And finally, if you’re using Azure SignalR, keep doing so unless something prevents you from using it in more places. This service will be of no use to you if this is not the case.