Ractor Demonstration
summary
Ruby 3 introduces Ractor, an actor-like parallel abstraction that isolates most objects and permits true multi-CPU execution; 20 ractors use 20 CPUs demonstrates parallelism on 40 logical cores. Messages are copied between ractors so object ids change — object-copy on send — and ports support send/receive, outgoing pipelines and immediate nonblocking sends. Examples show two ractors halving a prime-check from 26s to 13s, but object allocation is slower (1,000,000 strings: 0.2s single vs several seconds on Ractor). Limitations include no global/class/instance vars in non-main ractors and experimental warnings and RemoteError exception propagation for failures.
AI-written summary · about
chapters (10)
- 0:00Start
- 5:52Ractor Concepts
- 10:50Limited object sharing
- 11:50Shareable objects
- 12:16Ractor's concept Building ractors network with push/pull types communication
- 12:51Ractor's idea Push type communication
- 15:18Ractor's idea Pull type communication
- 18:11Load balancing with a bridge ractor
- 20:02Exception propagation
- 21:03Ractor's idea Error recovery on the ractor network
related talks
28mCome Discuss Ractors and Concurrency with 'The Dude'!
28mRactors in Ruby 4.0: Message Passing Without the Pain
30mRactor on Ruby 3.4
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
34mActors in Ruby! Why let Elixir have all the fun?
29mUsing Ractors and Making Ractors Usable
