Skip to content
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

feat: start adding leaderboard service #7

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ZakShearman
Copy link
Member

@ZakShearman ZakShearman commented Nov 5, 2024

Aims of the leaderboard service:

  • Personal leaderboard, view your top x scores
  • Variable time periods, e.g. 1d, 7d, 1month, lifetime
  • Filtering for players (e.g. friends leaderboard)

Leaderboards must be pre-configured in YAML so we don't store too much data (e.g. we need to specify a personal leaderboard with a limit of X scores so we don't store them all). Direction (ASC, DESC) also needs to be specified.

The aim is that a server can push a score and the leaderboard service will store it if it deems necessary (based on config). It will store playerID, leaderboardID, score which will allow us to filter however we want.

Currently unsure how configuration can be done. We can easily create and query a leaderboard dynamically as we can just shove them all in one MongoDB collection.

Other DoD:

  • proto-specs has been updated
  • Leaderboard updates are published to Kafka
  • MongoDB indexes are created
  • Method to delete an entry from a leaderboard (by entry ID and position index)

Current Design Considerations:

  • Q: Should scores be pushed to leaderboards via Kafka or gRPC
    • A: Can do Kafka, update results (if any changes to leading) will have to be pushed async via a return Kafka message

@ZakShearman ZakShearman self-assigned this Nov 5, 2024
@ZakShearman ZakShearman added kind/design Proposal discussing new features / fixes, how they should be implemented kind/feature size/L Large and removed enhancement labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/design Proposal discussing new features / fixes, how they should be implemented kind/feature size/L Large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant