Serialization Protocols with Scala
summary
Advises do not use Java/Scala serialization because it leaks implementation details, is insecure and brittle for evolution. Compares four practical choices: Protobuf (proto3 + ScalaPB) for compact binary messages with numbered fields and decent evolution; Thrift/Scrooge as a heavier RPC+protocol stack; Avro for big data files with embedded writer schema or Confluent schema registry for small-message optimization; Kryo for maximum speed and density — Kryo is smallest and fastest (example: Kryo 16 bytes vs Thrift 32 bytes) but lacks schema evolution.
AI-written summary · about
chapters (10)
- 0:00Start
- 2:47Distributed Systems Are about Protocols Not about Implementations
- 12:19Performance
- 16:42Backwards Compatibility
- 17:52Protobuf
- 24:03Recap
- 24:29Thrift
- 31:47Avro
- 34:21Cryo
- 37:26Simple Binary Encoding
related talks
23mEffective Protobuf: Everything You Wanted To Know, But Never Dared To Ask
48mChoosing the Right Technology for your API
31mRPC Frameworks Overview
29mTHE LAST FRONTIER AND BEYOND
28mDesigning Payloads for Event-Driven Systems
38mAdvanced API Design for Scalable Distributed Systems
37mProtobuf and buf: glamour, misery, and import substitution
46mREST API vs gRPC, which one should you use in breaking a monolith
