Skip to content

WIP fix: fixing rate limit client side issues. Reenabling async/await. #501

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

Closed
wants to merge 1 commit into from

Conversation

SamuelBellomo
Copy link
Contributor

@SamuelBellomo SamuelBellomo commented Mar 3, 2022

adding wip for solution, focusing on query lobbies.
removing async wrapping needs, let's use async await properly
Real fix would be to come back to async await and simplify the error catching flow, catch the rate limit exception and only start rate limiting client side once we get that exception (instead of doing our own client side rate limit logic which isn't the same as the one applied on the server)

Description (*)

Related Pull Requests

Issue Number(s) (*)

Fixes issue(s):

Manual testing scenarios

  1. ...
  2. ...

Questions or comments

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

removing async wrapping needs, let's use async await properly
@SamuelBellomo SamuelBellomo added the 5-Design Review Draft to review design ideas before committing to future work label Mar 3, 2022
@pdeschain
Copy link
Contributor

If we consider async/await (more linear flow) to be a better pattern than using callbacks - then yeah it's a great idea!

There is this nuance that we would need exception handling everywhere we invoke the lobby API - which adds a lot of boilerplate. That can be mitigated by having an async method that creates an internal task, awaits it and wraps it with some exception handling. Best of both worlds.

@SamuelBellomo SamuelBellomo changed the title WIP fix: fixing rate limit client side issues. Reenabling async/await. WIP fix: fixing rate limit client side issues. Reenabling async/await. Test MTT-123 Mar 29, 2022
@SamuelBellomo SamuelBellomo changed the title WIP fix: fixing rate limit client side issues. Reenabling async/await. Test MTT-123 WIP fix: fixing rate limit client side issues. Reenabling async/await. Mar 29, 2022
@SamuelBellomo
Copy link
Contributor Author

@pdeschain is now working on this, let's close this prototype PR

@SamuelBellomo SamuelBellomo deleted the sam/fix/fixing-rate-limit-issues branch April 5, 2022 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5-Design Review Draft to review design ideas before committing to future work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants