http4s-reactive-streams module
See original GitHub issueWe discussed at the NE Scala Symposium ways for various libraries to abstract over fs2.Task
and monix.eval.Task
, both of which have a lot to like and a lot of people who like them. For us, it’s possible to abstract away Task
, but significantly raises barriers to writing middleware or even composing library-provided building blocks. Far more difficult would be abstracting over Stream
, which would require a separate branch, which we are moving away from.
However, a module with entity codecs for monix would offer a nice solution. Just like we support Ok(scala.concurrent.Future("hello"))
, we could support Ok(monix.eval.Task.eval("hello"))
. Similarly, an Ok(observable)
or Ok(iterant)
could be converted to an EntityBody
. It would require a monix support import and some runtime conversion, but I imagine this results in a more pleasant Monix experience alongside fs2 than any extra abstractions we’ve imagined to support Monix without fs2.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:5 (5 by maintainers)
Top GitHub Comments
It will handle Monix Task. It won’t handle Observable, but a reactive streams module would pick up both that and akka-stream.
This issue reads to me a lot like a monix-http4s integration, and there’s no Monix you can use alongside CE3 (yet). akka-stream is interesting but seems unlikely use-case IMHO since they have akka-http. Closing but of course if there is interest this can pop up as a new repo at anytime.