Fast, Simple Concurrency with Scala Native
summary
A new library called native-loop implements a Scala Native execution context on top of libuv, providing futures, an event loop, timers and HTTP client/server plumbing that actually work — timers use malloc'd libuv handles with an 8‑byte ID field and promises, the execution context defers runnables to the loop, blocking file I/O falls back to libuv's thread pool, and the goal is high hundreds–low thousands rps with tiny footprints like 100–200MB per service.
AI-written summary · about
chapters (31)
- 0:00Intro
- 0:13This talk is about
- 1:45Talk Outline
- 2:07About me
- 3:14Background: Concurrency
- 4:01Concurrency in Scala
- 4:47Common Concurrency Issues
- 5:50Design Questions
- 6:30Scala Native is
- 7:57Caveat
- 9:18Introducing libuv
- 11:10libuv and Scala Native
- 12:07A Tour of Native-Loop
- 15:19Streams (take 1)
- 16:22Streams, take 2
- 18:04Curl
- 19:04Imperative Server API
- 20:41Server DSL(s)
- 21:25All of the Above
- 21:58Performance
- 24:11Systems Programming 101
- 26:12Example: Memory Allocation
- 29:27Example: C FFI
- 31:57Greenspun's tenth rule
- 33:04ExecutionContext from Scratch
- 34:24LibUV's event loop
- 36:26Our EventLoop callback
- 37:04LoopExtensions
- 37:27Timer
- 39:42Working with Opaque Structs
- 43:08What's Next?
related talks
30mExploring JVM Innovations Through the Lens of Scala Native
36mHands-on Scala-Native
44mConcurrency in Scala and on the JVM
37mNative Concurrency and Coroutines
29mA brief introduction to systems programming, with Scala Native
42mKotlin Multiplatform multithreading old and new way
39mKotlin Native Concurrency Explained
33mChanneling the Inner Complexity
