The notebook index
Post archive
8 posts in Protocols.
- A fast wire layout still needs a trust boundary
Cap’n Proto’s word-aligned layout supports efficient traversal, but a receiver still has to validate bounds and resource use. Serialization also says nothing by itself about who sent a message or what that sender may do.
- Promise pipelining removes a wait, not a dependency
Promise pipelining lets a client send a call against a result that has not arrived yet. It can collapse sequential network waits into one round trip, while preserving the dependency and its failure modes.
- Endianness belongs in the format, not in a lucky host assumption
Binary formats must specify byte order and layout instead of inheriting a machine’s memory conventions. A two-byte example shows why explicit endianness is more portable than native alignment assumptions.
- Testing a schedule cache across feed revisions
Include feed and revision in cache identity to isolate updated schedule data; demonstrate failed loads and pruning in memory.
- Parsing GTFS times beyond midnight
Parse GTFS service times as seconds from the service day’s start, allowing hours above 23 while rejecting malformed values.
- A byte stream does not know where your messages end
TCP delivers an ordered byte stream, so an application protocol must define message boundaries. A four-byte length prefix provides one simple framing rule, with explicit size limits and buffering for incomplete or coalesced frames.
- ActivityPub has actor identity, object identity and delivery identity
ActivityPub uses actors to identify accounts, objects to identify content, and activities to describe actions delivered between inboxes. Keeping those identities separate is central to reliable handling of retries.
- Changing a Cap’n Proto schema without renumbering history
Cap’n Proto field ordinals preserve a schema’s evolution history. Adding a field can keep old messages readable, provided the new declaration respects ordinal ordering and defaults.