03:19
<gingeh>
okay, done 👍️
06:23
<Marius Kleidl>

Hello everyone, I'm looking for some advice on using streams. We're maintaining a library for resumable uploads and want to allow our users to upload discrete data objects (e.g. Blob, TypedArray) as well as readable streams. When a readable stream would be uploaded, its chunks are passed to the network while also buffering some data in memory to allow retransmission in case of a network interruption. To optimize the buffering, we could take advantage of readable byte streams to avoid copying data, although the process would also work with "normal" streams.

I'm currently debating whether the library should accept ReadableStream instances from the users or reader instances (ReadableStreamBYOBReader/ReadableStreamDefaultReader). As far as I have seen, there is no way to tell if a ReadableStream is a byte stream or not (or is there?). If the library were to accept ReadableStreams, we would have to require users to specify the stream type manually in a separate option to know if we can use BYOB readers. On the other hand, if the library accepts reader instances directly, we can use instanceof to check its type. However, this pushes the responsibility of creating the reader onto the user.

I've searched through existing Web APIs to find precedence for places where streams are accepted as arguments/options and only found the Fetch API so far, where the request body can be a ReadableStream (not a reader). So this doesn't seem to be a common pattern. Some APIs integrate streams by exposing a writeable stream that users can pipe to, but this would be cumbersome to implement in our current API, hence this wouldn't be my first choice right now.

Do you have some guidance on how libraries should consume readable streams in these case? Thank you very much in advance!

07:27
<annevk>
Mattias Buelens Domenic ^^
09:50
<acr>
There is a lot going on with the use of hardware-accelerators on the Web, I wish there was a centralised discussion board.
12:57
<smaug>
Panos Astithas: The next WHATNOT might get a bit light attendance given that it is May 1st (well, technically already 2nd here).
12:59
<annevk>
Yeah, I was reminded of that today. Also goes for May 8 for me (special holiday this year in Berlin).
16:14
<Panos Astithas>
Yes, I thought of that, but assumed this would impact only Europeans and on May 1 we have the APAC+Americas meeting. Is May 1 a holiday in Asia too?
19:06
<annevk>
It impacts the Task Force meeting on May 1.
21:52
<Panos Astithas>
That is a good point. Alan Stearns should we skip this instance?
22:18
<Alan Stearns>
Panos Astithas: I’d be fine skipping this week. I don’t think there is anything on the agenda that can’t wait until the next one