typelevel / typelevel/fs2

Topic trait as a combination of TopicSource and TopicSink?

Open
#2,729 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
2.5k
Forks
636
Avg merge
2d 4h
Merged PRs (30d)
7

Description

cats.effect.std.Queue defines the Queue trait as being a combination of Source and Sink, such that the caller has the possibility of using map or contramap.
fs.concurrent.Topic only implements imap. Since not all functions are invertible, an improvement to Topic may be to compose the trait in a similar way?

Thank you.

Reference:
https://github.com/typelevel/cats-effect/blob/854dc9ed20dcc211527cf084a05776681ad6324b/std/shared/src/main/scala/cats/effect/std/Queue.scala#L335-L407

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 fs.concurrent.Topic and compare its current imap API with the referenced cats.effect.std.Queue definition of Source and Sink. Determine whether composing those traits is a suitable Topic API improvement, including the implications of non-invertible functions. Done means the intended API shape and its expected behavior are clearly agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
stream-processing
Issue type
Feature
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.