-
Notifications
You must be signed in to change notification settings - Fork 113
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
Make pseudo-Nodes use Handles not raw channel references #767
Conversation
Move the Invocation object to hold auto-closing channel handles rather than raw channel references, and adapt the two pseudo-Nodes that use Invocations (gRPC client and storage) appropriately.
At start of day there are exactly two Nodes that need to be started, the gRPC server pseudo-Node and the initial Application Wasm Node. Hang on the OakNode reference and initial Handle for both of these, and move OakNode::Start() to always take a Handle. This means that OakNode::SingleHandle() can be removed.
Derived classes should now always use Handles to refer to channels, not raw channel references.
Probably easiest to review commit-by-commit. |
I just note that this seems quite a large change to write (well, that's already done now) and review (still ongoing), for code that will (hopefully) not be around for that long! Or do you expect this code to continue existing as C++ linked to the Rust runtime in the long term @daviddrysdale ? |
This is definitely needed for #729, and is very likely needed for #724 (unless we're expecting to get three types of pseudo-Node functionality re-implemented in Rust in the very near future). Taken commit-by-commit, it's probably not quite as big a change as it first appears (and it wasn't that big to write – under a day). The core of it is teasing apart and moving code from |
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.
LGTM
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.
LGTM, though I am confused by the difference between Message
and NodeMessage
and the need to have both around. I will try to understand the code better, but I don't want that to hold this PR. If you have a high-level summary @daviddrysdale (in addition to what's already in the PR) that would be useful!
The existing The So by moving all of the pseudo-Node code to use |
Checklist
cover any TODOs and/or unfinished work.
construction.