Asynchronous streams in direct style with and without macros
summary
Proposal extends Scala async so an async block can produce a Publisher and await either Futures or stream events, implemented two ways: a macro that transforms the body into a state machine and a runtime variant using Project Loom continuations that suspends and resumes continuations, targets JDK 9 Flow and Scala 3, prototypes on GitHub, demonstrates backpressure-aware loops like zip and switch, claims fewer closures and less boxing and shows the approach works for real examples.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:49A solution using for- comprehensions
- 4:52A solution using scala-async
- 10:15Intermezzo: Reactive Streams
- 13:21Publisher
- 15:05Subscription
- 16:01Reactive Extensions
- 19:43Challenges
- 21:15Back to our task
- 23:26Generalizing await
- 25:38Solution using scala-async-flow
- 28:08Implementing scala-async-flow
- 28:44Library Component
- 30:17Macro-based implementation
- 35:57Continuations in Project Loom
- 38:57Theoretical foundations
- 39:48Open Issues
- 41:16Resources
related talks
45mSimplifying Asynchronous Code With Scala Async
27mAsync/Await: Thinking beyond Combine
42mLearn you Akka Streams for great Good!
29mAn Introduction to Scalaz-Stream
49mA Practical Introduction to Akka Streams
33mChanneling the Inner Complexity
48mStreaming all the things with Akka Streams
54mHow I Learned to Stop Worrying & Love the Flow
