Make usage of expensive (= relayed) connections in high level protocols such as request_response configurable
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.6k
- Forks
- 1.3k
- Avg merge
- 8h 47m
- Merged PRs (30d)
- 19
Description
Description
P2pCircuit (relay) connections should be considered expensive due to bandwidth limitations. They should probably only be used for control plane data exchange (such as Dcutr). But this cannot be easily implemented using the current implementation of request_response.
Motivation
For me, request_response would become a lot more usable if the Behaviour itself could be made aware of expensive connections. Perhaps something more general than "relayed or not" could be done, but even that would be great to start out.
Afaik at least the JS implementation acknowledges this by making whether or not a request should be send over such connections configurable.
Current Implementation
The Rust implementation of request_response completely abstracts the dialling process away from the user, making it unusable as soon as Dcutr and relays (or "conditional data transfer") become relevant.
I see no reasonable way to fix this in my app, so this goes onto the list of awkwardly patched issues in my fork of libp2p (because I don't have time or skill to properly fix this).
Are you planning to do it yourself in a pull request?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Rust request_response behaviour and its dialling abstraction, then compare the JS implementation's configurability for relayed connections. Trace how P2pCircuit and Dcutr interact with request_response; done means defining a supported way for the behaviour to control or avoid expensive relay connections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100