Code talking to the server is duplicated multiple times
- Dominant language
- Python
- Stars
- 78
- Forks
- 89
- Avg merge
- 22d 15h
- Merged PRs (30d)
- 1
Description
The protocol we use to communicate with FAF server is very simple - sequences of 4-byte ints signifying length and data of that length. The logic that reads and writes that data, however, is duplicated a couple times around the codebase (grepping blockSize shows it very well).
We should have a single implementation that communicates its state changes and passes read blocks to a handler - possibly not even concerning itself with connecting / disconnecting the socket. Before that we need to factor out all uses of the logic from the classes that use it.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by grepping the codebase for blockSize and trace each duplicated reader and writer through the classes that use it. Compare their socket connection and disconnection handling, then identify the shared state changes and read blocks that a single implementation would need to expose; done means those duplicated uses are factored through it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100