20250123 Weekly Development Meeting #131
Replies: 3 comments
-
Torrust TrackerI've continued working on a big refactor of the core tracker type. Issues:
As a reminder the goal for this refactor is: "To make the code simpler, more sustainable and more testable". I've wanted to change that part since I joined the project. It's a critical part, however we have not improved it that much after adding the tests. At the beginning I added the tests to be able to refactor it safely. That's what I'm doing now. The refactor will allow:
I think it will take me at least 2 more weeks to finish it because I want to:
See the epic issue for a complete list of sub-issues I'm planning to do. Just to give you an idea this was the initial Tracker struct when I started the refactor: pub struct Tracker {
/// The tracker configuration.
config: Core,
/// A database driver implementation: [`Sqlite3`](crate::core::databases::sqlite)
/// or [`MySQL`](crate::core::databases::mysql)
database: Arc<Box<dyn Database>>,
/// Tracker users' keys. Only for private trackers.
keys: tokio::sync::RwLock<std::collections::HashMap<Key, auth::PeerKey>>,
/// The list of allowed torrents. Only for listed trackers.
whitelist: tokio::sync::RwLock<std::collections::HashSet<InfoHash>>,
/// The in-memory torrents repository.
torrents: Arc<Torrents>,
/// Service to send stats events.
stats_event_sender: Option<Box<dyn statistics::event::sender::Sender>>,
/// The in-memory stats repo.
stats_repository: statistics::repository::Repository,
} And this is the current state: pub struct Tracker {
/// The tracker configuration.
config: Core,
/// A database driver implementation: [`Sqlite3`](crate::core::databases::sqlite)
/// or [`MySQL`](crate::core::databases::mysql)
database: Arc<Box<dyn Database>>,
/// The service to check is a torrent is whitelisted.
pub whitelist_authorization: Arc<whitelist::authorization::Authorization>,
/// The in-memory torrents repository.
torrents: Arc<Torrents>,
} NOTE: At the end of the refactor this
Each one with a single responsibility. I'm not only extracting the services from the tracker but also re-organizing those services internally. Torrust WebsitePR reviews: |
Beta Was this translation helpful? Give feedback.
-
Index
API and TYPES lib
GUI
New Issues
Next |
Beta Was this translation helpful? Give feedback.
-
WebsiteIssues:
PR: Research:
|
Beta Was this translation helpful? Give feedback.
-
Location:
https://meeting.blockfinance-eco.li/nautiluscyberneeringweeklydevmeeting
Expected duration: 2 to 4 hours with breaks
Communicated attendants:
Agenda:
During the meeting every team member will take their turns and follow this sequence.
The topics for further discussion will be noted in advance by each the team member and to the meetings agenda.
set another meeting date for the discussion of these or to hold the meeting hereafter.
Also the persons to be part of the meeting will be decided on so that the others will be free to continue their own work.
Beta Was this translation helpful? Give feedback.
All reactions