Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Protocol Parsing and Sequence Recovery

Status Draft outlineSection Networking and I/O

A fast parser is useless if it silently accepts corrupt frames or advances application state across missing sequence numbers.

Planned model

Deliver fragmented, duplicated, reordered, missing, and malformed messages. Track framing state, expected sequence, gap detection, buffering, recovery, and resumption.

Questions

  • Which validation occurs before any state mutation?
  • How are duplicates and gaps distinguished?
  • When should live processing pause, buffer, or continue provisionally?

Exercise

Specify a feed-state machine from startup through synchronization, normal processing, gap recovery, and unrecoverable failure.