marigold-dev / marigold-dev/pollinate
Use maps instead of hashtables for pairing responses and requests
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 22
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
In order to match requests and responses, an index is used to identify them as a pair. A map should be used to store these data instead of a hashtable. See below.
> Why [not use hashtables]? What do you want us to use instead?
> Maps, Hashtbl's are mutable but they also have collision, which makes them quite tricky to analyze, especially in a critical environment such as a blockchain, so don't use them unless you really need that additional bit of performance
_Originally posted in https://github.com/marigold-dev/deku/issues/432#issuecomment-1046873460_
Contributor guide
No contributing guide indexed for this repository
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 locating the request/response pairing logic in the OCaml code and identify where the index is stored in a hashtable. Read the surrounding UDP P2P communication flow before changing the data structure. Done means pairing continues to match each response with its request without relying on the hashtable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100