5

Microsoft Announces Preview Service for Building Real-Time Web Applications Call...

 3 years ago
source link: https://www.infoq.com/news/2021/05/azure-web-pubsub-preview/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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

May 07, 2021 2 min read

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. 

3f92c1e4-45e7-415c-942f-d520a74c05e8.png
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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK