diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-10-07 11:01:28 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-10-07 11:01:28 +0200 |
commit | 82e624233f22eba0230383c7de8a9ed3b69791a6 (patch) | |
tree | 9b9df6547149145ca6d7216e252e825cfb5a4951 /support/doc | |
parent | aff36eb063573532498979c83be1c279c84f2d53 (diff) | |
download | PeerTube-82e624233f22eba0230383c7de8a9ed3b69791a6.tar.gz PeerTube-82e624233f22eba0230383c7de8a9ed3b69791a6.tar.zst PeerTube-82e624233f22eba0230383c7de8a9ed3b69791a6.zip |
Update documentations now we use webseed instead of electron/webrtc
Diffstat (limited to 'support/doc')
-rw-r--r-- | support/doc/server/code.md | 14 | ||||
-rw-r--r-- | support/doc/server/upload-video.png | bin | 58712 -> 56458 bytes |
2 files changed, 6 insertions, 8 deletions
diff --git a/support/doc/server/code.md b/support/doc/server/code.md index 130d30136..652bd53df 100644 --- a/support/doc/server/code.md +++ b/support/doc/server/code.md | |||
@@ -9,8 +9,7 @@ The server is a web server developed with [NodeJS](https://nodejs.org)/[Express] | |||
9 | * [MongoDB](https://www.mongodb.com/) -> Database | 9 | * [MongoDB](https://www.mongodb.com/) -> Database |
10 | * [Express](http://expressjs.com) -> Web server framework | 10 | * [Express](http://expressjs.com) -> Web server framework |
11 | * [Mongoose](http://mongoosejs.com/) -> MongoDB object modeling | 11 | * [Mongoose](http://mongoosejs.com/) -> MongoDB object modeling |
12 | * [WebTorrent](https://webtorrent.io/) -> BitTorrent over WebRTC | 12 | * [WebTorrent](https://webtorrent.io/) -> BitTorrent tracker and torrent creation |
13 | * [Electron](http://electron.atom.io/) -> To make WebRTC inside NodeJS | ||
14 | * [Mocha](https://mochajs.org/) -> Test framework | 13 | * [Mocha](https://mochajs.org/) -> Test framework |
15 | 14 | ||
16 | 15 | ||
@@ -45,7 +44,7 @@ Uses [JavaScript Standard Style](http://standardjs.com/). | |||
45 | * Run MongoDB | 44 | * Run MongoDB |
46 | * Run `npm run dev` to compile the client and automatically run the server. If the client files are already compiled you can simply run `NODE_ENV=test node server` | 45 | * Run `npm run dev` to compile the client and automatically run the server. If the client files are already compiled you can simply run `NODE_ENV=test node server` |
47 | 46 | ||
48 | The `NODE_ENV=test` is set to speed up communications between pods (see [constants.js](https://github.com/Chocobozzz/PeerTube/blob/master/server/initializers/constants.js#L71)). | 47 | The `NODE_ENV=test` is set to speed up communications between pods (see [constants.js](https://github.com/Chocobozzz/PeerTube/blob/master/server/initializers/constants.js)). |
49 | 48 | ||
50 | `npm run help` gives you all available commands. | 49 | `npm run help` gives you all available commands. |
51 | 50 | ||
@@ -56,17 +55,16 @@ If you want to test the decentralization feature, you can easily run 3 pods by r | |||
56 | 55 | ||
57 | The server is composed by: | 56 | The server is composed by: |
58 | 57 | ||
59 | * a REST API | 58 | * a REST API (throught Express framework) |
60 | * a WebTorrent Tracker | 59 | * a WebTorrent Tracker |
61 | * A separate Electron process | ||
62 | 60 | ||
63 | The seperate Electron process has the goal to seed videos through WebRTC because WebRTC directly in NodeJS is not usable for now. | 61 | A video is seeded by the server throught the [WebSeed](http://www.bittorrent.org/beps/bep_0019.html) protocol (HTTP). |
64 | 62 | ||
65 | ![Architecture scheme](https://github.com/Chocobozzz/PeerTube/blob/master/support/doc/server/upload-video.png) | 63 | ![Architecture scheme](https://github.com/Chocobozzz/PeerTube/blob/master/support/doc/server/upload-video.png) |
66 | 64 | ||
67 | When a user uploads a video, the rest API asks the Electron process to seed it (communicate with IPC) and then adds it to its Mongo database. | 65 | When a user uploads a video, the rest API create the torrent file and then adds it to its Mongo database. |
68 | 66 | ||
69 | If a user wants to watch the video, the tracker will indicate all other users that are watching the video + the Electron process. | 67 | If a user wants to watch the video, the tracker will indicate all other users that are watching the video + the HTTP url for the WebSeed. |
70 | 68 | ||
71 | ## Newcomers | 69 | ## Newcomers |
72 | 70 | ||
diff --git a/support/doc/server/upload-video.png b/support/doc/server/upload-video.png index b3a867a42..730e68cc4 100644 --- a/support/doc/server/upload-video.png +++ b/support/doc/server/upload-video.png | |||
Binary files differ | |||