Futures: Twitter vs Scala
summary
Compares Twitter Futures and Scala Futures by naming concrete features and tradeoffs: Twitter Futures use local scheduling via a tiny thread‑local scaler to reduce context switches and boost throughput in Finagle, implement promise link compression (root linking) to allow unbounded future recursion without heap growth, and expose interrupts and locals so cancellations, request timeouts, and request‑scoped context propagate and can be serialized over the wire. Scala 2.12 adds similar root compression; the Twitter implementation is simple (<100 lines for key pieces) and proven in production.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 3:35Future implementation
- 4:35Local scaling
- 10:23Scala 212
- 10:47Interrupt
- 17:13Conclusion
related talks
24mHow Twitter teaches Scala
49mTrading in Futures
30mDistributing systems in Scala with Fiangle
23mEffects types in Scala - how to choose one
30mDistributing systems in Scala with Fiangle
50mTwitter’s Quest for a Wholly Graal Runtime
45mSimplifying Asynchronous Code With Scala Async
27mComputation Expressions in Scala
