Request For Support of N-Tuples and N-Functions

12 views
Skip to first unread message

Léonard Schneider

unread,
Mar 21, 2017, 5:10:51 PM3/21/17
to reactor-framework
Hi,

As reactor is FP oriented, I believe it would be useful to be able to use N-Tuples and N-Functions (which should really be part of JDK IMO). You have an example of that in JOOL (https://github.com/jOOQ/jOOL). This would allow to write async scatter-gather patterns in an elegant way, e.g.

Mono.just(1)
  .and(Mono.just("x"))
  .and(Mono.just(true))
  .flatMap((x, y, z) -> myFunction(x, y, z))
  .single();

BR,


Leo

Stephane Maldini

unread,
Mar 22, 2017, 8:19:06 AM3/22/17
to Léonard Schneider, reactor-framework
You can post that idea on our issue tracker it has been requested actually by one of our power user (https://github.com/cloudfoundry/cf-java-client) so it could in fact be a valid addOn. In general adding more noise to Flux could be a concern, the RS spec only allows one argument passing method with onNext and Tuple aims to relieve a bit the user of this constraint.

It's also a good idea for language extensions like https://github.com/reactor/reactor-kotlin and https://sinwe.github.io/reactor-core-scala/.

--
You received this message because you are subscribed to the Google Groups "reactor-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reactor-framework+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Stephane Maldini | Project Reactor Lead, Spring Engineering | London | Pivotal

Reply all
Reply to author
Forward
0 new messages