WebTransportWriter: atomic writes and reliable stream reset
- Category
- Network / Connectivity
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
WPT details: Dedicated behavioral WPT coverage has not yet been added. Tests are planned for interface exposure and writer locking, flow-control rejection without stream failure, ordering of queued () followed by abort, connection-failure behavior, and Window and Worker exposure. This field will be updated when those tests land upstream.
Summary
Adds the WebTransportWriter interface for outgoing WebTransport streams. WebTransportSendStream.getWriter() returns a specialized writer extending WritableStreamDefaultWriter with two methods. atomicWrite(data) admits the complete write only when sufficient stream and connection flow-control credit is available; if the complete chunk does not fit, none of it is admitted and the stream remains usable. commit() marks successfully written bytes as a reliable prefix to be transmitted if the stream is subsequently aborted, provided the connection remains available. Atomic writes help prevent application-protocol flow-control deadlocks, but they do not preserve message boundaries or guarantee delivery in a single network packet.
Motivation
Applications commonly implement framed protocols over WebTransport streams. A normal stream write can be accepted only partially at the transport layer, which can cause a flow-control deadlock when the peer needs the complete frame before it can process data and release more credit. atomicWrite() provides all-or-nothing admission for these writes. commit() enables partial reliability: an application can commit an important prefix and later abort an obsolete suffix without losing the committed data. These capabilities are useful for real-time media, games, remote access, and other latency-sensitive applications.
Standards & signals
- Specification: https://w3c.github.io/webtransport/#webtransportwriter
- Firefox: No signal
- Safari: No signal
- Web developers: No signals — No formal signal requested yet. The feature addresses framing deadlocks and partial-reliability use cases raised during WebTransport API development.
- Tracking bug: https://issues.chromium.org/issues/487117768
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=webtransportwriter-atomic-writes-and-reliable-stream-reset
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+WebTransportWriter%3A%20atomic%20writes%20and%20reliable%20stream%20reset
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=WebTransportWriter%3A%20atomic%20writes%20and%20reliable%20stream%20reset
- Baseline status: https://webstatus.dev/?q=WebTransportWriter%3A%20atomic%20writes%20and%20reliable%20stream%20reset
Explainers: https://github.com/w3c/webtransport/blob/main/explainer.md#9-transactional-writes-and-reliable-reset