The Wonderful Contextual World of Scala
summary
The talk examines how to carry and use request context in Scala backend apps to collect telemetry (request duration, initiating user/system, etc.). It compares classic Java-inspired techniques like MDC/thread-local with functional Scala alternatives (Reader, cats-effect, tagless-final, Tofu) and evaluates pros and cons of each approach.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 2:09Context problems in apps
- 4:16MDC for context
- 7:50Reactive programming and context
- 8:55Example: message web server
- 11:42Logging context in Scala
- 14:35Implicit context issues
- 16:21Explicit context via args
- 18:51Reader monad for context
- 22:24Reader for interfaces
- 26:18Business logic abstraction
- 30:10Adding context to app
- 33:21Final architecture with context
- 35:49Choosing context approach
- 37:36Q&A








