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

Limit the number of standings so we don't wait 10 minutes for them to be printed out. #47

Open
rawsonj opened this issue Jul 10, 2016 · 2 comments
Assignees

Comments

@rawsonj
Copy link
Owner

rawsonj commented Jul 10, 2016

Due to #46 being resolved, users can now see the standings the bot is keeping track of.

The issue here is that maybe we've recorded a few hundred users playing the game, and if the rate-limiting is set to a large-ish number (say 1 second) we may wait for several minutes as the standings are queued instantly in the bot but sent to the server at the configured rate.

Several trivia questions can then be queued up and go by while the standings are still being printed out.

This can be fixed in one of two ways:

1: Limit the standings to the top ten, or maybe just the ten people around where the user is, or some variation on this. This would put an upper bound on the time required to print out the standings.

Pros:

  • Simple to implement.

Cons:

  • We're still waiting to see questions in the main channel, and it still disrupts the game, just not for as long.
  • We would be removing the ability to see the complete standings, which may be preferred in some cases.

2: Implement a priority queue or multiple queues. This may be preferable because if a user wants to see the complete standings they don't care about getting them as fast as possible, but the game should keep running as normal and be just as responsive as it normally would be.

Pros:

  • Avoids the cons of the first implementation.

Cons:

  • Not as simple to implement as the first implementation.
@rawsonj rawsonj self-assigned this Jul 10, 2016
@andy5995
Copy link
Contributor

What about a compromise? Show the top 10 or 20.

When a user gets a question correct, his rank is shown (or he can use ?rank at anytime).

If it's still very important that people can see the whole list, have an option that will display a URL to where the rankings are posted. Admins can turn the option on or off, depending on if they want to post rankings to a forum, web site, wiki, etc.

@rawsonj
Copy link
Owner Author

rawsonj commented Mar 24, 2021

I think I'll show the top 5, then skip a bunch, and then show the position the user is in and the surrounding nicks.

Kind of like:

  1. bob
  2. charlie
  3. fred
  4. fred2
  5. fred3

...

  1. guy_before_user2
  2. guy_before_user1
  3. user
  4. guy_after_user1
  5. guy_after_user2

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants