Skip to content

Commit 037d6e4

Browse files
authored
Added article for LiveTry feature
1 parent b05d53f commit 037d6e4

File tree

3 files changed

+106
-7
lines changed

3 files changed

+106
-7
lines changed

articles/azure-web-pubsub/overview.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ ms.topic: overview
88
ms.date: 07/30/2024
99
---
1010

11+
12+
1113
# What is Azure Web PubSub service?
1214

1315
Azure Web PubSub Service makes it easy to build web applications where server and clients need to exchange data in real-time. Real-time data exchange is the bedrock of certain time-sensitive apps developers build and maintain. Developers have used the service in a variety of applications and industries, for example, in chat apps, real-time dashboards, multi-player games, online auctions, multi-user collaborative apps, location tracking, notifications, and more.
@@ -71,14 +73,15 @@ There are many different ways to program with Azure Web PubSub service, as some
7173
- **Use provided SDKs to manage the WebSocket connections in self-host app servers** - Azure Web PubSub service provides SDKs in C#, JavaScript, Java and Python to manage the WebSocket connections easily, including broadcast messages to the connections, add connections to some groups, or close the connections, etc.
7274
- **Send messages from server to clients via REST API** - Azure Web PubSub service provides REST API to enable applications to post messages to clients connected, in any REST capable programming languages.
7375

74-
## Quick start
75-
76-
> [!div class="nextstepaction"]
77-
> [Play with chat demo](https://azure.github.io/azure-webpubsub/demos/chat)
7876

77+
## Next steps
78+
### 1. Try a live demo
79+
The quickest way to experience the service is to explore one of our interactive demos. No setup required!
7980
> [!div class="nextstepaction"]
80-
> [Build a chat app](tutorial-build-chat.md)
81+
> [Play with a chat demo app](https://azure.github.io/azure-webpubsub/demos/chat)
8182
82-
## Next steps
83+
### 2. Explore service features in the Azure portal
84+
Next, get hands-on with key features of the service using [LiveTry](./quickstarts-livetry.md). This lets you experiment directly in the Azure portal—no code or local setup needed.
8385

84-
[!INCLUDE [next step](includes/include-next-step.md)]
86+
### 3. Build your own app locally
87+
Ready to see how the service fits into your project? Follow our [quickstart guide](./quickstarts-pubsub-among-clients.md) to spin up a local app and try out the core messaging patterns supported by Azure Web PubSub.
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: Use LiveTry to try out service capabilities
3+
description: How to use LiveTry to explore service capabilities without setting up a code project
4+
author: kevinguo-ed
5+
ms.author: kevinguo
6+
ms.service: azure-web-pubsub
7+
ms.topic: overview
8+
ms.date: 04/22/2025
9+
---
10+
11+
# Use LiveTry to explore Azure Web PubSub capabilities
12+
13+
**LiveTry** is a browser-based tool that helps you explore Azure Web PubSub’s real-time messaging features — no code or local setup required. With just a few clicks, you can simulate clients, join groups, and send messages using both client-side and server-side APIs.
14+
15+
This guide walks you through two common messaging scenarios in LiveTry, while helping you understand important concepts like **connections**, **groups**, and **messages**.
16+
17+
---
18+
19+
## What you'll learn
20+
21+
You'll explore two messaging patterns often used in real-time applications:
22+
23+
- **Server-to-group messaging**: Using the `sendToGroup` API to broadcast messages to all clients in a group.
24+
- **Client-to-group messaging**: Azure Web PubSub supports a capability that allows a client in a group to send messages directly to other clients in the same group—**without routing through your app server** — reducing latency.
25+
26+
Each scenario is accompanied by a short tutorial video to help you follow along.
27+
28+
---
29+
30+
## Key concepts
31+
32+
Before getting started, here’s a quick refresher on core Azure Web PubSub concepts that you’ll interact with in LiveTry:
33+
34+
- **Hub**: A logical unit used to isolate and organize messaging logic. In LiveTry, all simulated clients connect to the hub you define on the **Server** tab. Because LiveTry uses your production resource, we recommend specifying a test hub name that doesn’t overlap with your production traffic.
35+
- **Connection**: A persistent WebSocket connection between a client and the Azure Web PubSub service.
36+
- **Group**: A server-managed subset of connections. Messages sent to a group are delivered only to the connections within that group.
37+
- **Messages**: The payloads exchanged between clients and the service. Messages can be broadcast to all, targeted to groups, or directed to individual connections.
38+
39+
---
40+
41+
## Scenario 1: Send a message to a group from the server
42+
43+
In this scenario, you’ll simulate server-side broadcasting using the `sendToGroup` REST API. This demonstrates how the service routes a message from your backend to all clients in a specified group.
44+
45+
### Watch the video walkthrough
46+
[!!!!MISSING!!!!]
47+
48+
### Steps (recap from video)
49+
1. In the Azure portal, navigate to your Azure Web PubSub resource.
50+
2. Open the **LiveTry** blade.
51+
3. Click **+ Add Client** to simulate multiple connections.
52+
4. Assign each client to a group (for example, `group1`).
53+
5. Under the **Server** tab in the "Publish messages" section, select **Send to group**.
54+
6. Enter the group name (`group1`), a sample message, and invoke the `sendToGroup` API.
55+
7. Switch to the **Client** tab and observe the message appear in each client's message log.
56+
57+
### What you’re learning
58+
You’re simulating a backend sending messages to a group of clients using RESTful APIs. LiveTry demonstrates how server-to-group communication works without needing to deploy a backend. Azure Web PubSub also provides server SDKs for C#, JavaScript, Java, and Python.
59+
60+
Try repeating the steps with multiple clients to visualize message broadcasting in action. LiveTry supports up to 5 concurrent simulated clients.
61+
62+
---
63+
64+
## Scenario 2: Send a message to a group from a client
65+
66+
In this scenario, you’ll simulate a client sending a message to other clients in the same group—similar to a user posting a message in a chat room.
67+
68+
### Watch the video walkthrough
69+
[!!!!MISSING!!!!]
70+
71+
### Steps (recap from video)
72+
1. In **LiveTry**, add two or more clients and specify the same value for the `Initial Groups` field.
73+
2. For the client that will send the message, select **Allow client to send to all groups**.
74+
3. Switch to that client’s panel, specify the group name, enter a message, and click **Invoke**.
75+
4. The other clients in the group will receive the message in real time.
76+
77+
### What you’re learning
78+
This scenario showcases **client-to-group messaging**, which is ideal in applications where server round-trips introduce unnecessary latency. It's a core part of Web PubSub’s **client publish/subscribe model**.
79+
80+
---
81+
82+
## Tips for using LiveTry
83+
84+
- Open multiple browser tabs to simulate multiple users or devices.
85+
- Try combining additional operations like `joinGroup`, `leaveGroup`, or `sendToConnection`.
86+
- Use clear group names to better organize your experiments.
87+
88+
---
89+
90+
## Next steps
91+
92+
- Learn more about [key concepts](./key-concepts.md) in Azure Web PubSub
93+
- Follow the [Quickstart guide](./quickstarts-pubsub-among-clients.md) to build a local sample
94+
- Explore guides under "How-to guides" for common tasks when developing with Azure Web PubSub

articles/azure-web-pubsub/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
- name: Tutorials
2828
expanded: false
2929
items:
30+
- name: Use LiveTry to explore
31+
href: quickstarts-livetry.md
3032
- name: Publish and subscribe messages
3133
href: tutorial-pub-sub-messages.md
3234
- name: Build a chat app

0 commit comments

Comments
 (0)