W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: Streams and Blobs

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 28 Feb 2013 08:58:20 -0600
Message-ID: <CABirCh-eBH+m1qa+rUmXFRUvu0Ev1+fcLx=xiymc9xiJC3k=XQ@mail.gmail.com>
To: Darin Fisher <darin@chromium.org>
Cc: Aaron Colwell <acolwell@chromium.org>, Tillmann Karras <tillmann@selfnet.de>, "WEBAPPLICATIONS (WEBAPPS) WORKING GROUP" <public-webapps@w3.org>
On Thu, Feb 28, 2013 at 12:13 AM, Darin Fisher <darin@chromium.org> wrote:

> It's a fair question, and I think you've made a lot of good points.  I
> think XHR gives you the ability to customize the HTTP request.  You can set
> custom request headers, customize the request method, control cross-origin
> behavior, etc.  It gives the developer a lot of flexibility.

I just think the complexity hasn't been justified with actual use cases for
that flexibility.

 Another thing not to lose sight of is that a Stream abstraction could be
> useful as an optimization tool.  There are times when a developer just
> needs to connect a data stream from a provider to a consumer and doesn't
> necessarily care about seeing the raw bytes.  (The data may not even be
> available in the address space of the process running the developer's
> script.)  So, I can imagine some optimization opportunities when we work
> with a handle to a stream of data rather than the data itself.

Blob is already a handle to data that can be passed around without having
the data it represents in memory.  It's ArrayBuffer that usually represents
actual, in-memory data.  Blob is already meant to allow these optimizations.

On Thu, Feb 28, 2013 at 1:07 AM, Travis Leithead <
travis.leithead@microsoft.com> wrote:
> Also, the Stream object lets you pipe the data from to/from Web Workers,
which can be handy in certain scenarios.

What's wrong with just posting a Blob or ArrayBuffer?

Glenn Maynard
Received on Thursday, 28 February 2013 14:58:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:58 UTC