Skip to content

Commit f06aabe

Browse files
committed
Fix scores
1 parent 2e21ce4 commit f06aabe

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

articles/azure-web-pubsub/quickstarts-event-notifications-from-clients.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ author: vicancy
55
ms.author: lianwei
66
ms.service: azure-web-pubsub
77
ms.topic: quickstart
8-
ms.date: 03/13/2023
8+
ms.date: 04/12/2023
99
---
1010

1111
# Event notifications from clients
1212

1313
## Intro
1414

1515
In the first three articles of "quickstarts", we learned two useful communication patterns using Web PubSub for real-time messaging at scale ***(million+)***.
16-
- **Pub/Sub** among clients which frees your application server from the complexity of managing persistent connections
16+
- **Pub/Sub** among clients that free your application server from the complexity of managing persistent connections
1717
- **Push messages** to clients from your application server as soon as new data is available
1818

19-
In this quickstart guide, we will learn about the event system of Web PubSub so that your application server can react to events like when
19+
In this quickstart guide, we learn about the event system of Web PubSub so that your application server can react to events like when
2020
> [!div class="checklist"]
2121
> * a client is `connected`
2222
> * a client sends a `message`, which requires further processing
@@ -34,7 +34,7 @@ In this quickstart guide, we will learn about the event system of Web PubSub so
3434
---
3535

3636
## Create the application
37-
Web PubSub is a standalone service to your application server. While your application retains its role as a traditional HTTP server, Web PubSub takes care of the real-time message passing between your application server and the clients. We will first create the client program and then the server program.
37+
Web PubSub is a standalone service to your application server. While your application retains its role as a traditional HTTP server, Web PubSub takes care of the real-time message passing between your application server and the clients. We first create the client program and then the server program.
3838

3939
### Create the client
4040
# [JavaScript](#tab/javascript)
@@ -126,12 +126,12 @@ app.use(handler.getMiddleware());
126126
app.listen(8080, () => console.log('Server started, listening on port 8080'));
127127
```
128128

129-
As configured in the code above, when a client connects with your Web PubSub resource, Web PubSub invokes the Webhook served by your application server at the path `/eventhandler`. Here, we simply print out the `userId` to the console when a user is connected.
129+
As configured in the code above, when a client connects with your Web PubSub resource, Web PubSub invokes the Webhook served by your application server at the path `/eventhandler`. Here, we simply print the `userId` to the console when a user is connected.
130130

131131
---
132132

133133
## Expose localhost
134-
If your run the program on your computer, it is running on `localhost` at port `8080`. For our purposes, it means your local express app cannot be reached on the internet. Consequently, Web PubSub can not invoke the Webhook served at the path `/eventhandler`.
134+
If your run the program on your computer, it's running on `localhost` at port `8080`. For our purposes, it means your local express app can't be reached on the internet. So, Web PubSub can't invoke the Webhook served at the path `/eventhandler`.
135135

136136
What we need is to expose localhost to be accessible on the internet. There are several tools available for this.
137137
> [!div class="checklist"]
@@ -148,18 +148,18 @@ You can download ngrok from https://ngrok.com/download
148148
ngrok http 8080
149149
```
150150
#### 3. Make note of the generated URL
151-
"ngrok" will output a URL like this `https://<domain-name>.ngrok.io`. Now your port `8080` is accessible on the internet.
151+
"ngrok" outputs a URL like this `https://<domain-name>.ngrok.io`. Now your port `8080` is accessible on the internet.
152152

153153
---
154154

155155
## Set event handler on your Web PubSub resource
156-
Now, we need to let your Web PubSub resource know about this Webhook URL. You can set the event handlers either from Azure Portal or Azure CLI.
156+
Now, we need to let your Web PubSub resource know about this Webhook URL. You can set the event handlers either from Azure portal or Azure CLI.
157157

158158
# [Azure portal](#tab/portal)
159-
1. Select **"Settings"** from the menu and click **"Add"**
159+
1. Select **"Settings"** from the menu and select **"Add"**
160160
:::image type="content" source="media/howto-develop-eventhandler/configure-event-handler_menu.png" alt-text="Screenshot of Azure Web PubSub Configure Event Handler - menu":::
161161

162-
1. Enter a hub name. For our purposes, enter "**myHub1**" and click "**Add**"
162+
1. Enter a hub name. For our purposes, enter "**myHub1**" and select "**Add**"
163163

164164
1. In the event handler page, configure the following fields
165165
:::image type="content" source="media/howto-develop-eventhandler/configure-event-handler_details.png" alt-text="Screenshot of Azure Web PubSub Configure Event Handler - details":::
@@ -238,7 +238,7 @@ let handler = new WebPubSubEventHandler(HUB_NAME, {
238238
You should see both the `userId` and the `Received message: sending custom event!` printed to the console.
239239

240240
## Summary
241-
This tutorial provides you with a basic idea of how the event system works in Web PubSub. In real-world applications, the event system can help you implement additional logic to process system and user generated events.
241+
This tutorial provides you with a basic idea of how the event system works in Web PubSub. In real-world applications, the event system can help you implement more logic to process system and user generated events.
242242

243243
## Next steps
244244
> [!div class="nextstepaction"]

articles/azure-web-pubsub/quickstarts-pubsub-among-clients.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: PubSub among clients
3-
description: A quickstarts guide that shows to how to subsribe to messages in a group and send messages to a group without the involvement of a typical application server
3+
description: A quickstarts guide that shows to how to subscribe to messages in a group and send messages to a group without the involvement of a typical application server
44
author: kevinguo-ed
55
ms.author: kevinguo
66
ms.service: azure-web-pubsub
77
ms.topic: quickstart
8-
ms.date: 03/13/2023
8+
ms.date: 04/12/2023
99
ms.custom: mode-api, devx-track-azurecli
1010
ms.devlang: azurecli
1111
---
@@ -136,7 +136,7 @@ await client.JoinGroupAsync("group1");
136136
---
137137

138138
## Publish a message to a group
139-
In the previous step, we've set up everything needed to receive messages from `group1`, now we will send messages to that group.
139+
In the previous step, we've set up everything needed to receive messages from `group1`, now we send messages to that group.
140140

141141
# [JavaScript](#tab/javascript)
142142

@@ -164,6 +164,6 @@ By using the client SDK, you now know how to
164164
> * **subscribe** to group messages
165165
> * **publish** messages to groups
166166
167-
Next, you will learn how to **push messages in real-time** from an application server to your clients.
167+
Next, you learn how to **push messages in real-time** from an application server to your clients.
168168
> [!div class="nextstepaction"]
169169
> [Push message from application server](quickstarts-push-messages-from-server.md)

articles/azure-web-pubsub/quickstarts-push-messages-from-server.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: vicancy
55
ms.author: lianwei
66
ms.service: azure-web-pubsub
77
ms.topic: quickstart
8-
ms.date: 03/14/2023
8+
ms.date: 04/12/2023
99
---
1010

1111
# Push messages from server
@@ -68,7 +68,7 @@ This URL follows a pattern of `wss://<service_name>.webpubsub.azure.com/client/h
6868

6969
![The diagram shows how to get client access url.](./media/quickstart-live-demo/push_messages_from_server.png)
7070

71-
As shown in the diagram above, the client will join the hub named `myHub1`.
71+
As shown in the diagram above, the client joins the hub named `myHub1`.
7272

7373
In the `subscriber` project folder, create a file named `subscribe.js` with the following code
7474

@@ -93,7 +93,7 @@ await client.start();
9393
```bash
9494
node subscribe.js
9595
```
96-
Now this client establishes a connection with your Web PubSub resource and and is ready to receive messages pushed from your application server.
96+
Now this client establishes a connection with your Web PubSub resource and is ready to receive messages pushed from your application server.
9797
9898
9999
# [C#](#tab/csharp)
@@ -132,7 +132,7 @@ await client.StartAsync();
132132
```bash
133133
dotnet run "myHub1"
134134
```
135-
Now this client establishes a connection with your Web PubSub resource and and is ready to receive messages pushed from your application server.
135+
Now this client establishes a connection with your Web PubSub resource and is ready to receive messages pushed from your application server.
136136
137137
# [Python](#tab/python)
138138
@@ -346,13 +346,13 @@ let server = new WebPubSubServiceClient(process.env.WebPubSubConnectionString, h
346346
server.sendToAll(process.argv[2], { contentType: "text/plain" });
347347
```
348348
349-
Note that the `server.sendToAll()` call sends a message to all connected clients in a hub.
349+
The `server.sendToAll()` call sends a message to all connected clients in a hub.
350350
351351
#### Get the connection string
352352
> [!Important]
353353
> A connection string includes authorization information required for your application to access Web PubSub service. The access key inside the connection string is similar to a root password for your service.
354354
355-
For this quickstart guide, we will get it from Azure portal as shown below.
355+
For this quickstart guide, we'll get it from Azure portal as shown below.
356356
![A diagram shows how to get client access url.](./media/quickstart-live-demo/get_connection_string.png)
357357
358358
#### Run the server program
@@ -369,12 +369,12 @@ node publish.js "Hello World"
369369
370370
:::image type="content" source="media/quickstart-live-demo/push_messages_from_server.gif" alt-text="GIF of demonstrating an app server pushing data to connected client":::
371371
372-
Try running the same "subscribe" program in multiple command shells to simluate more than clients. As soon as the "publish" program is run, you should see messages being delivered in real-time to all these clients.
372+
Try running the same "subscribe" program in multiple command shells to stimulate more than clients. As soon as the "publish" program is run, you should see messages being delivered in real-time to all these clients.
373373
374374
375375
# [C#](#tab/csharp)
376376
377-
#### Ceate a project directory named `publisher` and install required dependencies:
377+
#### Create a project directory named `publisher` and install required dependencies:
378378
379379
```bash
380380
mkdir publisher
@@ -548,17 +548,17 @@ Message received: Hello World
548548
---
549549
550550
## Summary
551-
This quickstart demonstrates how easy it is to push messages from an application server to all connected clients in a hub. Additionally, Web PubSub allows you to push messages to
551+
This quickstart demonstrates how easy it's to push messages from an application server to all connected clients in a hub. Additionally, Web PubSub allows you to push messages to
552552
553553
> [!div class="checklist"]
554554
> * a subset of the clients in a **hub**
555555
> * a particular group in a **hub**
556556
> * a subset of clients in a **group**
557557
558-
These APIs enable a wealth of use cases, allowing developers to focus on unique business logic while be assured that Web PubSub offers **low latency (<100ms)**, **high availability** and **massive scale (million+ simultanenous connections)**.
558+
These APIs enable a wealth of use cases, allowing developers to focus on unique business logic while be assured that Web PubSub offers **low latency (<100ms)**, **high availability** and **massive scale (million+ simultaneous connections)**.
559559
560560
## Next steps
561-
In the next step, we will explore how to work with the event system of Web PubSub, necessary to build complete web applications.
561+
In the next step, we'll explore how to work with the event system of Web PubSub, necessary to build complete web applications.
562562
563563
> [!div class="nextstepaction"]
564564
> [Event notifications from clients](./quickstarts-event-notifications-from-clients.md)

0 commit comments

Comments
 (0)