Re: Streams and Blobs

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