torrust_tracker/core/torrent/
mod.rs

1//! Structs to store the swarm data.
2//!
3//! There are to main data structures:
4//!
5//! - A torrent [`Entry`](torrust_tracker_torrent_repository::entry::Entry): it contains all the information stored by the tracker for one torrent.
6//! - The [`SwarmMetadata`](torrust_tracker_primitives::swarm_metadata::SwarmMetadata): it contains aggregate information that can me derived from the torrent entries.
7//!
8//! A "swarm" is a network of peers that are trying to download the same torrent.
9//!
10//! The torrent entry contains the "swarm" data, which is basically the list of peers in the swarm.
11//! That's the most valuable information the peer want to get from the tracker, because it allows them to
12//! start downloading torrent from those peers.
13//!
14//! The "swarm metadata" contains aggregate data derived from the torrent entries. There two types of data:
15//!
16//! - For **active peers**: metrics related to the current active peers in the swarm.
17//! - **Historical data**: since the tracker started running.
18//!
19//! The tracker collects metrics for:
20//!
21//! - The number of peers that have completed downloading the torrent since the tracker started collecting metrics.
22//! - The number of peers that have completed downloading the torrent and are still active, that means they are actively participating in the network,
23//!   by announcing themselves periodically to the tracker. Since they have completed downloading they have a full copy of the torrent data. Peers with a
24//!   full copy of the data are called "seeders".
25//! - The number of peers that have NOT completed downloading the torrent and are still active, that means they are actively participating in the network.
26//!   Peer that don not have a full copy of the torrent data are called "leechers".
27//!
28use torrust_tracker_torrent_repository::TorrentsSkipMapMutexStd;
29
30pub type Torrents = TorrentsSkipMapMutexStd; // Currently Used