-
Notifications
You must be signed in to change notification settings - Fork 976
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
refactor(request-response): don't use upgrade infrastructure #3914
Conversation
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.
Direction looks good to me! Assuming that you don't want a final review yet.
A high-level review would be appreciated :) |
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.
Direction looks good to me.
@mxinden This is ready for review and is the 2nd last piece towards starting the work around a simpler design of |
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.
We need to bound the number of concurrent inbound streams. Otherwise this change looks good to me.
(Surprised that this ends up being 2 lines less instead of many new lines in addition.)
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This pull request has merge conflicts. Could you please resolve them @thomaseizinger? 🙏 |
This pull request has merge conflicts. Could you please resolve them @thomaseizinger? 🙏 |
…libp2p into refactor/req-res-on-upgrade
This needs some more thinking on how we want to report errors. Also, I noticed that several of the enum variants are actually unused so we should properly clean this up. I'll see to look into it next week. Help much appreciated though :) |
This comment was marked as resolved.
This comment was marked as resolved.
@thomaseizinger let me know once this is ready for another review. |
It is! :) |
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.
Great work! Happy for this to land.
This patch refactors `libp2p-request-response` to not use the "upgrade infrastructure" provided by `libp2p-swarm`. Instead, we directly convert the negotiated streams into futures that read and write the messages. Related: libp2p#3268. Related: libp2p#2863. Pull-Request: libp2p#3914. Co-authored-by: Yiannis Marangos <[email protected]>
Description
This patch refactors
libp2p-request-response
to not use the "upgrade infrastructure" provided bylibp2p-swarm
. Instead, we directly convert the negotiated streams into futures that read and write the messages.Related: #3268.
Related: #2863.
Attributions
Co-authored-by: Yiannis Marangos [email protected]
Notes & open questions
I am putting this up as an initial draft. I think some clean-up can be done but overall, I am glad it is working this well.Change checklist