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

New Routing helpers: parallel and sequential. #56

Closed
ajnavarro opened this issue Aug 22, 2022 · 4 comments · Fixed by #58
Closed

New Routing helpers: parallel and sequential. #56

ajnavarro opened this issue Aug 22, 2022 · 4 comments · Fixed by #58
Assignees
Labels
effort/days Estimated to take multiple days, but less than a week kind/enhancement A net-new feature or improvement to an existing feature

Comments

@ajnavarro
Copy link
Member

We need to implement two routing helpers that will get a list of routers and execute them in parallel or sequentially:

  • sequential router:
    • Get a list of routers. Routers will be executed in the provided order.
    • Local timeout (time.Duration) per router.
    • IgnoreError flag per router. If that router fails, the execution won't be stopped and we will try with the next router on the list.
    • Global timeout (time.Duration) that will affect the total time execution and will include all the routers.
  • parallel router:
    • Get a list of routers. Routers will be executed in parallel.
    • Local timeout (time.Duration) per router.
    • IgnoreError flag per router. If that router fails, other routers will be still executed in parallel.
    • ExecuteAfter(time.Duration) per Router. Wait until the specified time to be executed.
    • Global timeout (time.Duration) that will affect the total time execution and will include all the routers.
@ajnavarro ajnavarro added kind/enhancement A net-new feature or improvement to an existing feature effort/days Estimated to take multiple days, but less than a week labels Aug 22, 2022
@BigLep
Copy link

BigLep commented Aug 22, 2022

Per discussion on 2022-08-19, we're going to see if we can use the existing routers rather than create new ones.

Per usuals, unit tests are expected before this is done.

@ajnavarro
Copy link
Member Author

ajnavarro commented Aug 25, 2022

I tried to use the Tiered router as a start point and implement everything from there. The main problem is that will cost a fair amount of work to make it backward-compatible because it has a super specific behavior per method that will need to be the default and it is mixing sequential and parallel logics. parallel.go router might be reusable though.

@BigLep
Copy link

BigLep commented Aug 25, 2022

2022-08-25 conversation:

  • Consider using generics
  • If we change the semantics, make sure we document and ensure that the areas that are affected will be ok.
  • We can break whatever we want, but need to communicate in the release notes

@ajnavarro
Copy link
Member Author

Work being done here: #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/days Estimated to take multiple days, but less than a week kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants