Add dialer-based RouteTaskHandler - #694
Open
gabotechs wants to merge 1 commit into
Open
Conversation
gabotechs
force-pushed
the
gabrielmusat/add-dialer-based-route-task-handler
branch
from
September 4, 2026 09:28
920687c to
fdaa2f5
Compare
gabotechs
force-pushed
the
gabrielmusat/add-dialer-based-route-task-handler
branch
from
September 4, 2026 09:41
fdaa2f5 to
980ee25
Compare
gabotechs
commented
Sep 4, 2026
Collaborator
Author
There was a problem hiding this comment.
@JSOD11 would love some feedback about the new shape of this API.
Base automatically changed from
gabrielmusat/add-ok-or-some-err-macro
to
main
September 5, 2026 15:33
gabotechs
force-pushed
the
gabrielmusat/add-dialer-based-route-task-handler
branch
from
September 5, 2026 15:35
980ee25 to
770ff5f
Compare
gabotechs
changed the base branch from
main
to
gabrielmusat/add-async-recursion-helpers
September 5, 2026 15:36
gabotechs
force-pushed
the
gabrielmusat/add-dialer-based-route-task-handler
branch
from
September 6, 2026 07:08
770ff5f to
903e262
Compare
gabotechs
force-pushed
the
gabrielmusat/add-dialer-based-route-task-handler
branch
from
September 6, 2026 17:00
903e262 to
31748bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite of the task routing API that unlocks the door for implementing retries and smarter routing.
Key changes to the task-routing API:
Fire on a per-task basis instead of per-stage
Previously, this API was fired once for each stage, and the expected returns where a list of URLs (one per task in the stage):
Now, this is called once per task, and the passed plan is the task specialized one, not the original one.
Returns a successfully established connection
There was a problem with the previous task routing API:
It prompted users and/or default implementations to return a URL, without knowing if something is listening at the other side of the URL.
There is a chance that the routed machine is unavailable, in which case, the new API gives the option to implementations to retry on a different machine.
The event handler is now
asyncConnections must be established in this event handler, which means that it must make network calls, therefore it's now made
async.Introduction of
CoordinatorToWorkerDialerThe
CoordinatorToWorkerDialeris a trait that users are not supposed to implement, instead, they are supposed to call its.dial()method for attempting to establish a connection from coordinator to remote worker, so implementations of theRouteTaskHandlerwould look like this:If there's an error while dialing the worker, the user can choose to retry on another URL.
The
CoordinatorToWorkerDialerunder the hood will handle all the API churn for making API calls to workers, leaving a clean and narrow API to the routing task event handler implementor, just requiring the URL to which it needs to connect to.What's not included yet
Any kind of retry mechanism on a different node in case of a connection failure.
Stack created with GitHub Stacks CLI • Give Feedback 💬