PresentationLayer Serialization
OSI Layer 6: how data is encoded/formatted for transmission — JSON vs Protobuf vs MessagePack, character encoding, compression — distinct from encryption (Security) and API contract shape (APIDesign).
Why we need this / what value this brings
The wrong serialization format can dominate both payload size and CPU cost, especially at scale or on constrained clients.
When to use this
JSON by default for anything human-debuggable or public-facing; a binary format (Protobuf) only once payload size/parse speed is a measured problem (e.g. internal gRPC calls).
How to use or implement this
Start with JSON; if switching, benchmark actual payload size and parse time on your real data before committing, and turn on gzip/brotli compression at the transport layer as a cheaper first win.
Research questions
- JSON vs Protobuf: what's the actual size/parse-speed trade-off, and when does it matter enough to leave JSON?
- Where does gzip/brotli compression get applied in the request path, and what does it cost in CPU vs save in bytes?
Empty folder — drop notes, links, and findings here as you research.