Repository navigation
sctp: no way to bound message age without also enabling retransmission #236
Closed
realzoberg
started this conversation in
Ideas
Replies: 1 comment
|
please submit issue for it, instead of discussion, I don't think discussion is right place for this |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
A DataChannel can be told never to retransmit (maxRetransmits: 0) or to bound how long a message may live (maxPacketLifeTime: N), but not both: the two are mutually exclusive, and timed reliability permits retransmission inside its window.
For any latency-sensitive, loss-tolerant payload the combination you actually want is "never retransmit, and never send anything older than N". Late data is not useful data — the receiver has already moved on, and re-sending it spends uplink precisely when the path is congested. That applies to game and simulation state, input and cursor synchronisation, telemetry and sensor streams, and real-time control: anywhere a fresher message supersedes a stale one.
I would like to propose a small, local, wire-invisible way to express it, reusing the machinery #233 already added.
Proposal
An optional per-message deadline, orthogonal to ReliabilityType. It composes with maxRetransmits: 0 instead of replacing it, so an application can have both "never retransmit" and "never send anything older than N".
A. Per-send deadline (my preference — smaller surface)
or an optional field on a small params struct, so the existing signatures stay as they are.
B. Per-channel maximum age
Nicer at the call site, but it extends a W3C-shaped struct, which I assume you would rather not do lightly.
Either way the enforcement is the code already merged in #233: created_at on the chunk, and expiry in pop_pending_data_chunks_to_send before the window checks and before a TSN is allocated. This adds a second trigger to that path, not a new subsystem.
Properties
Happy to implement whichever shape you prefer, with regression tests in the same style as #233.
All reactions