RxNetty icon indicating copy to clipboard operation
RxNetty copied to clipboard

Rx.Scala bindings for RxNetty

Open diptanu opened this issue 10 years ago • 5 comments

I am creating this issue to discuss what needs to be done to integrate RxNetty with RxScala. RxNetty currently uses rx.Observable in it's API, it would be much nicer if we could work with rx.lang.scala.Observable in the Scala land.

diptanu avatar Dec 23 '14 04:12 diptanu

cc/ @mattrjacobs @benjchristensen

diptanu avatar Dec 23 '14 04:12 diptanu

Just like RxScala is a wrapper around RxJava, there would need to be a wrapper for RxNetty. It would use RxScala for all the Rx pieces, so that part is already done.

Right now, just convert the rx.Observable into an rx.lang.scala.Observable and you'll get all the Scala goodness without going to the effort of making a complete RxNetty API in Scala.

benjchristensen avatar Dec 23 '14 04:12 benjchristensen

You can simply import the conversions from the Rx scala library.

headinthebox avatar Dec 23 '14 05:12 headinthebox

You can simply import the conversions from the Rx scala library.

@headinthebox does it mean using rx.lang.scala.JavaConversions.toScalaObservable to convert an RxJava Observable to RxScala Observable?

@benjchristensen If that is what is required to use RxNetty in scala, is there a need to provide an RxNetty API in scala?

NiteshKant avatar Dec 23 '14 06:12 NiteshKant

It's not needed, Scala can call Java, it's just an optimization. Scala users would have to chime in as to whether it is important. If so it would be a separate project like RxScala. Since all public APIs are exposed with Observables I'd want to first see if RxScala provides enough, since that's where "user code" ends up mostly being done and Scala features like for-comprehensions matter.

benjchristensen avatar Dec 23 '14 15:12 benjchristensen