Transaction is a monad.
summary
Claims that a database transaction can be modeled as a monad and practically composed with other effects, shows concrete code patterns in Kotlin and Java: transaction as a Monad implemented as a function that takes a lambda, uses jdbi + lambdas to open/commit/rollback, and composes with Optional/Either via map/flatMap to remove null checks and exceptions. Demonstrates a working REST setup without runtime bytecode magic (javalin example), and a homegrown research framework knee experimental effect that combines security, cache and transaction handling.
AI-written summary · about
chapters (8)
- 0:00Introduction and welcome
- 2:12Why functional programming matters
- 10:49Learning to avoid mutations
- 16:46Runtime magic pitfalls
- 24:54What is a monad?
- 31:14Monad theory deep dive
- 34:30Transactions as monads
- 42:54Conclusion and takeaways
related talks
39mDemystifying Monads with Java
48mUnlocking the Magic of Monads with Java 8
36mAn introduction to monadic structures and functional programming
16mBuilding payment processing engine with Stateful Functions and Spring Boot
35mThe Functor, Applicative, Monad talk
32mNarayana: Java library for transaction processing
26mReactive Java Programming: a new Asynchronous Database...
41mArchitectures Using Functional Programming Concepts
