You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[WebPubSub] Update readme to use consistent service description and introduction across all languages (Azure#25080)
* update readme to be consistent with service introduction
* Avoid using client as it is a preserved term
* Add a diagram to illustrate the architecture
* Add WebPubSub README to exclude list
'Client' has a special meaning to the service, so we don't want to use the section header 'Authenticate the client'
* Update sdk/webpubsub/Azure.Messaging.WebPubSub/README.md
Co-authored-by: Mohit Chakraborty <[email protected]>
* Update sdk/webpubsub/Azure.Messaging.WebPubSub/README.md
Co-authored-by: Mohit Chakraborty <[email protected]>
Co-authored-by: Mohit Chakraborty <[email protected]>
Co-authored-by: Mohit Chakraborty <[email protected]>
Copy file name to clipboardExpand all lines: sdk/webpubsub/Azure.Messaging.WebPubSub/README.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,20 @@
1
1
# Azure Web PubSub service client library for .NET
2
2
3
-
[Azure Web PubSub Service](https://aka.ms/awps/doc) is a service that enables you to build real-time messaging web applications using WebSockets and the publish-subscribe pattern. Any platform supporting WebSocket APIs can connect to the service easily, e.g. web pages, mobile applications, edge devices, etc. The service manages the WebSocket connections for you and allows up to 100K **concurrent** connections. It provides 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.
4
4
5
-
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.
5
+
You can use this library in your app server side to manage the WebSocket client connections, as shown in below diagram:
6
6
7
-
This library can be used to do the following actions. Details about the terms used here are described in [Key concepts](#key-concepts) section.
### Create and authenticate a `WebPubSubServiceClient`
37
40
38
-
In order to interact with the service, you'll need to create an instance of the WebPubSubServiceClient class. To make this possible, you'll need the connection string or a key, which you can access in the Azure portal.
39
-
40
-
### Create a `WebPubSubServiceClient`
41
+
In order to interact with the service, you'll need to create an instance of the `WebPubSubServiceClient` class. To make this possible, you'll need the connection string or a key, which you can access in the Azure portal.
@@ -47,23 +48,23 @@ var serviceClient = new WebPubSubServiceClient(new Uri(endpoint), "some_hub", ne
47
48
48
49
### Connection
49
50
50
-
Connections, represented by a connection id, represent an individual websocket connection to the Web PubSub service. Connection id is always unique.
51
+
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.
51
52
52
53
### Hub
53
54
54
-
Hub is a logical concept for a set of connections. Connections are always connected to a specific hub. Messages that are broadcast to the hub are dispatched to all connections to that hub. Hub can be used for different applications, different applications can share one Azure Web PubSub service by using different hub names.
55
+
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.
55
56
56
57
### Group
57
58
58
-
Group allow broadcast messages to a subset of connections to the hub. You can add and remove users and connections as needed. A client can join multiple groups, and a group can contain multiple clients.
59
+
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.
59
60
60
61
### User
61
62
62
63
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.
63
64
64
65
### Message
65
66
66
-
Using this library, you can send messages to the client connections. A message can either be string text, JSON or binary payload.
67
+
When a client is connected, it can send messages to the upstream application, or receive messages from the upstream application, through the WebSocket connection.
67
68
68
69
## Examples
69
70
@@ -107,7 +108,9 @@ You can also easily [enable console logging](https://github.com/Azure/azure-sdk-
107
108
108
109
Please take a look at the
109
110
[samples][samples_ref]
110
-
directory for detailed examples on how to use this library.
111
+
directory for detailed examples on how to use this library.
112
+
113
+
You can also find [more samples here][awps_sample].
111
114
112
115
## Contributing
113
116
@@ -126,3 +129,4 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
0 commit comments