1
0
Fork 0

Update documentations now we use webseed instead of electron/webrtc

This commit is contained in:
Chocobozzz 2016-10-07 11:01:28 +02:00
parent aff36eb063
commit 82e624233f
5 changed files with 19 additions and 27 deletions

View file

@ -9,8 +9,7 @@ The server is a web server developed with [NodeJS](https://nodejs.org)/[Express]
* [MongoDB](https://www.mongodb.com/) -> Database
* [Express](http://expressjs.com) -> Web server framework
* [Mongoose](http://mongoosejs.com/) -> MongoDB object modeling
* [WebTorrent](https://webtorrent.io/) -> BitTorrent over WebRTC
* [Electron](http://electron.atom.io/) -> To make WebRTC inside NodeJS
* [WebTorrent](https://webtorrent.io/) -> BitTorrent tracker and torrent creation
* [Mocha](https://mochajs.org/) -> Test framework
@ -45,7 +44,7 @@ Uses [JavaScript Standard Style](http://standardjs.com/).
* Run MongoDB
* 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`
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)).
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)).
`npm run help` gives you all available commands.
@ -56,17 +55,16 @@ If you want to test the decentralization feature, you can easily run 3 pods by r
The server is composed by:
* a REST API
* a REST API (throught Express framework)
* a WebTorrent Tracker
* A separate Electron process
The seperate Electron process has the goal to seed videos through WebRTC because WebRTC directly in NodeJS is not usable for now.
A video is seeded by the server throught the [WebSeed](http://www.bittorrent.org/beps/bep_0019.html) protocol (HTTP).
![Architecture scheme](https://github.com/Chocobozzz/PeerTube/blob/master/support/doc/server/upload-video.png)
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.
When a user uploads a video, the rest API create the torrent file and then adds it to its Mongo database.
If a user wants to watch the video, the tracker will indicate all other users that are watching the video + the Electron process.
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.
## Newcomers

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Before After
Before After