Ractors in Ruby 4.0: Message Passing Without the Pain
summary
A benchmark initially shows Ractors 3.6× slower than forks because it's run on an older Ruby, then switching to Ruby 4 flips results to 5.6× faster, matching or beating forks on small workloads. The talk maps Threads, Fibers, Processes and Ractors, demonstrates Ractor::Port and shareable procs and lambdas plus native exception transport, shows real wins for CPU-bound work (Karaska deserialization, Herb tooling), explains why Rails/Puma can’t switch wholesale (shared heap, stop‑the‑world GC, globals), and presents Elixir actor patterns that work today.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 3:10Ruby parallelism
- 5:42Ractors actor model
- 7:07Ractors vs processes in matrix
- 9:36Basic Ractor API
- 11:22Long-running Ractors
- 13:30Ping-pong Ractors
- 14:34Web servers and Ractors
- 16:00Shareability and reactor safety in Ruby
- 18:07Testing CPU-bound apps
- 21:16Kafka deserialization with Ractors
- 24:28Ractors use cases
- 25:31Ractors performance
related talks
30mRactor on Ruby 3.4
25mRactor Demonstration
27mParallel testing with Ractors - Putting CPU's to work
35mConcurrency in Ruby: Threads, Fibers and Ractors Demystified
29mMillion-Agent Ruby: Ractor-Local GC in the Age of AI
28mThread-Coordinated Ractors: The Pattern That Delivers
29mUsing Ractors and Making Ractors Usable
38mScaling Ruby with Actors, or How I Learned to Stop Worrying and Love Threads
