Closed Floor97 closed 1 year ago
@InvictusRMC could you add yourself and OrestisKan as reviewers? I do not have the permission to do this, but this was requested by @synctext.
@OrestisKan can you review this PR please?
@OrestisKan we merged a clean code pr where we fixed for example the sketchy pairs by changing how gossip messages work. It now uses json and there is no more pair casting needed. See this pr for the changes we applied. The FIXME and NOTE were changed to TODO's, and the other requests you made have comments to address the questions/issues.
The Recommender class has been removed. This class was not integrated in the rest of the code yet so had no effect on the videos being played. The pr was mostly meant for the gossipers and the profiles. The recommender was also removed in our development branch as this was implemented in a different way, but this code is not yet ready for this pr and will come in a future pr. The two todo's were fixed, see this pr to view the new changes separately.
perfect! Please merge if there are no open issues. @OrestisKan
perfect! Please merge if there are no open issues. @OrestisKan
@synctext Aren't the ones who created the merge requests the ones who are supposed to merge it ? Mainly in the case of merge conflicts I might introduce errors.
@OrestisKan we don't have the required permission to merge. Also I don't think it is a problem, because github notifies you and makes you unable to merge if there are merge conflicts.
Gossiper
The gossiper functionality was refactored and extended. Refactored the
GossiperService
to easily add new gossipers. Created aGossiper
abstract class as a blueprint for new gossipers, wheredelay
andpeers
are required variables.delay
is how long of a delay there should be in between gossips.peers
determines how many peers is gossiped with. The gossipWith function in DeToksCommunity was also refactored to allow for any message that implements Serializable.In terms of functionality, a
BootGossiper
,NetworkSizeGossiper
andWatchTimeGossiper
was added to be able to aggregate watch time per video:BootGossiper
: gossiper that requests data from neighbours useful to booting. Currently only exchanges estimated network size but can easily be extended with other variables if needed.NetworkSizeGossiper
: tries to estimate the network size according to the counting protocol described in Gossip-Based Aggregation in Large Dynamic Networks.WatchTimeGossiper
: tries to estimate the average watch time per video according to the sum protocol described in Gossip-Based Aggregation in Large Dynamic Networks. For more of a description on what the count and sum protocols are see this pr.Recommender
Added a recommender and a framework for (recommendation) profiles with a set of metrics for each video a user interacted with. This currently tracks the time at which the torrent was first seen and the total aggregate watch time among all users. The recommender has two functions for determining the order of videos the user should still watch. The first is random (coin toss) and the second first sorts by watch time, and secondly by the time the torrent was first seen. We also update the watch time of a video after the user swipes to a next video, and added functionality to determine which videos have (not) been watched.
Dummy nodes
The dummy nodes have been reworked to work with docker for easier setup on multiple systems. Also, 21 creative commons torrent files were added that the dummy nodes randomly pick from to boot with.