CATS EFFECT - DISPATCHER, SUPERVISOR, IOLOCAL
summary
Three concrete recipes use Cats Effect 3 primitives to solve real problems: building a resource-safe websocket client by supervising a background consumer so it is canceled on scope exit, translating a callback API into an FS2 stream using a Sequential Dispatcher preserves ordering (and is faster and safer than unsafeRunSync), and thread-local style contextual logging via IOLocal where forked fibers inherit but do not propagate changes back to parents. Examples compile and run; CE3 3.4 contains recent updates.
AI-written summary · about
chapters (9)
- 0:00Start
- 3:48Cats Effect Recipes
- 4:33Web Socket client
- 5:24fs2 Stream from callbacks
- 9:01Threads vs Fibers
- 13:02Fibers are low-level
- 14:01Structured Concurrency
- 16:45Creating a Supervisor
- 30:26Closing remarks
related talks
40mCats Effect 3
36mConcurrency with Cats-effect
31mPick a (Effect) Lane: A comparison of direct-style Scala vs effect systems
36mResource Management Made Easy: Introducing Resource from cats-effect Library
44mThe Pierian Stream
01h 00mScala. The War of Effects. ZIO vs Cats Effect
28mAdopting Cats
36mThe Good, The Bad, and the Ugly: A Journey from this synchronized to Asynchronous Code
