Hi Pavel,
It's great to see JAX-RS picking up Java 9's Flow API (Reactive
Streams).
I'm not EG member but I wanted to share my perspective on Flow API
usage
with you.
Flow.Publisher et al are contract interfaces that define a very
specific
contract between publishers, subscribers, subscriptions and processors
along with a spec how the individual components should behave [0] and
TBCH,
it's nothing that should be touched from a change perspective.
`Publisher`
isn't intended to be used directly with User API but rather via
implementations such as Project Reactor, RxJava 2, Akka Streams and
others.
Introducing new interfaces makes it impossible for existing
implementations
to adopt JAX-RS-specific interfaces to just play well with your spec.
Reactive types are as-is. It makes no sense to add something like Mono,
Single or Maybe to your spec but it makes a lot of sense from the user
API
to use these types with the implementation (Jersey, Resteasy) together
with
a Reactive Streams implementation.
I'm also not a fan of seeing duplications of Flow inside of JAX-RS
because
of the aforementioned reasons.
Cheers,
Mark
[0]
https://github.com/reactive-streams/reactive-streams-jvm/tree/master/tc
k