Kleisli, a Friend Who Means You Well
summary
A Scala talk describing the evolution of a rules engine from plain predicates to Either for errors, then to asynchronous Futures, an object-composite, and finally to a generic Kleisli-based design using Cats typeclasses. It shows that naive Future-based async implementation collapses throughput and increases allocations, while the Kleisli/Cats approach separates sync and async execution, recovers performance (meeting 50 ms latency and 500k req/s goals), and reduces per-rule allocations from ~1,800 to ~48 bytes.
AI-written summary · about
chapters (10)
- 0:00Start
- 12:19Problems
- 14:44Object-Oriented
- 23:06Composition
- 25:29Monoid on kind
- 32:05Domain Evolution
- 34:02Function on kind
- 45:58Performance
- 47:08Abstraction
- 47:34Opening
related talks
38mThinking Less with Scala
44mTelling the Truth with Types
36mKittens - datatype-generic functional programming with Scala
31mBoring use cases for exciting types
31mCool toolz in the Scalaz and Cats toolboxes
34mHow I learned to stop worrying and love Functional Design
35mIntroducing Typelevel Scala into an OO environment
42mFunctional interpreters and you
