Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit c8b10de

Browse files
committed
Update cascading doc format
1 parent 6f57600 commit c8b10de

File tree

1 file changed

+55
-12
lines changed

1 file changed

+55
-12
lines changed

doc/design/quic-cascading.md

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ With this deployment, Rabbitmq will be in the cloud and other region-based modul
1111
With this deployment, each region will deploy a separate OWT cluster. It’s easier for large deployment and the internal OWT cluster will work independently when region network disconnects with cloud. Here is a comparison for these 2 deployments:
1212
![comparison](./pics/cascading/comparison.png)
1313

14-
We will concentrate on OWT cascading design here.
14+
We will focus on OWT cascading design here.
1515

1616
## Cloud Management service
1717

@@ -20,8 +20,12 @@ Cloud management service is deployed in a cloud for central management, it shoul
2020
- Accept client request and assign OWT cluster to client
2121
- Record conference info and trigger OWT cluster cascading
2222
- Maintain OWT cluster info and conference info
23-
1 OWT cluster register
23+
24+
### OWT cluster register
25+
2426
OWT will register cluster info to cloud management service when the cluster is launched. This cluster registration work will be done in clusterManager. clusterManager will send the register requests to cloud after it gets service key/id info from management_api
27+
28+
```
2529
object(clusterInfo) {
2630
id: string, // name of the OWT cluster
2731
region: string, // region of the OWT cluster
@@ -32,36 +36,62 @@ OWT will register cluster info to cloud management service when the cluster is l
3236
mediabridgeip: string, // OWT media bridge listener ip
3337
mediabridgeport: string //OWT media bridge listener port
3438
}
39+
```
40+
3541
OWT cluster manager will update capacity info to cloud if a new purpose agent joins the cluster or no such purpose agent lives in the cluster.
42+
43+
```
3644
Object (capacityinfo) {
3745
action: string, //actions: add, delete
3846
module: string //OWT modules: webrtc, streaming, video, audio…
3947
}
48+
```
49+
4050
OWT cluster manager will report room token to cloud for event/media bridge QUIC server to validate QUIC client connection. The token will be generated when room is initialized.
51+
52+
```
4153
object (tokeninfo) {
4254
room: string // conference room id
4355
token: string // conference room token
4456
}
45-
2 Handle client request
57+
```
58+
59+
### Handle client request
60+
4661
Client will send a join conference request to cloud management service:
4762
Request body:
48-
type content
49-
json conferenceInfo
63+
64+
type | content
65+
-------------|-----
66+
json | conferenceInfo
67+
68+
```
5069
object(conferenceInfo) {
5170
id: conferenceId,
5271
type: conferenceType
5372
}
73+
```
74+
5475
Response body:
55-
type content
56-
json clusterInfo
76+
77+
type | content
78+
-------------|-----
79+
json | clusterInfo
80+
81+
```
5782
object(clusterInfo) {
5883
ip: ip, //OWT cluster web server ip
5984
port: port, //OWT cluster web server port
6085
room: roomId //OWT cluster room id
6186
}
62-
3 Create room request
87+
```
88+
89+
### Create room request
90+
6391
Cloud management service will check saved conference info list to see if room has been created for this conference id in the owt cluster, if not, cloud management service will send create room request to owt cluster with room configuration according to client conference type, owt cluster will response with created room info.
6492
Users can define several conference templates which includes different room configurations, such as publication limit, SFU only. etc, so client can join specific kinds of room by specifying conference type. If no conference type is specified, then client will be assigned with the default room configuration template.
93+
94+
```
6595
object(conference) {
6696
id: conferenceId,
6797
cluster: [object(cluster)]
@@ -70,7 +100,10 @@ Users can define several conference templates which includes different room conf
70100
id: clusterId,
71101
room: roomId
72102
}
73-
4 Trigger OWT cascading
103+
```
104+
105+
### Trigger OWT cascading
106+
74107
Here is the workflow for OWT cascading trigger:
75108
![trigger flow](./pics/cascading/triggerflow.png)
76109
In step 3, cloud management service will send a create room request with room configuration to ensure that different rooms in different OWT clusters serving for one conference will share the same room configuration. When getting a new client joining conference request and assigning owt cluster to client, cloud management service will trigger cascading if there are other OWT clusters in the same conferencing after getting the new client successfully joined room message from the assigned OWT cluster.
@@ -90,11 +123,13 @@ Request body:
90123
---------|------
91124
json|cascading
92125

126+
```
93127
object(cascading) {
94128
connectip: ip, //quic server ip address of owt cluster to connect
95129
connectport: port, // quic server port of owt cluster to connect
96130
room: roomId, // room id of owt cluster to connect
97131
}
132+
```
98133

99134
![multi clusters](./pics/cascading/multicontrol.png)
100135

@@ -103,9 +138,12 @@ json|cascading
103138
### Overall process
104139

105140
![event bridge process](./pics/cascading/eventbridgequic.png)
141+
106142
For event cascading, each cluster will setup a quic session with another OWT, that means one quic session will represent one cascading connection between 2 OWT clusters. All the events in cluster rooms will be sent to another cluster through this quic session. Each conference in cascaded cluster will associate with a quic stream.
107143
Event bridge signaling process is listed:
108-
![event bridge flow](./pics/cascading/eventbridgeflow.png)
144+
145+
![event bridge flow](./pics/cascading/eventbridgeflow.png)
146+
109147
For event bridge, the earlier joined cluster event bridge will work as quic server, and the later joined cluster event bridge will work as quic client and connect to previous joined cluster event bridge. Inside the OWT cluster, room id will be associated with related quic stream id, so every time when new data comes from quic stream, event bridge will check associated room id with this quic stream id and forward coming cascaded event data to specific conference node. Then the event cascading process between clusters will work properly.
110148

111149
### Forwarded events
@@ -123,17 +161,22 @@ remove|Remove stream event|removeStream
123161
update|Stream mute/unmute status update|setStreamMute
124162
initialize|Initialize stream and participant info to cascaded owt cluster|sonNewClusterCascaded
125163

126-
If owt cluster 2 successfully establishes QUIC connection with owt cluster 1, owt cluster 1 will send “initialize” event including all the room objects to owt cluster 2, then in owt cluster 2 event bridge, bridge will parse the message and simulate participant streams actions to owt cluster 2 conference node.
127-
Streams:
164+
If owt cluster 2 successfully establishes QUIC connection with owt cluster 1, owt cluster 1 will send “initialize” event including all the room objects to owt cluster 2, then in owt cluster 2 event bridge, bridge will parse the message and simulate participant streams actions to owt cluster 2 conference node.
165+
166+
### QUIC streams:
167+
128168
QUIC client will create a bidirectional stream after successfully establishing QUIC connection with QUIC server. QUIC client will associate the created stream id with conference rpcId where startCascading event is from. QUIC client will then send the remote room info to server, server will bind the stream id with roomid retrieved from stream data.
129169
When a conference node in the cluster exits, event bridge will check the QUIC stream associated with it and terminate the stream.
130170

131171
## Media bridge
132172

133173
Overall process:
174+
134175
![media bridge process](./pics/cascading/mediabridgequic.png)
176+
135177
Media bridge will be used to transfer media streams between 2 OWT clusters. One QUIC connection will be established for each room in the cluster, and each OWT forward stream will be send through QUIC stream. For WebRTC stream, audio and video track of the same OWT forward stream will be sent out separately in different QUIC stream.
136178
Each media bridge node will be launched as QUIC server listening at the configured port. If the bridge gets a startCascading request, it will work as QUIC client and proactively establish QUIC connection with the QUIC server in another OWT cluster. A QUIC stream for signaling purpose will be created to exchange cluster info and make sure QUIC connection is ready to work for both sides. Here is a workflow for the initial QUIC connection establish process:
179+
137180
![media bridge flow](./pics/cascading/mediabridgeflow.png)
138181

139182
## Build OWT server with cascading bridges

0 commit comments

Comments
 (0)