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

Commit 6b3b82a

Browse files
authored
Merge branch 'master' into install-quic
2 parents b620e34 + 814a0c4 commit 6b3b82a

34 files changed

+386
-87
lines changed

doc/design/pics/.gitkeep

Whitespace-only changes.

doc/design/pics/client_API.png

24.8 KB
Loading

doc/design/pics/publishing_flow.png

13.5 KB
Loading
10.9 KB
Loading

doc/design/pics/server_API.png

24.3 KB
Loading

doc/design/pics/subscribing_flow.png

20.9 KB
Loading

doc/design/quic-programming-guide.md

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
| OWT QUIC Programming Guide |
2+
3+
4+
# Overview
5+
6+
OWT QUIC SDK and Client SDKs provides the APIs for enabling QUIC Transport for reliable data transmission over QUIC protocol with OWT Conference Server.
7+
8+
# Scope
9+
10+
This document describes the programming models and API interfaces for following usage scenarios.
11+
12+
- Deploying a QUIC conference server that is capable of forwarding data over QUIC channel.
13+
- Implementing client application that is capable of sending data to QUIC server or receiving data from it.
14+
15+
Description of the details of QUIC transport is outside the scope of this document.
16+
17+
# Related Repos
18+
19+
Below are the repo locations of current SDK and server implementations:
20+
21+
- OWT QUIC C++ SDK: [https://github.com/open-webrtc-toolkit/owt-deps-quic](https://github.com/open-webrtc-toolkit/owt-sdk-quic) This is the C++ implementation of Server-side and Client-side SDK, and is the base of enabling QUIC agent on server, and QUIC conference SDK on client.
22+
- OWT Conference server: [https://github.com/open-webrtc-toolkit/owt-server](https://github.com/open-webrtc-toolkit/owt-server/pull/113). This is the server repo that supports forwarding of QUIC streams.
23+
- OWT JavaScript SDK: [https://github.com/open-webrtc-toolkit/owt-client-javascript](https://github.com/open-webrtc-toolkit/owt-client-javascript) This is the repo for enabling QUIC client on browser.
24+
- OWT Native SDK: [https://github.com/open-webrtc-toolkit/owt-client-native](https://github.com/open-webrtc-toolkit/owt-client-native) This is the client SDK repo for enabling QUIC support using OWT conferencing API.
25+
26+
# Architecture
27+
28+
The topology of components is shown in below diagram:
29+
30+
![plot](./pics/quic_block_diagram.png)
31+
32+
There are a few components involved and their relationships with streaming using QuicTransport are described as below:
33+
34+
## OWT QUIC C++ SDK
35+
36+
This is the foundation of QUIC implementation in OWT. It provides the APIs to create QUIC transport clients and server forming a C/S architecture. Basically you can directly build your QUICTransport applications using the QUIC C++ SDK client API if you're not using the OWT native SDK.
37+
38+
## OWT Native SDK for Conference
39+
40+
The OWT conference SDK built upon OWT QUIC C++ SDK client API. It is used in combination with OWT QUIC conference server when you rely on OWT signaling protocol for QUIC connection setup as well as stream forwarding.
41+
42+
## OWT QUIC Conference Server
43+
44+
The OWT QUIC conference server implements the signaling protocol for QUIC connection setup, as well as QUIC stream forwarding.
45+
46+
## OWT QUIC JavaScript SDK
47+
48+
Used together with OWT QUIC conference server, to build Web-based QUIC applications. Useful when the QUIC streaming application is implemented using Web API.
49+
50+
# How to build OWT QUIC C++ SDK
51+
52+
Please follow [OWT QUIC C++ SDK build instruction](https://github.com/open-webrtc-toolkit/owt-deps-quic/blob/master/quic_transport/docs/build_instructions.md) to build the SDK.
53+
54+
# OWT QUIC C++ SDK API
55+
56+
In this section we provide a detailed description of the APIs provided by OWT QUIC SDK.
57+
58+
## OWT QUIC SDK Server API Calling Flow
59+
60+
The server API calling flow is shown in below diagram and table.
61+
62+
![plot](./pics/server_API.png)
63+
64+
| Step # | API calling flow |
65+
| --- | --- |
66+
| 1 | Application calls the factory method of QuicTransportFactory::Create() to get an instance of QuicTransportFactory |
67+
| 2 | Application calls QuicTransportFactory::CreateQuicTransportServer() on the QuicTransportFactory instance got in step #1, specifying the server port, certificate path either in the form of .pkcs12 or .pfx format. |
68+
| 3 | Application Creates the Visitor instance of QuicTransportServerInterface |
69+
| 4 | Application calls SetVisitor on the QuicTransportServerInterface instance got in step #2. |
70+
| 5 | Application calls Start() method on the QuicTransportServerInterface instance got in step #2 |
71+
| 6 | OnSession() callback will be invoked once the quictransportserver gets a connection request from client, and an QuicTransportSession instance is passed from the callback. |
72+
| 7 | Application calls CreateBidirectionalStream on the QuicTransportSession got in step 6 and get a QuicTransportStreamInterface instance. |
73+
| 8 | Application creates QuicTransportStream::Visitor instance and invokes QuicTransportStreamInterface::SetVisitor(). |
74+
| 9 | Application reads the QuicTransportStream when OnCanRead is invoked on the QuicTransportStream::Visitor; or write to the QuicTransportStream when OnCanWrite is invoked on the QuicTransportStreamVisitor; |
75+
76+
## OWT QUIC C++ SDK Client API Calling Flow
77+
78+
The client API calling flow is shown in below diagram and table. It's similar as the server side calling flow except the QuicTransportFactory creates a QuicTransportClientInterface, instead of a QUICTransportServerInterface, and client needs to call Connect() instead of Start() to get a QuicTransportSession.
79+
80+
![plot](./pics/client_API.png)
81+
82+
| Step # | API calling flow |
83+
| --- | --- |
84+
| 1 | Application calls the factory method of QuicTransportFactory::Create() to get an instance of QuicTransportFactory |
85+
| 2 | Application calls QuicTransportFactory::CreateQuicTransportClient() on the QuicTransportFactory instance got in step #1, specifying the server URL to connect to. |
86+
| 3 | Application Creates the Visitor instance of QuicTransportClientInterface |
87+
| 4 | Application calls SetVisitor on the QuicTransportClientInterface instance got in step #2. |
88+
| 5 | Application calls Connect() method on the QuicTransportClientInterface instance got in step #2, passing the URL of the server. |
89+
| 6 | OnSession() callback will be invoked once the quictransportclient successfully connects to server, and an QuicTransportSession instance is passed from the callback. |
90+
| 7 | Application calls CreateBidirectionalStream on the QuicTransportSession got in step 6 and get a QuicTransportStreamInterface instance. |
91+
| 8 | Application creates QuicTransportStream::Visitor instance and invokes QuicTransportStreamInterface::SetVisitor(). |
92+
| 9 | Application reads the QuicTransportStream when OnCanRead is invoked on the QuicTransportStream::Visitor; or write to the QuicTransportStream when OnCanWrite is invoked on the QuicTransportStreamVisitor; |
93+
94+
## Details of Callbacks and Data Structures of QUIC C++ SDK
95+
96+
Please refer to [QUIC C++ SDK APIs](https://github.com/open-webrtc-toolkit/owt-deps-quic/tree/master/quic_transport/api/owt/quic) for the detailed API list and document.
97+
98+
## Samples of QUIC C++ SDK
99+
100+
Please refer to [QUIC C++ SDK sample](https://github.com/open-webrtc-toolkit/owt-deps-quic/blob/master/quic_transport/impl/tests/quic_transport_owt_end_to_end_test.cc) on how to use the server and client APIs.
101+
102+
# OWT Native Conference SDK
103+
104+
Please refer to latest [Native SDK build instructions](https://github.com/open-webrtc-toolkit/owt-client-native/blob/master/README.md) to build OWT natvie conference SDK for both Windows and Linux.
105+
106+
# OWT Native Conferene SDK API
107+
108+
OWT conference SDK provides a series of API for wrapping the underlying QUIC SDK to communicate with the OWT conference server.
109+
110+
Typical calling flow for publishing QUIC stream:
111+
112+
![plot](./pics/publishing_flow.png)
113+
114+
Typical calling flow for Subscribing QUIC stream:
115+
116+
![plot](./pics/subscribing_flow.png)
117+
118+
Please see the conference sample application for more detailed usage.
119+
120+
# OWT QUIC Conference Server
121+
122+
Please follow [Conference Server build instructions](https://github.com/open-webrtc-toolkit/owt-server/blob/master/README.md) on how to build and deploy the conference server.
123+
124+
## How to use Pre-built Conference Server Binary
125+
126+
Steps to run Conference Server with pre-built binary:
127+
128+
1. Go to the untarred conference server dir, and run `./bin/init-all.sh --deps`; this would try to install mongodb and rabbitmq-server. Don't set any password for rabbitmq or mongodb.
129+
2. Still in the same dir, run `bin/init-all.sh`.
130+
3. Update quic_agent/agent.toml, set `hostname` to the hostname quic agent is running on.
131+
4. run `bin/start-all.sh`.
132+
5. Open [https://localhost:3004/quic.html](https://localhost:3004/quic.html) on the same host with Chrome browser to visit the web sample page. Due to the test certificate, you may need confirm this unsafe access.
133+
6. Press 'Start Sending' button to start transferring data to conference server. Press 'Stop Sending' button on the web page to stop sending.. If there's no error in the console, that implies server is correctly setup.
134+
135+
# OWT QUIC Windows Sample
136+
137+
The Windows sample will be provided in OWT repo separately. More details will be provided later.
138+
139+
# How to Replace the Certificate for QUIC
140+
141+
OWT Conference Server is using a self-signed certificate during development phase, which would be only valid for 14 days. You can use a CA-signed certificate to avoid refreshing the certificate periodically. QUIC connection will fail if certificate is not valid or expires.
142+
143+
## Precondition
144+
145+
- Make sure you are running the tool under Linux and,
146+
- Openssl tool is correctly setup in your system.
147+
- Download the tool under chromium/src/net/tools/quic/certs/ from chromium project to local dir named `tool`. This contains three files: `ca.cnf`, `generate-certs.sh` and `leaf.cnf`.
148+
149+
## Certificate Generation
150+
151+
- Modify leaf.cnf, adding an entry into `other_hosts` section.
152+
- Make sure generate-certs.sh is exectuable. If not, run `chmod +x generate-certs.sh`;
153+
- Remove the `out` dir in case it exists.
154+
- Under the downloaded tool dir, run `./generate-certs.sh`. It is expected to generate a series of files under out dir.
155+
- Under the downloaded tool dir, run `openssl pkcs12 -inkey out/leaf_certs.key -in out/leaf_cert.pem -export -out out/certificate.pfx`. This will prompt for password for the pfx. Make sure you always use `abc123` as the password.
156+
- Under the downloaded tool dir, run `openssl x509 -noout -fingerprint -sha256 -inform pem -in out/leaf_cert.pem`. You will get the fingerprint string in the form of "XX:XX:XX....XX:XX".
157+
158+
## Use the Certificate
159+
160+
- Copy the generated certificate.pfx under `out` dir to `quic_agent/cert/` dir to replace the one there.
161+
- Restart Conference Server QUIC agent to apply the change. If you're using JS sample for QUIC, make sure you also update JS sample with the new fingerprint.
162+
- In your native client sample, make sure you include the fingerprint of new cert in the `ConferenceClientConfiguration.trusted_quic_certificate_fingerprints` you passed to `ConferenceClient` ctor. See more details in the conference sample.
163+

doc/doxygen_cfrc.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#---------------------------------------------------------------------------
66
DOXYFILE_ENCODING = UTF-8
77
PROJECT_NAME = "Intel® Collaboration Suite for WebRTC"
8-
PROJECT_NUMBER = version 4.3
8+
PROJECT_NUMBER = version 5.0
99
PROJECT_BRIEF = "Open WebRTC Toolkit(OWT) Server User Guide"
1010
PROJECT_LOGO = doxygen/intel_logo.png
1111
OUTPUT_DIRECTORY = .

doc/doxygen_cp.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#---------------------------------------------------------------------------
66
DOXYFILE_ENCODING = UTF-8
77
PROJECT_NAME = "Intel® Collaboration Suite for WebRTC"
8-
PROJECT_NUMBER = version 4.3
8+
PROJECT_NUMBER = version 5.0
99
PROJECT_BRIEF = "Open WebRTC Toolkit(OWT) Client-Portal Protocol"
1010
PROJECT_LOGO = doxygen/intel_logo.png
1111
OUTPUT_DIRECTORY = .

doc/doxygen_rest.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#---------------------------------------------------------------------------
66
DOXYFILE_ENCODING = UTF-8
77
PROJECT_NAME = "Intel® Collaboration Suite for WebRTC"
8-
PROJECT_NUMBER = version 4.3
8+
PROJECT_NUMBER = version 5.0
99
PROJECT_BRIEF = "Open WebRTC Toolkit(OWT) Server Management REST API Guide"
1010
PROJECT_LOGO = doxygen/intel_logo.png
1111
OUTPUT_DIRECTORY = .

0 commit comments

Comments
 (0)