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
Add mailbox async internal process communication (was intents) #3568
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3568 +/- ##
==========================================
+ Coverage 82.60% 82.68% +0.07%
==========================================
Files 255 256 +1
Lines 32350 32508 +158
==========================================
+ Hits 26723 26879 +156
- Misses 5627 5629 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Amusing error in https://app.circleci.com/pipelines/github/wandb/wandb/14813/workflows/22f79a23-3efd-4b9e-be42-7763c87ec87a/jobs/265497 :) Mind looking into it please? |
yep. that was in the TODO.. i just added a quick change to emulate async grpc handling with the mailbox: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 🔥 🔥
WB-11186
Description
Add an async communication path utilizing mailbox delivery of responses.
Problems to solve:
Currently the user does not have any indication that an operation is long running
If we need to resend a message, the messages can back up on each other and the responses
come in only for the requests that issued them even though those requestors have timed out.
We should coalesce requests in the handler, and coalesce responses in the mailbox
Currently we choose a timeout at request time. There are circumstances where we might want a more dynamic
timeout depending on the conditions. For example if certain network errors are happening, we might want a longer
timeout
If we want to timeout an operation and do something different, we will need to cancel the previous operation. For
example if we want to try to use the network but then fall back to offline mode.
Phases:
Solves PROGRESS (static)
Solves IDEMPOTENT (for the reply only)
Solves TIMEOUT (there will probably me more advanced versions)
Solve: IDEMPOTENT (for the request)
Solve: PROGRESS (more dynamic using another mailbox and a status message)
Solution:
Introduce mailbox and new deliver verb.
Deliver sends a message asynchronously to the internal process. Deliveries are marked with a mailbox slot where responses will eventually be placed.
The user can wait on message delivery in a mailbox using wait(). Normally the mailbox will be released when the message is received by the user.
Tasks: