]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - ARCHITECTURE.md
A few updates for the watch video view (#181)
[github/Chocobozzz/PeerTube.git] / ARCHITECTURE.md
CommitLineData
fcaf1e0a 1# Architecture
8c308c2b
C
2
3## Vocabulary
4
e755a63a
BB
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).
8c308c2b
C
11
12## Base
13
8c308c2b 14### Communications
e755a63a
BB
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.
55e0591c 24
fcaf1e0a 25### Instance
e755a63a
BB
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.