-
Notifications
You must be signed in to change notification settings - Fork 8
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
Proposal: Add MPP for libp2p _Protocol Select_ protocol #119
Conversation
Adds a _Minimal Project Proposal_ for _Protocol Select_, the successor of the libp2p protocol negotiation protocol _multistream-select 1.0_.
Keep #problems section focused on status quo. Only introduce _Protocol Select_ in #the-idea section.
This minimal project proposal is ready for review. @BigLep could you help steering this in the right direction? |
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.
Thanks for putting this together @mxinden and @marten-seemann.
Is there anyone else we should flag for this review? @marten-seemann : who have been historical folks that you would want to make sure is aware of this effort? I know we'll also tag them once we have the spec, but for visibility, it's good to flag now as well I believe.
- **Bandwidth**: [multistream-select 1.0] is not as bandwidth efficient as it | ||
could be. For example negotiating a protocol requires sending the protocol |
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.
Does this really matter? Do we have a ballpark of how much bandwidth we can save?
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.
This is debatable and not relevant in all scenarios.
Let's put the bandwidth requirement of a plaintext protocol string in relation to the remaining bytes to be send with the example below:
Say we want to send a Kademlia FindNode
request to a remote peer. In order to do that we would need to:
- Negotiate the Kademlia protocol on a new stream
- Send the
FindNode
message payload to the remote.
For (1) we will need to send /multistream/1.0.0
(18 bytes) and /ipfs/kad/1.0.0
(15 bytes). For (2) we would need to send the FindNode
message with the peer ID of the node to be found (44 bytes).
With Protocol Select we would not have to send /multistream/1.0.0
(18 bytes). In addition, with the above proposed bandwidth optimization, instead of sending /ipfs/kad/1.0.0
(15 bytes), we might be able to reduce the protocol identifier to ~2 bytes.
All that said, Protocol Select will likely not tackle this in the first iteration / roll out version. It will only be designed in a way to enable this optimization in future versions.
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.
Thanks @BigLep for taking a look.
Is there anyone else we should flag for this review?
Tagging @vyzo and @Stebalien, though I am reasonably sure they are already aware of this concrete minimal project proposal.
@BigLep what are next steps here? Would this pull request be merged once accepted, or would we simply change the status of the pull request?
- **Bandwidth**: [multistream-select 1.0] is not as bandwidth efficient as it | ||
could be. For example negotiating a protocol requires sending the protocol |
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.
This is debatable and not relevant in all scenarios.
Let's put the bandwidth requirement of a plaintext protocol string in relation to the remaining bytes to be send with the example below:
Say we want to send a Kademlia FindNode
request to a remote peer. In order to do that we would need to:
- Negotiate the Kademlia protocol on a new stream
- Send the
FindNode
message payload to the remote.
For (1) we will need to send /multistream/1.0.0
(18 bytes) and /ipfs/kad/1.0.0
(15 bytes). For (2) we would need to send the FindNode
message with the peer ID of the node to be found (44 bytes).
With Protocol Select we would not have to send /multistream/1.0.0
(18 bytes). In addition, with the above proposed bandwidth optimization, instead of sending /ipfs/kad/1.0.0
(15 bytes), we might be able to reduce the protocol identifier to ~2 bytes.
All that said, Protocol Select will likely not tackle this in the first iteration / roll out version. It will only be designed in a way to enable this optimization in future versions.
I've added some reviewers, mostly people who were involved in the multistream 2.0 discussion. Would love to hear their feedback! |
I'm going to move this to In Progress, given Stewards are working on this by putting together an official spec: libp2p/specs#349 If there are no concerns from others that we're working on specing this, I think reviewers can leave their comments in the spec itself. |
Big 👍 to this proposal 😄 I'll check out the draft spec and chime in if I have any opinions. |
Adds a Minimal Project Proposal for Protocol Select, the successor
of the libp2p protocol negotiation protocol multistream-select 1.0.
Status
Ready for review.