Taking the plunge - a deep dive into streaming with fs2
summary
Shows concrete fs2 code: reading STDIN lines, mapping each to add a cat emoji and calling compile.drain; reading large files line-by-line (terabytes of cats) without loading memory; streaming DB query rows and printing; an HTTP service that uses parMapUnbounded to handle concurrent requests while serializing socket writes; a 1s heartbeat implemented by spacing effects; and a Weaver-style test runner that runs tests in parallel but aggregates logs and prints them in sequence. Uses Aquascape diagrams to visualize pulls and outputs.
AI-written summary · about
chapters (10)
- 0:00Streaming with FS2
- 5:26Event handling with Cats
- 15:39Data processing examples
- 19:55Database interactions
- 22:05Web server concurrency
- 29:06Time-based side effects
- 32:16Testing with Weaver
- 36:10Control flow paradigm
- 38:24Learning FS2
- 39:09Q&A on compile and drain
related talks
16mFS2 - CRASH COURSE
38mSketching streams with aquascape
44mThe Pierian Stream
28mStreams on top of Scala
49mStream Away with Scala
31mFUNCTIONAL EVENT-DRIVEN ARCHITECTURE
48mTaming & Composing High Performance Stream-Oriented Processing Systems
39mBetter, Faster, Stronger Streaming: Your First Dive into Flink SQL
