stackabletech / stackabletech/tokio-zookeeper

[Suggestion] Use tokio_codec

Open
#1 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Rust
Stars
78
Forks
22
PR merge metrics
No merged PRs in 30d

Description

I was looking for an example of how to make a reusable tcp client with Tokio, and this seems to be the only example in the wild that I can actually find, so thank you. This will hopefully be helpful for my own project.

I was wondering why you do not use tokio_codec to handle the bytes serialization/deserialization. I think it might be easier to read if you use the Encoder/Decoder traits to separate those concerns into their own instead of mixing them into polling.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by locating the TCP client's polling code and its byte serialization/deserialization, then review how tokio_codec's Encoder and Decoder traits could separate those concerns. Done means the client uses that separation without mixing serialization logic into polling.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.