BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Announces Preview Service for Building Real-Time Web Applications Called Azure Web PubSub

Microsoft Announces Preview Service for Building Real-Time Web Applications Called Azure Web PubSub

This item in japanese

Bookmarks

Recently Microsoft announced a preview of Azure Web PubSub, a new service for building real-time web applications. Azure Web PubSub is a fully-managed service that supports native and serverless WebSockets.

WebSockets allow for 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 helpful in scenarios where web applications require high-frequency data updates such as gaming, auctioning, or applications that support live-chat cross-platform like chatbots, online customer support, and real-time shopping assistant.

Balan Subramanian, partner director of product management, stated in a blog post about the preview service:

WebSocket is a standardized protocol that provides full-duplex communication. It is key to building efficient real-time web interactions and is supported by all major browsers as well as web servers. 


Source: https://azure.microsoft.com/en-us/blog/easily-build-realtime-apps-with-websockets-and-azure-web-pubsub-now-in-preview/

Currently, the Azure Web PubSub preview supports native WebSocket and a wide variety of programming languages (including C#, Python, and Java) through WebSocket APIs – providing flexibility for developers to build real-time cross-platform applications and migrate existing WebSocket-based applications. Furthermore, the service also offers json.webpubsub.azure.v1 subprotocol - enabling clients to do publish-subscribe effectively without routing data between service and back-end 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 stated in the same blog post:

You can use Azure Functions to integrate and process the location data from IoT devices and then leverage Azure Web PubSub service to broadcast the location data to multiple live dashboard clients to visualize real-time location information for your customers.

Azure Web PubSub is not the only real-time service offering Microsoft has in Azure. It also provides Azure SignalR, allowing developers to add real-time web functionality to applications over HTTP – also supporting similar scenarios. In a Twitter thread,  David Fowler, partner 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 tech, 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's no long-polling or server sent events fallback nor automatic reconnect; it's just you and your WebSocket client. And lastly, if you're using Azure SignalR continue to do so unless there's something limiting you from using it in more places. This service won't benefit you if that's not the case.

Lastly, more details and guidance around using the Azure Web PubSub service are available on the documentation landing page and Github code samples.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT