aboutsummaryrefslogtreecommitdiffhomepage
path: root/ARCHITECTURE.md
diff options
context:
space:
mode:
Diffstat (limited to 'ARCHITECTURE.md')
-rw-r--r--ARCHITECTURE.md46
1 files changed, 30 insertions, 16 deletions
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index ac62fa4b7..ecc4d2d40 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -2,25 +2,39 @@
2 2
3## Vocabulary 3## Vocabulary
4 4
5 - **Fediverse:** several servers following each others 5 - **Fediverse:** several servers following each others.
6 - **Instance:** a server which runs PeerTube in the fediverse 6 - **Instance:** a server which runs PeerTube in the fediverse.
7 - **Origin instance:** the instance on which the video was uploaded and which is seeding (WebSeed protocol) the video 7 - **Origin instance:** the instance on which the video was uploaded and which
8 - **Following:** the action of a PeerTube instance which will follow another instance (subscribe to its videos) 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).
9 11
10## Base 12## Base
11 13
12### Communications 14### Communications
13 * All the communications between the instances are signed with [Linked Data Signatures](https://w3c-dvcg.github.io/ld-signatures/) with the private key of the account that made the action 15 * All the communication between the instances are signed with [Linked Data
14 * We use the [ActivityPub](https://www.w3.org/TR/activitypub/) protocol (only server-server for now). Object models could be found in [shared/models/activitypub directory](https://github.com/Chocobozzz/PeerTube/tree/develop/shared/models/activitypub). 16 Signatures](https://w3c-dvcg.github.io/ld-signatures/) with the private key
15 * All the requests are retried several times if they fail 17 of the account that authored the action.
16 * The maximum of points would be defined 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.
17 24
18### Instance 25### Instance
19 * An instance has a websocket tracker which is responsible for all the video uploaded in it 26 * An instance has a websocket tracker which is responsible for all the video
20 * An instance has an administrator that can follow other instances 27 uploaded in it.
21 * An instance can be configured to follow back automatically 28 * An instance has an administrator that can follow other instances.
22 * An instance can blacklist other instances (only used in "follow back" mode) 29 * An instance can be configured to follow back automatically.
23 * An instance cannot choose which other instance follow it, but it can decide to **reject all** followers 30 * An instance can blacklist other instances (only used in "follow back"
24 * After having uploaded a video, the instance seeds it (WebSeed protocol) 31 mode).
25 * If a user wants to watch a video, he asks its instance the magnet URI and the frontend adds the torrent (with WebTorrent), creates the HTML5 video player and streams the file into it 32 * An instance cannot choose which other instances follow it, but it can
26 * A user watching a video seeds it too (BitTorrent) so another user who is watching the same video can get the data from the origin server and the user 1 (etc) 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.