Binary protocol surface
Define a fixed frame header, frame types, byte order, payload rules, checksum policy, protocol documentation, and generated layout output.
Build a local TCP gateway that accepts custom binary frames, parses partial socket chunks, rejects malformed clients, applies sink pressure, forwards events, exposes metrics, and writes reports from real load runs.
$ npm run protocolPrints the binary header and validation rules.
$ npm run server -- --port 41234Starts the TCP listener with explicit flags.
$ npm run client -- --port 41234 --name user.loginSends one valid frame through the parser.
$ npm run server -- --sink file --slow-sink-ms 10Makes sink backpressure part of the run.
$ npm run gateway -- metrics --port 9090Checks the runtime counters from the outside.
Define a fixed frame header, frame types, byte order, payload rules, checksum policy, protocol documentation, and generated layout output.
Build client tooling that writes frames, server parsing that reads them, and test paths that prove round trips, partial chunks, and combined buffers.
Forward normalized events to NDJSON files or HTTP targets while tracking queue pressure, drain events, retries, timeouts, drops, and socket pause/resume counts.
Expose live gateway state, persist metrics samples, run multi-client load, track ACK latency when enabled, and generate Markdown plus HTML reports from actual run data.
Each phase adds one observable gateway capability and one artifact to inspect. Click any phase to expand it.
A runnable gateway shell with command modes, help output, source folders, report folders, and strict top-level flag handling.
A documented 24-byte binary frame contract with shared constants and generated protocol layout output.
A client encoder, hex inspection path, and tests that prove the frame bytes match the protocol contract.
A complete-buffer decoder with controlled protocol errors and round-trip coverage against encoded frames.
A TCP server that accepts clients, records opens and closes, counts raw bytes, and reports bind or socket failures cleanly.
A working end-to-end byte path from client encoder to TCP server with matching sent and received byte totals.
A stateful parser that survives arbitrary chunk boundaries and emits exactly one event for one complete frame.
A parser that handles coalesced frames, preserves incomplete tails, and reports frame counts that match client sends.
A gateway that rejects malformed frames through controlled errors while keeping the server process available.
Connection reports with close reason, duration, counters, error counts, and idle-timeout behavior.
A disk sink that bounds JavaScript buffering and reports file pressure through pause, resume, drain, and latency counters.
An HTTP forwarding path with bounded queues, retry accounting, timeout accounting, and visible outbound pressure.
Live and persisted metrics that line up with small load tests, sink counters, and connection state.
A final shutdown report that records what drained, what closed, what dropped, and which resources were forced closed.
A load report that ties client-side throughput and errors to gateway-side metrics, pressure, and malformed-frame policy.
A final protocol gateway report in Markdown and HTML, backed by actual load, metric, connection, error, and shutdown data.
Lab 07 turns protocol rules, connection state, malformed input, sink pressure, HTTP delivery, metrics, shutdown, and load results into files a developer can inspect after the run.
docs/protocol.mdwire format, frame types, and validation rulesdata/events.ndjsonnormalized file-sink event recordsdata/http-received.ndjsonevents accepted by the local receiverconnections.jsonlconnection lifecycle and close reasonsprotocol-errors.jsonlmalformed frame evidence by error codemetrics.jsonlgateway samples captured during runtimeload-latest.jsonthroughput, latency, errors, and pressureprotocol-gateway.htmlfinal human-readable gateway reportBuy a single volume or lock in every volume at once. Switch between one-reader pricing and team licenses for up to 25 members.
Volume I as EPUB, light and dark PDFs, slides, cheatsheets, and future updates.
Volume I Labs plus its downloadable bundle in one purchase. Save $9.99 vs buying the Digital Bundle and Labs separately.
Volume I long-form builds with checkpoints, hints, debugging notes, and expected output.
The bundle includes seven runtime projects covering process observation, binary storage, streams, module resolution, file watching, async orchestration, and custom protocols.
Lab 07 is included in the Labs bundle and in NodeBook Pro, alongside six more complete runtime projects.