Skip to content

Commit 82665c5

Browse files
authored
[WebPubSub] Use consistent service description and introduction across all languages (Azure#25144)
* Updating service description and minor fixes * Update README.md * Avoid using client as client is a preserved term * Update README.md * Update README.md
1 parent 6ffbc9e commit 82665c5

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

sdk/webpubsub/azure-messaging-webpubsub/README.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
# Azure Web PubSub service client library for Java
22

3-
Azure Web PubSub service client library for Java allows sending messages to Web PubSub. Azure Web PubSub service
4-
enables you to build real-time messaging web applications using WebSockets and the publish-subscribe pattern. Any
5-
platform supporting WebSocket APIs can connect to the service easily, e.g. web pages, mobile applications, edge devices,
6-
etc. The service manages the WebSocket connections for you and allows up to 100K concurrent connections. It provides
7-
powerful APIs for you to manage these clients and deliver real-time messages.
3+
[Azure Web PubSub service](https://aka.ms/awps/doc) is an Azure-managed service that helps developers easily build web applications with real-time features and publish-subscribe pattern. Any scenario that requires real-time publish-subscribe messaging between server and clients or among clients can use Azure Web PubSub service. Traditional real-time features that often require polling from server or submitting HTTP requests can also use Azure Web PubSub service.
84

9-
Any scenario that requires real-time publish-subscribe messaging between server and clients or among clients, can use
10-
Azure Web PubSub service. Traditional real-time features that often require polling from server or submitting HTTP
11-
requests, can also use Azure Web PubSub service.
5+
You can use this library in your app server side to manage the WebSocket client connections, as shown in below diagram:
126

13-
[Source code][source_code] | [Product Documentation][product_documentation] | [Samples][samples_readme]
7+
![overflow](https://user-images.githubusercontent.com/668244/140014067-25a00959-04dc-47e8-ac25-6957bd0a71ce.png)
8+
9+
Use this library to:
10+
- Send messages to hubs and groups.
11+
- Send messages to particular users and connections.
12+
- Organize users and connections into groups.
13+
- Close connections
14+
- Grant, revoke, and check permissions for an existing connection
15+
16+
Details about the terms used here are described in [Key concepts](#key-concepts) section.
17+
18+
[Source code][source_code] | [API reference documentation][api] | [Product Documentation][product_documentation] | [Samples][samples_readme]
1419

1520
## Getting started
1621

@@ -33,7 +38,7 @@ requests, can also use Azure Web PubSub service.
3338

3439
[//]: # ({x-version-update-end})
3540

36-
### Create a Web PubSub client using connection string
41+
### Create a `WebPubSubServiceClient` using connection string
3742

3843
<!-- embedme ./src/samples/java/com/azure/messaging/webpubsub/ReadmeSamples.java#L21-L24 -->
3944
```java
@@ -43,7 +48,7 @@ WebPubSubServiceClient webPubSubServiceClient = new WebPubSubServiceClientBuilde
4348
.buildClient();
4449
```
4550

46-
### Create a Web PubSub client using access key
51+
### Create a `WebPubSubServiceClient` using access key
4752

4853
<!-- embedme ./src/samples/java/com/azure/messaging/webpubsub/ReadmeSamples.java#L31-L35 -->
4954
```java
@@ -56,30 +61,25 @@ WebPubSubServiceClient webPubSubServiceClient = new WebPubSubServiceClientBuilde
5661

5762
## Key concepts
5863

64+
### Connection
65+
66+
A connection, also known as a client or a client connection, represents an individual WebSocket connection connected to the Web PubSub service. When successfully connected, a unique connection ID is assigned to this connection by the Web PubSub service.
67+
5968
### Hub
6069

61-
Hub is a logic set of connections. All connections to Web PubSub connect to a specific hub. Messages that are broadcast
62-
to the hub are dispatched to all connections to that hub. For example, hub can be used for different applications,
63-
different applications can share one Azure Web PubSub service by using different hub names.
70+
A hub is a logical concept for a set of client connections. Usually you use one hub for one purpose, for example, a chat hub, or a notification hub. When a client connection is created, it connects to a hub, and during its lifetime, it belongs to that hub. Different applications can share one Azure Web PubSub service by using different hub names.
6471

6572
### Group
6673

67-
Group allow broadcast messages to a subset of connections to the hub. You can add and remove users and connections as
68-
needed. A client can join multiple groups, and a group can contain multiple clients.
74+
A group is a subset of connections to the hub. You can add a client connection to a group, or remove the client connection from the group, anytime you want. For example, when a client joins a chat room, or when a client leaves the chat room, this chat room can be considered to be a group. A client can join multiple groups, and a group can contain multiple clients.
6975

7076
### User
7177

72-
Connections to Web PubSub can belong to one user. A user might have multiple connections, for example when a single user
73-
is connected across multiple devices or multiple browser tabs.
74-
75-
### Connection
76-
77-
Connections, represented by a connection id, represent an individual websocket connection to the Web PubSub service.
78-
Connection id is always unique.
78+
Connections to Web PubSub can belong to one user. A user might have multiple connections, for example when a single user is connected across multiple devices or multiple browser tabs.
7979

8080
### Message
8181

82-
A message is either an UTF-8 encoded string or raw binary data.
82+
When the client is connected, it can send messages to the upstream application, or receive messages from the upstream application, through the WebSocket connection.
8383

8484
## Examples
8585

@@ -164,5 +164,6 @@ comments.
164164
[coc]: https://opensource.microsoft.com/codeofconduct/
165165
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
166166
[coc_contact]: mailto:[email protected]
167+
[api]: https://aka.ms/awps/sdk/java
167168

168169
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fwebpubsub%2Fazure-messaging-webpubsub%2FREADME.png)

sdk/webpubsub/azure-messaging-webpubsub/src/samples/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ Getting started explained in detail [here][SDK_README_GETTING_STARTED].
2121
## Examples
2222
The following sections provide several code snippets covering some of the most common configuration service tasks, including:
2323

24-
## Troubleshooting
25-
Troubleshooting steps can be found [here][SDK_README_TROUBLESHOOTING].
2624
- [Broadcasting a message][broadcast_sample]
2725
- [Send a message to a user or connection][direct_sample]
2826
- [Manage groups][manage_group_sample]
2927
- [A simple chat client][simple_chat_client]
28+
- [More advanced samples][advanced_samples]
3029

30+
## Troubleshooting
31+
Troubleshooting steps can be found [here][SDK_README_TROUBLESHOOTING].
3132
## Next steps
3233
See [Next steps][SDK_README_NEXT_STEPS].
3334

@@ -47,5 +48,6 @@ This project welcomes contributions and suggestions. Find [more contributing][SD
4748
[direct_sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/webpubsub/azure-messaging-webpubsub/src/samples/java/com/azure/messaging/webpubsub/DirectMessageSample.java
4849
[manage_group_sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/webpubsub/azure-messaging-webpubsub/src/samples/java/com/azure/messaging/webpubsub/ManagingGroupsSample.java
4950
[simple_chat_sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/webpubsub/azure-messaging-webpubsub/src/samples/java/com/azure/messaging/webpubsub/SimpleChatClient.java
51+
[advanced_samples]: https://github.com/Azure/azure-webpubsub/tree/main/samples/java
5052

5153
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fwebpubsub%2Fazure-messaging-webpubsub%2FREADME.png)

0 commit comments

Comments
 (0)