users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Adding SSE support to JAX-RS 2.1?

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Thu, 6 Mar 2014 10:49:50 -0500

On Mar 6, 2014, at 10:21 AM, Bill Burke <bburke_at_redhat.com> wrote:

>
>
> On 3/6/2014 9:18 AM, Santiago Pericas-Geertsen wrote:
>>
>> On Mar 6, 2014, at 8:59 AM, Bill Burke <bburke_at_redhat.com> wrote:
>>
>>>
>>>
>>> On 3/6/2014 8:46 AM, Santiago Pericas-Geertsen wrote:
>>>>
>>>> On Mar 5, 2014, at 3:07 PM, Bill Burke <bburke_at_redhat.com> wrote:
>>>>
>>>>> Honestly, I don't see why we should have support for this in JAX-RS. Let the servlet spec handle it.
>>>>
>>>> Would you mind elaborating on this? I don't know of many developers that would prefer to use servlets over JAX-RS for anything, including new features like SSE.
>>>>
>>>
>>> So, JAX-RS is no longer a REST framework, but now a replacement for servlets?
>>
>> No, but REST frameworks are becoming increasingly popular with thin-server architectures and browser clients. As a developer, it would feel awkward to move from JAX-RS to Servlets just to implement SSE for those clients.
>>
>
> What would be awkward is having support for a non-HTTP session-based protocol inside of a REST framework.

 I would agree. Except SSE _is designed_ to work on HTTP and it is how HTML5 clients use it. I think you're mixing up SSE with WebSockets. Please take a look at the specification:

http://www.w3.org/TR/eventsource/

-- Santiago