Quarkus Insights #8: Mutiny - the reactive library

Поділитися
Вставка

КОМЕНТАРІ • 10

  • @bjbegui
    @bjbegui 10 місяців тому

    finally getting to build something with mutiny.. this video really helps

  • @arunavdel86
    @arunavdel86 3 роки тому +3

    I like the way how the Mutiny API is written, but how is it different from RxJava APIs except for the flatMap operator ?

    • @clementescoffier
      @clementescoffier 3 роки тому +4

      The internals are very similar. RX Java, Reactor, and Mutiny share a lot of common code (mostly issued from reactive-streams-common). Mutiny provides slightly fewer operators (We dropped around 10%) and has a much more navigable API - making the operator structured differently). Note that we still provide "flatMap" for seasoned reactive developers, but before using it, think about who is going to maintain your code in 6 months or 1 year.

    • @Anonumos20
      @Anonumos20 2 роки тому

      @@clementescoffier Hello, I have a question. i'm just getting started with Reactive Programming and Quarkus. Should i start with Rx Java or Vertx or i can jump straight to Mutiny?What would you recommend?

    • @arunavdel86
      @arunavdel86 2 роки тому

      ​@@clementescoffier Thanks for the insight. We have been using Mutiny for a while now and one thing that struck me is the absence of some operators on Uni has lead me to write additional code of transforming to Multi and then use one of the Multi operators (like select().where(some predicate)) and then again convert back to Uni. Do you have plans to expand the operators on Uni as well in the future releases to avoid the unnecessary conversions back and forth. I can always do it in an imperative way but we are adopting functional style of code.

  • @LoveDaisy2024
    @LoveDaisy2024 2 роки тому

    Thank you

  • @paritbanal
    @paritbanal 3 роки тому +1

    Why do we need two concepts like Uni and Multi? Uni is basically a specific form of Multi with 1 item if I understand correctly. So why does this library introduce the concept on Uni?

    • @abedalrawas2656
      @abedalrawas2656 3 роки тому

      Ask why we have Mono and Flux

    • @clementescoffier
      @clementescoffier 3 роки тому +4

      Uni and Multi look very similar but the internals is quite different. A Multi can get more types of events than a Uni. Multi gets `completion`, `request`, and may have multiple items. Uni can only get either an item or a failure.
      These differences make the user API slightly different, as there are operators that would not make sense on a Uni.
      There are other differences in terms of back-pressure too.

    • @paritbanal
      @paritbanal 3 роки тому

      @@clementescoffier thankx!