Building Distributed Applications in OCaml
summary
OCaml code for real blockchain software uses explicit techniques not handwaving: content-addressed storage with digests for persistent DAGs, ppx-derived (un)marshaling to avoid 30% of boilerplate marshaling code, monads (state error future) for effect discipline, higher-order modules to swap in-memory versus persistent Patricia tries, lenses and zippers merklify in about seven lines to produce logarithmic Merkle proofs, and pragmatic tradeoffs (uses LWT but prefers Jane Street ecosystem) with concrete gains and costs.
AI-written summary · about
chapters (13)
- 0:00Introduction and motivation
- 2:09Types in action: marshalling
- 8:10Monotonic functional programming
- 13:05Lenses and zipper abstractions
- 16:07Merkle proofs and efficiency
- 17:56Benefits and costs of types
- 20:39Debugging and refactoring
- 24:36Performance and monads
- 26:13Typing future improvements
- 29:48Compiler reflection and macros
- 33:40Virtualization and security
- 35:36Conclusion and fable
- 40:01Q&A session
related talks
26mAn Invitation to OCaml
18mDistributed Actors in OCaml
46mOCaml for Fun & Profit: An Experience Report
01h 18mA Tale of Two Lambdas: A Haskeller's Journey into OCaml
32mEffective Programming in OCaml
30mDHT, BFT, OMG: Know Your Building Blocks for Decentralized Applications
45mFunctional Smart Contracts
19mChorCaml: Functional Choreographic Programming in OCaml
