Santiago,
please don't feel personally offended, but I actually do not like to get rushed now into three topics at the same time just because the spec leads had been making themselves rather scarce in the past months and now feel stressed in the face of an imminent renewal ballot by the JCP PMO. We have to study your proposals and think about AT LEAST some days, and we all have work to do already, so please let's slow down a bit. In the end all the discussions had been started already months ago, and it was neither Bill nor Sergey nor me who suspended them for months. I do not believe that we will do anybody a favor when rushing fences, particularly in the face of the recent discussion regarding why we have an unintuitive path matching algorithm. It is a proof that slowing down A BIT really is better than acting hastily when it comes to API design and specs, right?
-Markus
From: Santiago Pericasgeertsen [mailto:santiago.pericasgeertsen_at_oracle.com]
Sent: Montag, 12. Oktober 2015 16:30
To: jsr370-experts_at_jax-rs-spec.java.net
Subject: Drafts for Rx, NIO and SSE
Dear Experts,
My apologies for sending all these drafts in one shot, but I feel we need to start making progress quickly if we want to produce an EDR in a few months.
The following pull request [1] includes proposals for Rx, NIO and SSE. Let me point you to the examples to get you started:
(1) Rx:
https://github.com/spericas/api/blob/master/jaxrs-api/src/test/java/javax/ws/rs/core/RxClientTest.java
This is an extension to our Client API that integrates with the CompletableFuture API in JDK 8 (note that CompletionStage is a super type of CompletableFuture). The proposal is extensible and can use other APIs similar to CompletableFuture —see the optional parameter to the rx() method for that purpose. The spec will only mandate support for CompletableFuture, but implementations are free to provide support for other APIs, such as RxJava.
(2) NIO:
https://github.com/spericas/api/blob/master/examples/src/main/java/jaxrs/examples/nio/FileResource.java
https://github.com/spericas/api/blob/master/examples/src/main/java/jaxrs/examples/nio/FileResourceClient.java
On the server side, the proposal follows the pattern set by StreamingOutput, but of course using lambdas this time around. As you know, Servlet already supports NIO, but with a completely different API.
(3) SSE:
https://github.com/mpotociar/api/tree/master/examples/src/main/java/jaxrs/examples/sse
Note that like in NIO, there are proposed extensions to both the Client and Server APIs for SSE.
I understand that this is a lot to digest, so feel free to start new e-mail threads to discuss each one independently. I just felt it was important to start all these discussions ASAP.
— Santiago
[1]
https://github.com/jax-rs/api/pulls