dev@jsr311.java.net

RE: JSR311: Problem with StreamedOutput model

From: Jerome Louvel <jerome.louvel_at_noelios.com>
Date: Fri, 14 Mar 2008 12:19:27 +0100

Hi Bill,

My understanding of AJAX polling is that you don't have a pending HTTP
request running waiting for some potential content. It is that the AJAX
client regularly sends a HTTP request to the server to look for new events.
In this scenario, we could take advantage of conditional GETs to optimize
response times.

Maybe you are referring to the Comet style? Here the post defining Comet:
http://alex.dojotoolkit.org/?p=545

Anyway, in both cases, I don't see how deferring the response status/headers
writing would really help. Could you explain?

Also, I don't think that JAX-RS should aim at supporting the Comet style, at
least not initially.

Best regards,
Jerome

> -----Message d'origine-----
> De : Bill Burke [mailto:bburke_at_redhat.com]
> Envoyé : jeudi 13 mars 2008 00:57
> À : dev_at_jsr311.dev.java.net
> Objet : JSR311: Problem with StreamedOutput model
>
> Ok, I believe there is a problem with the streamed output
> model. Let's
> go back to the Ajax Polling usecase where the client does a GET and
> waits and waits and waits for a response. What if we want to
> allow the
> client to specify a timeout? The StreamedOutput interface requires a
> commit of the status and headers, correct? So, in our
> background asynch
> writes, there would be no way to timeout and send back the
> appropriate
> HTTP Response code.
>
> Are you following me?
>
> I guess a solution to this would be to not commit until something is
> written to the OutputStream and allow a WebApplicationException to be
> thrown. The same is already done for MessageBodyWriter's correct?
>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>