A capability stays maintainable only when the team can explain every state, retry, and piece of residual data—not merely show one successful run. Reliable ordered delivery fits indispensable control messages but can block everything behind one loss. Partially reliable delivery fits transient state or chunks repaired by an application range protocol.
WebRTC decisions need evidence from both endpoints, negotiation versions, and the selected candidate pair. One browser callback cannot reveal glare, ICE route changes, or divergence after a peer refresh.
Questions the design must answer
Write the following choices as reviewable rules instead of scattering them across callbacks and UI conditions. Explicit rules make scaling, compatibility, and diagnosis less dependent on guesswork.
- Use a reliable ordered control channel for identity, task metadata, cancel, and completion.
- Bulk chunks may use unordered partial reliability only with IDs, gap detection, and selective repair.
- Cursor, bandwidth sample, and typing state use the latest value, making stale retransmission wasteful.
Reliability is part of the application contract, not a speed toggle. Define loss, ordering, and repair ownership before choosing DataChannel parameters.
Edge cases are part of the feature
An abnormal path is more than an error banner. It decides how in-flight work stops, how the peer learns the outcome, what residue remains, and whether the next operation inherits it.
- Control shares one reliable ordered stream with bulk data, so one lost chunk delays cancel.
- maxRetransmits is zero without application repair, silently corrupting files on weak networks.
- Peers disagree on channel parameters or capability, so negotiation succeeds while the feature cannot communicate.
Prove that it works with evidence
Build golden cases from known inputs and controlled faults, then align production metrics with those results. Verification extends to production only when signals detect the same degradation early.
- Lose one bulk chunk and verify control arrives immediately while only the missing range is repaired.
- Send cursors and progress over delayed reordered links and prove stale state cannot overwrite current state.
- Interop with a legacy peer that supports only one reliable channel and verify capability-based fallback.
The release standard is practical: the normal path is fast, abnormal paths converge, recovery never overrides an explicit user decision, and operators can diagnose faults from limited, privacy-safe evidence.