Purely functional gRPC and HTTP/2 with OCaml
summary
Reimplements HTTP/2 and gRPC in OCaml to fix a memory leak in the prior HTTP/2 stack and to be compliant to the latest spec, replacing tangled legacy logic with a pure state‑to‑state event loop that composes into a gRPC channel. Uses effects and bigarrays for performance, modular parsers (Armstrong and Faraday), and a handler model that returns actions (write, close, update context). Deployed at Dialo for voice AI, handling hundreds of concurrent calls and running in production; libraries are open source.
AI-written summary · about
chapters (9)
- 0:00Introduction and context
- 1:43Identifying the problem
- 4:21Revising the architecture
- 6:55Design goals and HTTP/2 basics
- 9:40Immutable state event loop
- 12:26Functional stream handling
- 16:17Connection management
- 18:50Integration and final API
- 21:42Q&A and concluding remarks








