You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, multiple locks need to be taken out to process almost any request. What's worse is that these locks are implemented as spin locks. While this works, we can do much better and make SB fully lock-free and spin-free.
Solution:
Currently, every command needs to take 2-3 locks. In part, these locks are to avoid deadlock due to DashMap. Instead, we can use a message-passing.
To implement this, ownership (and direct access) to tournament data will be moved from a command's context into a separate tokio task. This task can be sent messages via an MSPC channel. Because a single process will own and manipulate the tournament data, no locks are required.
Challenges/Considerations:
This will be a fairly large refactoring. Because most of the data processing will happen in a single task, tournament methods need to await need to be refactored nothing is awaited in this task. This will likely require spawning tasks with additional channels for intra-task communication.
The text was updated successfully, but these errors were encountered:
Unmet Need:
Currently, multiple locks need to be taken out to process almost any request. What's worse is that these locks are implemented as spin locks. While this works, we can do much better and make SB fully lock-free and spin-free.
Solution:
Currently, every command needs to take 2-3 locks. In part, these locks are to avoid deadlock due to
DashMap
. Instead, we can use a message-passing.To implement this, ownership (and direct access) to tournament data will be moved from a command's context into a separate tokio task. This task can be sent messages via an MSPC channel. Because a single process will own and manipulate the tournament data, no locks are required.
Challenges/Considerations:
This will be a fairly large refactoring. Because most of the data processing will happen in a single task, tournament methods need to await need to be refactored nothing is awaited in this task. This will likely require spawning tasks with additional channels for intra-task communication.
The text was updated successfully, but these errors were encountered: