Notifications and lanes
NOTIFY (0x20)
Section titled “NOTIFY (0x20)”A fire-and-forget method invocation, in either direction.
- Header:
method(MUST),meta(MAY),seq(MUST whenresumeis granted). The lane is implied by the stream the frame travels on (§9.2). - Data section: arguments as a codec array, as in CALL. Each argument sits inside the array, so it nests at most 15 deep, and since the array holds no tags, an argument may hold up to 16 tags on a path, counted over the whole data section (§12.3).
- The receiver never replies. Errors (unknown method, bad arguments, handler failure) are logged by the receiver and otherwise ignored. A NOTIFY naming a
callmethod is handled like a NOTIFY to an unknown method; undecodable arguments follow §8.10. - The server authorizes each client NOTIFY like a CALL (§8.2, check 5); an unauthorized NOTIFY is dropped and logged.
- Delivery: at-most-once without resumption; with resumption, in-order and exactly-once within a lane for the lifetime of the session.
- Server → client notifications are the result of server-side targeting (§13). Client → server notifications invoke server methods declared with notification semantics in the contract.
Lanes (capability lanes)
Section titled “Lanes (capability lanes)”A lane is an ordering domain for notifications. Notifications on the same lane are delivered in send order; different lanes are independent.
- Lane 0 is the control stream and is always available.
- WebTransport: a sender opens a unidirectional stream for lane N (N ≥ 1) the first time it uses it; the first frame is
LANE_OPEN {8: N}, followed by NOTIFY frames without alanekey. Lane streams stay open for the transport’s lifetime and are reopened after resumption (§7.8). A FIN or reset of a lane stream is a transport loss (§7.7), as for the control stream (§6.2). - WebSocket: a sender opens a lane stream for lane N with a new stream ID (§6.1) whose first frame is
LANE_OPEN {8: N}, followed by NOTIFY frames, exactly as on WebTransport. Lane streams are accepted for compatibility but give no independence, because TCP delivers everything in order. - Lane numbers are 1 to 16, a fixed protocol value; senders choose them (typically by hashing a key such as a document ID into 1 to 16). A LANE_OPEN for lane 0 or a lane above 16, or a second LANE_OPEN for a lane already open on the current transport, is a PROTOCOL_ERROR.
- Sequence numbers (§7.8) are per lane. LANE_OPEN is not sequenced; it is sent first on every lane stream, including streams reopened after resumption. The first NOTIFY on a lane has seq 1.
- Within a lane, the receiver runs notification handlers one at a time in delivery order: a handler starts after the previous one on the same lane has completed, including its asynchronous completion. Applications that need parallelism spread notifications over lanes.