Improve request/response documentation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.6k
- Forks
- 1.3k
- Avg merge
- 8h 47m
- Merged PRs (30d)
- 19
Description
Request/response is a powerful primitive, but could use a better description regarding codec requirements.
I looked at example json and cbor implementations and looks like codec is single-use (I guess a new stream is used for each request/response).
Then I looked into why codec is required to be clonable assuming it can be reused for different streams, but turns out it is cloned every time, limiting reuse of previously allocated buffers (that both json and cbor allocated in read methods every time from scratch.
Would be great if someone with good knowledge of this protocol improved documentation about codec requirements and maybe improved reviewed code looking at efficiency improvements.
For now I'll just follow mentioned codecs as examples.
P.S. Would be great to see https://github.com/paritytech/parity-scale-codec support as well, I'm happy to send a PR if it is welcome.
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 by reviewing the request/response documentation and the JSON and CBOR codec examples mentioned in the issue. Verify the codec cloning and stream lifecycle assumptions, then document the codec requirements and clarify whether efficiency changes or parity-scale-codec support are in scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation, networking
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100