]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - ARCHITECTURE.md
A few updates for the watch video view (#181)
[github/Chocobozzz/PeerTube.git] / ARCHITECTURE.md
... / ...
CommitLineData
1# Architecture
2
3## Vocabulary
4
5 - **Fediverse:** several servers following each others.
6 - **Instance:** a server which runs PeerTube in the fediverse.
7 - **Origin instance:** the instance on which the video was uploaded and which
8 is seeding (through the WebSeed protocol) the video.
9 - **Following:** the action of a PeerTube instance which will follow another
10 instance (subscribe to its videos).
11
12## Base
13
14### Communications
15 * All the communication between the instances are signed with [Linked Data
16 Signatures](https://w3c-dvcg.github.io/ld-signatures/) with the private key
17 of the account that authored the action.
18 * We use the [ActivityPub](https://www.w3.org/TR/activitypub/) protocol (only
19 server-server for now). Object models could be found in
20 [shared/models/activitypub
21 directory](https://github.com/Chocobozzz/PeerTube/tree/develop/shared/models/activitypub).
22 * All the requests are retried several times if they fail.
23 * The maximum of points would be defined.
24
25### Instance
26 * An instance has a websocket tracker which is responsible for all the video
27 uploaded in it.
28 * An instance has an administrator that can follow other instances.
29 * An instance can be configured to follow back automatically.
30 * An instance can blacklist other instances (only used in "follow back"
31 mode).
32 * An instance cannot choose which other instances follow it, but it can
33 decide to **reject all** followers.
34 * After having uploaded a video, the instance seeds it (WebSeed protocol).
35 * If a user wants to watch a video, they ask its instance the magnet URI and
36 the frontend adds the torrent (with WebTorrent), creates the HTML5 video
37 player and streams the file into it.
38 * A user watching a video seeds it too (BitTorrent). Thus another user who is
39 watching the same video can get the data from the origin server and other
40 users watching it.