Towards blocking streams
summary
Shows how to build blocking, back-pressured local streams using Java 21 virtual threads and channel primitives reimplementing the Kotlin algorithm, with a runtime-free model called Ox / jocks that preserves full stack traces. Demonstrations include creating 10 million threads in under 2s, a benchmark of 10k pairs × 100k messages per pair comparing jocks, Kotlin and Java queues (all similar; Go slightly faster), and working examples of merge, zip, throttling and blocking IO that run and propagate errors cleanly.
AI-written summary · about
chapters (11)
- 0:00Introduction and motivation
- 1:58Reactive streams refresher
- 8:16Java 21 virtual threads
- 12:08Blocking stream processing
- 22:45Scala Ox library overview
- 28:28Blocking operations with flows
- 33:58Flow integration with channels
- 37:51Reimplementation of Akka example
- 40:42About Software Mill
- 41:25Comparison of streaming approaches
- 44:55Closing and Q&A
related talks
44mAsync Showdown: Java Virtual Threads vs. Kotlin Coroutines
49mConcurrency and Streaming in the Age of Loom
46mJava 21: The revolution of virtual threads - A Deep dive
43mA Tale of Two Cities: How Blocking Calls Are Treated?
51mJava 21: The revolution of virtual threads
50mAsynchronous Programming in Java using Virtual Threads
46mJava 21: The Revolution of Virtual Threads - A Deep Dive
50mAsync Showdown: Java Virtual Threads vs. Kotlin Coroutines
