PeerTube/server/core/lib
Chocobozzz b4f4432459
Viewers federation protocol v2
More efficient than the current one where instance is not fast enough to
send all viewers if a video becomes popular

The new protocol can be enabled by setting env
USE_VIEWERS_FEDERATION_V2='true'

Introduce a result field in View activity that contains the number of
viewers. This field is used by the origin instance to send the total
viewers on the video to remote instances. The difference with the
current protocol is that we don't have to send viewers individually to
remote instances.

There are 4 cases:
 * View activity from federation on Remote Video -> instance replaces
   all current viewers by a new viewer that contains the result counter
 * View activity from federation on Local Video -> instance adds the
   viewer without considering the result counter
 * Local view on Remote Video -> instance adds the viewer and send it to
   the origin instance
 * Local view on Local Video -> instance adds the viewer

Periodically PeerTube cleanups expired viewers. On local videos, the
instance sends to remote instances a View activity with the result
counter so they can update their viewers counter for that particular
video
2023-12-20 10:55:47 +01:00
..
activitypub Viewers federation protocol v2 2023-12-20 10:55:47 +01:00
auth Ensure user is owned by plugin before updating it 2023-12-06 08:43:19 +01:00
emails server/server -> server/core 2023-10-04 15:13:25 +02:00
files-cache server/server -> server/core 2023-10-04 15:13:25 +02:00
html We don't need cookies for REST API 2023-12-20 10:55:47 +01:00
job-queue Better isNewVideo variable/functions name 2023-12-15 14:52:12 +01:00
live Fix embed when waiting for a live 2023-12-08 10:13:08 +01:00
model-loaders server/server -> server/core 2023-10-04 15:13:25 +02:00
notifier Fix log error 2023-10-30 14:14:19 +01:00
object-storage Fix downloading video files from object storage 2023-12-19 07:26:09 +01:00
opentelemetry Add worker thread completed OTEL metric 2023-10-27 14:40:53 +02:00
plugins Fix SEO and refactor HTML pages generation 2023-10-20 16:00:36 +02:00
runners Retry runner job db saving if needed 2023-11-24 14:44:04 +01:00
schedulers Fix invalid state change notif of remote live 2023-12-15 15:58:07 +01:00
transcoding Respect "transcode original resolution" for runner 2023-11-17 16:25:11 +01:00
views Viewers federation protocol v2 2023-12-20 10:55:47 +01:00
worker Fix CPU going to 100% on odd cpu count 2023-11-28 13:32:51 +01:00
actor-follow-health-cache.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
actor-image.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
blocklist.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
emailer.ts Fix test paths 2023-10-04 15:40:33 +02:00
hls.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
internal-event-emitter.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
local-actor.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
moderation.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
paths.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
peertube-socket.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
redis.ts Optimize video views redis calls 2023-10-26 14:08:19 +02:00
redundancy.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
search.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
server-config-manager.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
signup.ts Fix signup and import 2023-10-11 15:58:16 +02:00
stat-manager.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
sync-channel.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
thumbnail.ts Add ability to customize frames to analyze 2023-11-08 10:18:39 +01:00
timeserie.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
uploadx.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
user.ts Allow to change the default channel name (#6000) 2023-10-19 15:22:00 +02:00
video-blacklist.ts Correctly display broken muxing session 2023-10-30 11:57:39 +01:00
video-channel.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
video-chapters.ts Fix chapters import 2023-11-29 14:12:13 +01:00
video-comment.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
video-file.ts Optimize video thumbnail generation 2023-10-20 16:00:36 +02:00
video-path-manager.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
video-playlist.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
video-pre-import.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
video-privacy.ts Fix server build 2023-10-20 16:05:38 +02:00
video-state.ts Add script to move videos to file system 2023-11-02 09:21:49 +01:00
video-studio.ts Better isNewVideo variable/functions name 2023-12-15 14:52:12 +01:00
video-tokens-manager.ts server/server -> server/core 2023-10-04 15:13:25 +02:00
video-urls.ts Update server dependencies 2023-10-11 11:06:34 +02:00
video.ts Better isNewVideo variable/functions name 2023-12-15 14:52:12 +01:00