RFR [11] 8197564: HTTP Client implementation - JEP 321
Simone Bordet
simone.bordet at gmail.com
Mon Apr 2 12:09:34 UTC 2018
James,
perhaps I was not clear enough.
The JDK will offer an API based on RS, so that's a user-facing API.
Given that, the question is whether the surface of exposition to users
when they want to use the JDK HttpClient API should be limited to
Publishers, or expanded to Publishers, Subscribers and Processors.
My suggestion was to limit it to Publishers only.
Forcing users to implement Subscribers or Processors (because that's
what the API requires, despite having a few utilities that cover the
common cases) is way more difficult for users than just passing around
a Publisher.
It is by exposing Publishers only that you get rid of the need for
users to implement any of the RS interfaces to interoperate with other
libraries.
I'm not sure I buy your opinion on the RxJava2 and Reactor libraries (peace! :)
Both have plenty APIs to create a Flowable/Flux from Publishers, and
almost none to handle Subscribers: Publishers are exposed, Subscribers
hidden.
I don't see any confusion.
Thanks !
--
Simone Bordet
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz
More information about the net-dev
mailing list