typelevel / typelevel/fs2

Reimplement `Channel` in terms of `Queue`

Open
#2,852 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.x design/refactoring
Dominant language
Scala
Stars
2.5k
Forks
636
Avg merge
2d 4h
Merged PRs (30d)
7

Description

It's very unclear that Channel is actually meaningfully faster than an implementation based directly on Cats Effect's Queue. More importantly, since Queue is now being optimized substantially, Channel should probably lean on that primitive rather than its own data structures so as to inherit the performance gains. This will be particularly dramatic when typelevel/cats-effect#2890 is completed (which will be during the 3.4.x series, and possibly 3.4.0).

A simple strawman implementation of Channel (which is probably at least close to functional) can be found in this gist: https://gist.github.com/djspiewak/847532614a166af9f811e972d6f2c36f

Contributor guide

Open the contributing guide

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

Start with the linked strawman implementation and compare its Channel design with the existing Queue and Channel code. Determine how the reimplementation should preserve Channel behavior while delegating to Queue, then validate that the resulting implementation inherits the intended Queue performance improvements.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
stream-processing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.