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

query: multiple jobs support #303

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kcalvinalvin
Copy link

For more efficient querying, it's useful to send multiple jobs to a fast peer if a single peer is much faster than the other.
This PR adds one component to achieve efficient querying: the ability to query multiple jobs.

This PR is incomplete in achieving efficient querying as there's no updates to the peer ranking system. That'll be addressed
in future PRs.

Changing queued jobs to a map allows for multiple job queuing. However
the queued jobs is still limited to a single job for now.
@kcalvinalvin kcalvinalvin marked this pull request as draft October 28, 2024 08:58
@kcalvinalvin kcalvinalvin force-pushed the 2024-09-06-multiple-jobs-support branch from b48dffa to 9c13852 Compare October 28, 2024 09:01
@kcalvinalvin kcalvinalvin marked this pull request as ready for review October 28, 2024 09:06
@kcalvinalvin kcalvinalvin marked this pull request as draft October 29, 2024 08:30
@kcalvinalvin kcalvinalvin force-pushed the 2024-09-06-multiple-jobs-support branch from 9c13852 to 4e83c23 Compare October 30, 2024 08:26
workDispatcher was too long and was hard to read. This change refactors
each of the code that handles separate cases so that it's manageable to
see what's going on.
A worker is now able to be queried more than 1 job at a time with
maxJobs constant introduced to limit the job per peer.
@kcalvinalvin kcalvinalvin force-pushed the 2024-09-06-multiple-jobs-support branch from 4e83c23 to 0de0038 Compare November 29, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant