users@jax-rs-spec.java.net

[jax-rs-spec users] Re: Drafts for Rx, NIO and SSE

From: Markus KARG <markus_at_headcrashing.eu>
Date: Wed, 14 Oct 2015 23:29:16 +0200

Santiago,

 

seems I misunderstood the tone of your email, particularly the word "quickly". Good to know that my impression was wrong and we have time to study and discuss calmly. :-)

 

And thanks for your kind reminder! Good to know that all EG members can provide API proposals but not only the spec leads. This sounds democratic. So I will post the feedback I collected from the community in the next days. :-)

 

Just to be clear: Does that mean you actually did not post your proposals earlier because you wanted us to volunteer? Seems I simply missed that call for papers. :-(

-Markus

 

 

From: Santiago Pericasgeertsen [mailto:santiago.pericasgeertsen_at_oracle.com]
Sent: Mittwoch, 14. Oktober 2015 23:14
To: jsr370-experts_at_jax-rs-spec.java.net
Subject: Re: Drafts for Rx, NIO and SSE

 

Markus,

 

 First, the discussions about the algorithm are completely orthogonal, so let’s not mix things. The algorithm has been like that since version 1.0.

 

 As for the rest, I am not rushing anyone. I just felt that we needed to make some progress so I started sharing this material. If you look at my message, I haven’t asked you to review this by any specific date; quite the opposite I acknowledged there was a lot of material to review. So I don’t understand your point “about AT LEAST some days”. I’ve mentioned to try do an EDR “in a few months”.

 

 Lastly, I remind you that anyone in the EG can provide proposals for any of the topics in our charter. It is not exclusively up to the leads to do so. In other words, you could have volunteered to research any of these topics as well during the last few months.

 

— Santiago

 

On Oct 14, 2015, at 4:58 PM, Markus KARG <markus_at_headcrashing.eu> wrote:

 

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> 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/FileResource.java

 <https://github.com/spericas/api/blob/master/examples/src/main/java/jaxrs/examples/nio/FileResourceClient.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> 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> https://github.com/jax-rs/api/pulls