What are the main benefits of using Mono over Java (or any other "free" or Linux-friendly language/runtime)?
Mono will always trail behind the latest developments in the .NET framework, why would you want to use Mono over another traditional open-source language/framework (Java)?
EDIT: Like someone mentioned below, I guess the root question is, why would you want to use .NET on the Linux platform?
when you run Mono. just() it creates immediately an Observable(Mono)and reuses it but when you use defer it doesn't create it immediately it creates a new Observable in every subscribe.
A Flux object represents a reactive sequence of 0.. N items, while a Mono object represents a single-value-or-empty (0..1) result. This distinction carries a bit of semantic information into the type, indicating the rough cardinality of the asynchronous processing.
The flatMapMany is a generic operator on Mono that returns a Publisher. Let's apply flatMapManyto our solution: private <T> Flux<T> monoTofluxUsingFlatMapMany(Mono<List<T>> monoList) { return monoList .flatMapMany(Flux::fromIterable) .log(); }
Mono#flatMap takes a Function that transforms a value into another Mono . That Mono could represent some asynchronous processing, like an HTTP request. On the other hand, Mono#map takes a Function that transforms a value of type T into another value, of type R .
The answer is pretty obvious: because you want to use .Net on Linux.
This of course begs the question (which I think is really what you're getting at): why would you want to use .Net on Linux (over Java)?
Lots of reasons:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With