Rust and Scala, Sitting in a Tree….
summary
A Scala in-memory time-series DB stores 100 billion data points and ingests 1M samples/sec but hits ~20s GC pauses; moving off-heap was painful. Rust’s ownership/borrowing model and no garbage collector let structs be inlined (saving ~100 bytes per object), eliminate boxing in iterator transforms, and enforce thread safety via Arc/RwLock and async/await. Examples use Cargo, ripgrep and Apache Arrow demos; embedding via JNI/jnr or GraalVM runtimes proves practical though Rust has a steeper learning curve.
AI-written summary · about
chapters (17)
- 0:00Introduction and background
- 1:07Performance challenges on JVM
- 3:58Why Rust appealed to us
- 5:24Memory model differences
- 8:16Ownership and borrowing explained
- 11:32Immutability in Rust vs Scala
- 13:57Thread safety in Rust
- 16:24Async/await in Rust
- 17:50Debugging async Rust
- 18:14Actors in Rust
- 19:17Numeric safety in Rust
- 19:38Performance and abstractions
- 23:11Promising Rust projects
- 24:15Lessons learned from Rust
- 25:42Improving Scala with Rust ideas
- 26:25Embedding Rust in JVM ecosystem
- 27:53Q&A








