-
Notifications
You must be signed in to change notification settings - Fork 0
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
adapt runner and session for concurrency #320
Comments
The problem with the Run method (on the runner/driver) is that we want a different signature depending on whether the client wants to run inline or accelerated.
|
Some assistance from draw.io is required to get a cohesive design that works across primary/resume and inline/accelerated. |
oops, I discovered a very bad faux par in the naming of the resumeNavigator. It is the front end of the navigator that is used by a primary session and a resume session. There appears to be nothing in it that is related to resume so it should not be called the resumeNavigator; that is very misleading. |
The current implementation of the session and the runner do not play to well when we try to introduce concurrency. This is not because of concurrency per say, but rather we are adding another dimension of functionality requiring an excessive number of changes.
We have 2 types of sessions, primary and resume. The runner drives the session. Either of these session types used to have only a single way of driving the navigator, ie in a synchronous fashion. Then along came concurrency and that was shoe horned in, but not so well. To support concurrency, the following was added:
AsyncInfo has to be passed in as variadic parameter via the following routes:
To fix this, the accelerator needs to be accessed via some other abstraction that has non currency equivalent.
Todo items:
See the bridge pattern.
We also have to re-consider context. It is not just useful for async scenario. It can and should be used for the inline use case, because we need to support cancellation from ctrl-c interrupt. For this reason, we need to build the context into the inline situation, however we should never need a cancel function that is required by the accelerated scenario. The interrupt can be handled by the client using os.Interrupt
The text was updated successfully, but these errors were encountered: