Skip to content

Commit

Permalink
migrating wiki to docs, so it's easier to contribute
Browse files Browse the repository at this point in the history
  • Loading branch information
leewardbound authored and tarrencev committed Jul 8, 2020
1 parent c189371 commit bfeee5a
Show file tree
Hide file tree
Showing 11 changed files with 340 additions and 13 deletions.
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| <a href="https://github.com/pion/ion"><img src="docs/imgs/go.png" height = 12% width = 10%> </a>[**ION-BIZ**](https://github.com/pion/ion) | *Business signal server* |
| <a href="https://github.com/pion/ion"><img src="docs/imgs/go.png" height = 12% width = 10%> </a>[**ION-ISLB**](https://github.com/pion/ion) | *Intelligent-Server-Load-Balancing server* |
| <a href="https://github.com/pion/ion"> <img src="docs/imgs/go.png" height = 12% width = 10%> </a>[**ION-SFU**](https://github.com/pion/ion) | *Selective-Forwarding-Unit server* |
| <a href="https://github.com/pion/ion-sfu"> <img src="docs/imgs/go.png" height = 12% width = 10%> </a>[**ION-SFU**](https://github.com/pion/ion-sfu) | *Selective-Forwarding-Unit server* |
| <a href="https://github.com/pion/ion-sdk-js"> <img src="docs/imgs/ts.png" height = 12% width = 10%> </a> [**ION-SDK-JS**](https://github.com/pion/ion-sdk-js) | *Ion js sdk written by typescript* |
| <a href="https://github.com/pion/ion-sdk-flutter"> <img src="docs/imgs/flutter.png" height = 12% width = 10%> </a> [**ION-SDK-FLUTTER**](https://github.com/pion/ion-sdk-flutter) | *Ion flutter sdk powered by [flutter-webrtc](https://github.com/cloudwebrtc/flutter-webrtc)* |
| <a href="https://github.com/pion/ion-app-web"> <img src="docs/imgs/chrome.png" height = 12% width = 10%> </a> [**ION-APP-WEB**](https://github.com/pion/ion-app-web) | *Ion web app* |
Expand All @@ -35,19 +35,34 @@ This project uses docker

https://docs.docker.com/get-docker/

### Setup
### Run

#### 1. Run

```
git clone https://github.com/pion/ion
docker network create ionnet
```
### Run
```
docker-compose -f docker-compose.stable.yml up
cd ion
docker-compose up
```

#### 3. Expose Ports

Ensure the ports `5000-5200/udp` are exposed or forwarded for the SFU service


#### 4. UI (optional)

Head over to [Ion Web App](https://github.com/pion/ion-app-web) to bring up the front end.

The web app repo also contains examples of exposing the ion biz websocket via reverse proxy with automatic SSL.

For dev and more options see the wiki

* [Development](https://github.com/pion/ion/wiki/DockerDev)
* [Development](https://github.com/pion/ion/tree/master/docs)


## Roadmap
Expand Down
6 changes: 0 additions & 6 deletions configs/docker/sfu.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ dc = "dc1"
# internet ip
addr = "127.0.0.1"

[router]
# pass bandwidth feeback to pub
rembfeedback = false
# Cap bandwidth feedback
minbandwidth = 100000
maxbandwidth = 5000000

[plugins]
on = true
Expand Down
48 changes: 48 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

<div align=left><a href="https://github.com/pion/ion/wiki">
<img src="https://github.com/pion/ion/raw/master/docs/imgs/ion.png" width = 15% align = "left">
</a>

#### *ION is a distributed real-time communication system, the goal is to chat anydevice, anytime, anywhere!*

![MIT](https://img.shields.io/badge/License-MIT-yellow.svg)[![Build Status](https://travis-ci.com/pion/ion.svg?branch=master)](https://travis-ci.com/pion/ion)[![Go Report Card](https://goreportcard.com/badge/github.com/pion/ion)![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/pion/ion)![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/pion/ion?include_prereleases)](https://goreportcard.com/report/github.com/pion/ion)![Docker Pulls](https://img.shields.io/docker/pulls/pionwebrtc/ion-biz?style=plastic)[![Financial Contributors on Open Collective](https://opencollective.com/pion-ion/all/badge.svg?label=financial+contributors)](https://opencollective.com/pion-ion) ![GitHub contributors](https://img.shields.io/github/contributors-anon/pion/ion)![Twitter Follow](https://img.shields.io/twitter/follow/_PION?style=social)[![slack](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://pion.ly/slack)

<br />

## Pages
+ [Development](development/)
+ [Quick Start](development/quick_start.md)
+ [Docker Compose](development/docker.md)
+ [Debugging](development/debugging.md)
+ [Production](production/)
+ [Docker Compose](production/README.md)
+ [Kubernetes](../kube/README.md)
+ [Stress Test](production/stress_test.md)
+ [Server](server_features.md)
+ [Clients](clients_features.md)
+ Other Ion Projects
+ [SDK - Javascript](https://github.com/pion/ion-sdk-js)
+ [SDK - Flutter](https://github.com/pion/ion-sdk-flutter)
+ [Ion Web App](https://github.com/pion/ion-app-web)
+ [Ion Flutter App](https://github.com/pion/ion-app-flutter)
+ [Glossary / Definitions](glossary.md)
+ [Frequently Asked Questions](faq.md)

## Architecture
![arch](https://github.com/pion/ion/raw/master/docs/imgs/arch.png)

## Roadmap

[Projects](https://github.com/pion/ion/projects/1)

## Maintainers

<a href="https://github.com/adwpc"><img width="60" height="60" src="https://github.com/adwpc.png?size=500"/></a><a href="https://github.com/cloudwebrtc"><img width="60" height="60" src="https://github.com/cloudwebrtc.png?size=500"/></a><a href="https://github.com/kangshaojun"><img width="60" height="60" src="https://github.com/kangshaojun.png?size=500"/></a><a href="https://github.com/tarrencev"><img width="60" height="60" src="https://github.com/tarrencev.png?size=500"/></a><a href="https://github.com/jbrady42"><img width="60" height="60" src="https://github.com/jbrady42.png?size=500"/></a>

## Contributors

<a href="https://github.com/pion/ion/graphs/contributors"><img src="https://opencollective.com/pion-ion/contributors.svg?width=890&button=false" /></a>

*Original Author: [adwpc](https://github.com/adwpc) [cloudwebrtc](https://github.com/cloudwebrtc)*

*Community Hero: [Sean-Der](https://github.com/Sean-Der)*
40 changes: 40 additions & 0 deletions docs/client_features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Platform SDK Support

- [x] Android
- [x] Flutter SDK
- [ ] Native SDK
- [x] iOS
- [x] Flutter SDK
- [ ] Native SDK
- [x] PC Web
- [x] JS SDK
- [x] Chrome
- [x] Firefox
- [x] Flutter SDK

</details>

## Endpoint to Endpoint Compatibility
### Browser to Browser

| Codec | chrome<=>chrome | chrome<=>firefox | firefox<=>firefox |
| :---: | :---:| :----: | :----: |
| H264| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| VP8| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| VP9| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |

### Browser to Mobile

| Codec | chrome<=>ios | firefox<=>ios |chrome<=>android | firefox<=>android |
| :---: | :-----: | :-----: | :-----: | :-----: |
| H264 | :heavy_check_mark: | :heavy_check_mark:|
| VP8| :heavy_check_mark: | :heavy_check_mark: |
| VP9| :x: | :x: |

### Mobile to Mobile

| Codec | ios<=>ios | ios<=>android | android<=>android |
| :---: | :-----: | :-----: | :-----: |
| H264 |
| VP8|
| VP9|
17 changes: 17 additions & 0 deletions docs/dev/debugging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## How to develop and debug server module
### Step 1:
Stop the module, like:
```
./scripts/bizStop.sh
```
and check biz is stopped
```
ps -ef|grep biz
```
You can modify the code then
### Step 2:
Rebuild the module and run:
```
./scripts/bizStart.sh
```

47 changes: 47 additions & 0 deletions docs/dev/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## How to use

Docker commands require the ionnet docker network

First run:

```
docker network create ionnet
```

### Deployment

#### 1. Clone

```
git clone https://github.com/pion/ion
```

#### 2. Setup

Firstly pull images. Skip this command if you want build images locally

```
docker-compose pull
```

#### 3. Run

```
docker-compose up
```

#### 4. Expose Ports

(Skip if only exposing locally)

Ensure the following ports are exposed or forwarded.

```
5000-5200/udp
```

#### 5. Chat

Head over to [Ion Web App](https://github.com/pion/ion-app-web) to bring up the front end.

The web app repo also contains examples of exposing the ion biz websocket via reverse proxy with automatic SSL.
73 changes: 73 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
## This a question and answer page!
### 1.Does ion create room?
No, You can DIY a room service
### 2.Can ion block users to join a room?
No, You can DIY a websocket reverse proxy for biz which support auth(jwt etc..)
### 3.Is this just a SFU media server which we can self host?
No, all ion service can be deloyed online. You must open the port which they need.
### 4.Does it include its own TURN which is used by our host server?
No.
### 5.Some node panic when startup (islb etc..)
`2020-04-28 21:15:52.809 ERR read tcp 127.0.0.1:65507->127.0.0.1:4440: read: connection reset by peer`

Make sure your vpn is closed
### 6.How to deploy on cloud by scripts?
1) git clone https://github.com/pion/ion
2) cd ion, do some change:

set the port range:
```
portrange = [50000, 60000]
```
uncomment the two lines:
```
[[webrtc.iceserver]]
urls = ["stun:stun.stunprotocol.org:3478"]
```
add two lines to:
sdk/js/demo/webpack.config.js
```
--- a/sdk/js/demo/webpack.config.js
+++ b/sdk/js/demo/webpack.config.js
@@ -32,5 +32,7 @@ module.exports = {
contentBase: './dist',
hot: true,
host: '0.0.0.0',
+ disableHostCheck: true,
+ port: 443,
}
};
```
3) make sure these ports is opened on your cloud server firewall!!
```
443
8443
50000-60000
```
4) run all modules

first, put your cert.pem and key.pem in configs

second, run
```
./scripts/allStart.sh
```
then, chat with https://yourdomain

### 7.How to deploy on cloud by docker
The steps I took to get the docker version running on a fresh AWS vm
Names will be different for GCP and Azure, but similar concept
1) Create vm
2) Export ports 80, 443 and 5000-5200 as detiled in the readme
3) Map elastic/external ip to the vm
4) Configure dns records to point to new ip. THIS IS NEEDED LATER
5) Clone Ion and checkout docker branch
6) Modify docker-compose.yml following the readme instructions and with the domain you mapped earlier.
```
export WWW_URL=yourdomain
export ADMIN_EMAIL=youremail
docker-compose pull
docker-compose up
```
7) docker-compose up
8) chat with: https://yourdomain:8080
16 changes: 16 additions & 0 deletions docs/glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**SFU - Selective Forwarding Unit**

https://webrtcglossary.com/sfu/

**MCU - Multipoint Control Unit**

https://webrtcglossary.com/mcu/

**ISLB - Intelligent Server Load Balancing**

ISLB is a dispatch and control server

**BIZ - Business signal server**

BIZ is a signal server which support business logic

27 changes: 27 additions & 0 deletions docs/production/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## docker-compose Quick Start
#### 1. Run

```
git clone https://github.com/pion/ion
docker network create ionnet
cd ion
docker-compose -f docker-compose.stable.yml up -d
```

#### 3. Expose Ports

Ensure the ports `5000-5200/udp` are exposed or forwarded for the SFU service. If you are on a cloud provider like GCP or AWS, ensure your SFU instances have a publicly routable IP, and open those ports on the relevant firewalls or security groups.


#### 4. UI (optional)

Head over to [Ion Web App](https://github.com/pion/ion-app-web) to bring up the front end.

The web app repo also contains examples of exposing the ion biz websocket via reverse proxy with automatic SSL.

For dev and more options see the wiki

* [Development](https://github.com/pion/ion/tree/master/docs)
5 changes: 5 additions & 0 deletions docs/production/stress_test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Stress Tool
* http://github.com/pion/ion-load-tool
## Stress Result
* 1 publisher webm(vp8 opus 0.5Mbps)
* 1000 subscribers, only cost 0.5 core cpu, 40MB bandwidth, 397.9mb memory!
45 changes: 45 additions & 0 deletions docs/server_features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

## Distributed System
- [x] Service Registration and Discovery - ETCD
- [x] Auto Scale
- [x] Docker
- [x] K8S - *TODO*
- [x] MQ - NATS
- [x] RPC
- [x] Broadcast

## Decoupling Nodes
- [x] BIZ - Signal and business logic server
- [x] ISLB - Dispatch and control server
- [x] SFU - Selective Forward Unit
- [x] AVP - Audio and video process server

## Popular Media Stack

- [x] SFU
- [x] Router
- [x] Plugin
- [x] JitterBuffer
- [x] Nack
- [x] PLI
- [x] Lite-REMB
- [x] Transport-CC - *experiment*
- [x] Transport
- [x] WebRTCTransport
- [x] RTPTransport (over KCP)
- [x] AVP
- [x] Record Webm
- [x] OpenCV - *WIP*

## High Performance

- [x] Live Mode: 1-3 Publisher: 1000+ Subscribers [StressTest](production/stress_test.md)
- [x] Communication mode: 50 : 50 - *TODO*
- [x] Low latency < 500ms

## Auto scale and Loadbalance

- [x] Auto scale - *WIP*
- [x] Auto banlance - *WIP*
- [x] Relay logic - *WIP*

0 comments on commit bfeee5a

Please sign in to comment.