W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: [XHR2] Streamed send or receive

From: Wenbo Zhu <wenboz@google.com>
Date: Fri, 21 Oct 2011 10:52:58 -0700
Message-ID: <CAD3-0rPr8F2ZLBGCfg0mNvReaauKnokrLxkO7T+w4W6RKKOtug@mail.gmail.com>
To: Henri Sivonen <hsivonen@iki.fi>
Cc: public-webapps@w3.org, Ian Hickson <ian@hixie.ch>
Thanks for the information!

My understanding is that browsers have already been delivering streamed
responses in chunks (Transfer-Encoding), so it makes a lot of sense to
expose such a semantics explicitly through the XHR2 API.

Streamed requests are equally important, e.g. for use cases such as voice
translation, to allow the server to receive and process POST data in
parallel.

In short, can we improve the XHR2 API to expose the standard HTTP semantics
of sending or receiving chunked request/response data?

- Wenbo




On Thu, Oct 6, 2011 at 1:43 AM, Henri Sivonen <hsivonen@iki.fi> wrote:

> On Thu, Oct 6, 2011 at 10:57 AM, Wenbo Zhu <wenboz@google.com> wrote:
> > I'd like to hear from the WG if the following use cases or issues have
> been
> > discussed before.
> > 1) When onreadystatechange is invoked as new response data is being
> > received, currently there is no way to clear any buffered responseText
> > (alike) that has already been consumed. The lack of such a capability
> will
> > force the server to disconnect to avoid memory overflow on the
> client-side,
> > e.g. when the server is streaming a large volume of text or binary data
> to
> > the client.
>
> This problem has been solved in Firefox Aurora by adding chunked text
> and chunked ArrayBuffer response types:
> https://bugzilla.mozilla.org/show_bug.cgi?id=687087
>
> --
> Henri Sivonen
> hsivonen@iki.fi
> http://hsivonen.iki.fi/
>
Received on Friday, 21 October 2011 17:53:22 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:48 GMT