-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
League Points Calculation + Task Scheduling #195
Merged
FelixTJDietrich
merged 13 commits into
develop
from
170-league-points-calculation-service
Dec 4, 2024
Merged
League Points Calculation + Task Scheduling #195
FelixTJDietrich
merged 13 commits into
develop
from
170-league-points-calculation-service
Dec 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
application-server
size:XL
This PR changes 500-999 lines, ignoring generated files.
labels
Dec 1, 2024
GODrums
added
enhancement
New feature or request
research
and removed
size:XL
This PR changes 500-999 lines, ignoring generated files.
labels
Dec 1, 2024
github-actions
bot
added
the
size:L
This PR changes 100-499 lines, ignoring generated files.
label
Dec 1, 2024
iam-flo
requested changes
Dec 2, 2024
...ion-server/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaderboardTaskScheduler.java
Show resolved
Hide resolved
...ion-server/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaderboardTaskScheduler.java
Outdated
Show resolved
Hide resolved
...rver/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaguePointsCalculationService.java
Outdated
Show resolved
Hide resolved
...rver/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaguePointsCalculationService.java
Outdated
Show resolved
Hide resolved
...rver/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaguePointsCalculationService.java
Outdated
Show resolved
Hide resolved
...rver/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaguePointsCalculationService.java
Outdated
Show resolved
Hide resolved
...rver/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaguePointsCalculationService.java
Outdated
Show resolved
Hide resolved
...rver/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaguePointsCalculationService.java
Outdated
Show resolved
Hide resolved
...server/src/main/java/de/tum/in/www1/hephaestus/leaderboard/tasks/LeaguePointsUpdateTask.java
Outdated
Show resolved
Hide resolved
...server/src/main/java/de/tum/in/www1/hephaestus/leaderboard/tasks/LeaguePointsUpdateTask.java
Outdated
Show resolved
Hide resolved
milesha
reviewed
Dec 3, 2024
...rver/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaguePointsCalculationService.java
Outdated
Show resolved
Hide resolved
FelixTJDietrich
previously approved these changes
Dec 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the one comment this looks good. I thought about if it makes sense to not realize all the merged pull requests in memory, this could technically be done in the database.
...rver/src/main/java/de/tum/in/www1/hephaestus/leaderboard/LeaguePointsCalculationService.java
Outdated
Show resolved
Hide resolved
…tus/leaderboard/LeaguePointsCalculationService.java
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
application-server
enhancement
New feature or request
research
size:L
This PR changes 100-499 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Solves tasks 3.2 and 3.3 of #170.
Description
Please checkout the textual description of how leagues are meant work in #170 first.
Summary league details (from #170):
s
: leaderboard score,r
: leaderboard ranking,p
: player's league pointsThis PR includes the fundamental logic for calculating leaderboard leagues:
leaguePoints
-attribute to the User, storing the user's current "league" as points.LeaguePointsCalculationService
calculates the ranking point change based on a user's result in the (completed) leaderboard. All details regarding the algorithm/formula are described in Leaderboard leagues #170.LeaguePointsUpdateTask
is a task scheduled at the end of every leaderboard cycle, which initiates the rating change calculation for the finished leaderboardTesting Instructions
Next to standard reviews, I would also appreciate concept reviews regarding the used algorithm.
LeaderboardTaskScheduler
such that the task executes instantly (e.g.scheduleWithFixedDelay
andDuration.of(1)
)application-server
and check calculated values in the consoleChecklist
General
Server (if applicable)