w3c / webtransport

WebTransport is a web API for flexible data transport
https://w3c.github.io/webtransport/
Other
838 stars 51 forks source link

Clarify what sending "completed" means e.g. wrt. flow control #571

Closed jan-ivar closed 10 months ago

jan-ivar commented 10 months ago

The SendStream write algorithm says: "Send bytes on stream.[[InternalStream]] and wait for the operation to complete."

But what does "complete" mean?

  1. it's been buffered for sending?
  2. it's been put on the wire?
  3. the receiver has acked it?

    A non-normative note suggests it's "not necessarily" 3 and "may just" be 1:

image

I think we more strongly need to say it's not 3. I think we more strongly need to say it's not 2.

This avoids blocking on the network process, which would be great.

At minimum, "complete" must be beyond the last point of local failure, because the write promise has been resolved. I.e. 1.

Flow control

But atomic writes in #551 fail if blocked on flow control, putting the last point of local failure past flow control. IOW:

Does the same invariant hold for non-atomic writes?

I think it needs to be 1 and yes for symmetry and sanity. I.e. "complete" means

  1. it's been buffered for sending and has passed flow control

We should clarify that.

aboba commented 10 months ago

This seems like a duplicate of #426.

jan-ivar commented 10 months ago

Meeting: