Server-side network protocol
summary
Prototype server implements Postgres v3 on the wire using Erlang, demonstrating concrete decoding and encoding code, a connection handler that coalesces/splits TCP chunks, and a separate protocol state machine built with gen_statem. Examples show binary pattern matching to parse length-prefixed messages, use of i/o lists to avoid memcpy, handling ambiguous authentication tags, and returning correct row description/data/command-complete sequences; the prototype works and exposes performance and metadata-integration tradeoffs.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 0:34Project background
- 1:57Client library
- 2:37Project overview
- 4:22PGV3 messages
- 5:23Exceptions
- 6:23Binary pattern matching
- 8:17Message decoding
- 10:53Null terminated strings
- 12:46Lists of integers
- 14:04List of bytes
- 14:20Unit
- 16:36Bind
- 19:00Decode
- 25:13Connection Handler
- 26:43Message Language
- 36:47Jen Stadium
- 41:21Summary
- 41:52Challenges
- 42:44Lessons Learned
- 44:09Closing
related talks
01h 01mStructured Networking
57mStructured Networking in C++
24mHow We Built Protosockets to Go Beyond HTTP and gRPC
46mCurio Collection of Web Protocols
47mReliving the History of Multiplayer Games
25mBuild custom protocols with Ranch and msgpack
01h 21mTutorial: Developing High-performance Networking Applications
25mWhat the Web can Learn from Video Game Networking
