Application protocols as state machines

Analyze framing, multiplexing, caching, streaming, and retry semantics as contracts between independently failing participants.

10 published lessons1 module251 min of guided study
  1. 01
    Application protocols as state machinesadvanced · 10 lessons

Follow the path or begin with a question. Every lesson is open.

Your notebook0 of 10 lessons completed

Your place, at your pace. Progress is optional and saved only in this browser when available.

Inside this module

Each lesson includes an interactive lab

Application protocols as state machines

Analyze framing, multiplexing, caching, streaming, and retry semantics as contracts between independently failing participants.

  1. 01

    Message boundaries come from parser state, not socket reads

    Design incremental framing with explicit size limits, completeness rules, and consistent interpretation across intermediaries.

    24 min
  2. 02

    A connection pool is a bounded resource and a waiting policy

    Reason about safe HTTP connection reuse, pool occupancy, acquisition deadlines, idle races, and multiplexed concurrency before increasing connection counts.

    24 min
  3. 03

    HTTP/2 multiplexes streams with two levels of DATA credit

    Track per-stream and connection-level flow-control windows while separating stream concurrency, frame limits, and underlying TCP ordering.

    25 min
  4. 04

    HTTP/3 maps requests onto QUIC streams without erasing dependencies

    Trace request streams, QUIC receive limits, control streams, and QPACK dependencies while distinguishing independent ordering from independent resources.

    25 min
  5. 05

    Freshness and validation answer different cache questions

    Calculate response age, select the correct stored variant, and distinguish fresh reuse, conditional validation, storage prohibitions, and eviction.

    25 min
  6. 06

    A resource can have multiple representations and cache identities

    Reason about media types, content codings, quality values, Vary matching, and the capacity cost of serving correctly selected representation variants.

    24 min
  7. 07

    A gRPC deadline bounds waiting, not uncertainty about side effects

    Allocate request budgets across hops, interpret final gRPC status separately from HTTP status, and preserve ambiguity when cancellation races with committed work.

    25 min
  8. 08

    Closing one sending direction can leave useful work in the other

    Trace streaming message boundaries, request half-close, final response status, backpressure, and cleanup without confusing EOF with cancellation.

    25 min
  9. 09

    Safe retries need a durable operation identity

    Design a bounded deduplication contract with scoped keys, request fingerprints, atomic effect recording, concurrent-attempt behavior, and explicit retention limits.

    27 min
  10. 10

    Compatibility is a matrix of versions, states, and failure paths

    Build protocol conformance evidence from incremental parsing, rolling-version pairs, unknown fields, failure injection, and semantic invariants rather than happy-path round trips alone.

    27 min
All engineering modules