Microsoft announces a preview service for building real-time web applications called Azure Web PubSub

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.


Currently, the Azure Web PubSub preview supports native WebSocket and a wide variety of programming languages ​​(including C#, Python, and Java) via WebSocket APIs, giving developers the flexibility to build real-time, cross-platform applications and migrate existing WebSocket applications. . In addition, the service also offers subprotocol – allowing clients to publish-subscribe efficiently without routing data between the service and the backend server code. And the service is also natively integrated with Azure Functions, allowing developers to build serverless C#, JavaScript, Python, and Java applications using WebSockets.

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).

And also:

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.

Finally, more details and guidance on using the Azure Web PubSub service can be found at documentation landing page and Github code samples.