smallrye-mutiny icon indicating copy to clipboard operation
smallrye-mutiny copied to clipboard

Contribute a Mutiny module to kotlinx.coroutines/reactive

Open heubeck opened this issue 1 year ago • 8 comments

There's a collection of Kotlin coroutine support modules for different reactive libraries.

Moving the coroutines integrations from mutiny-kotlin to https://github.com/Kotlin/kotlinx.coroutines/tree/master/reactive would make reuse of some exising Publisher/Coroutine implementions over there possible.

On the other side, it would raise awareness for Mutiny in the Kotlin community.

Phases:

  1. contribute kotlinx-coroutines-reactive-mutiny
  2. refactor mutiny-kotlin to use kotlinx-coroutines-reactive-mutiny

Considerations:

  • additional dependencies for mutiny-kotlin and all downstream projects
  • one of the downstream projects is Quarkus, which means that native image builds needs to be possible with kotlinx-coroutines-reactive
  • changes would have longer lead time, due to upstream contribution to kotlinx-coroutines-reactive - could be mitigated by a multi-phase fix in mutiny-kotlin first, contribution to coroutines-reactive, adoption of that fix in mutiny-kotlin.

/cc @hantsy @Sanne @MartinX3 @rgmz @FWest98 @jponge

heubeck avatar Jul 25 '23 08:07 heubeck

Is this project using Java Flow or still the legacy reactive stream API?

cescoffier avatar Jul 25 '23 08:07 cescoffier

Is this project using Java Flow or still the legacy reactive stream API?

Flow: https://github.com/Kotlin/kotlinx.coroutines/tree/master/reactive/kotlinx-coroutines-jdk9

heubeck avatar Jul 25 '23 09:07 heubeck

Under this project, it includes several modules.

  • kotlinx-coroutines-jdk9 for JDK 9 Flow
  • kotlinx-coroutines-reactive for Reactive Streams APIs
  • kotlinx-coroutines-reactor for Reactor, depends on kotlinx-coroutines-reactive
  • kotlinx-coroutines-rx2 for RxJava 2, depends on kotlinx-coroutines-reactive
  • kotlinx-coroutines-rx3 for RxJava 3, depends on kotlinx-coroutines-reactive

hantsy avatar Jul 25 '23 09:07 hantsy

The new kotlinx-coroutines-mutiny can reuse kotlinx-coroutines-jdk9.

hantsy avatar Jul 25 '23 09:07 hantsy

Sounds good

jponge avatar Jul 25 '23 09:07 jponge

Any update for this?

hantsy avatar Oct 23 '23 09:10 hantsy

Not yet, pardon me. Lack of time atm, but honestly planning to proceed asap.

heubeck avatar Oct 24 '23 07:10 heubeck

Don't worry @heubeck 👍

jponge avatar Oct 24 '23 07:10 jponge