Concurrency for Rubyists
summary
Demonstrates that MRI’s Global Interpreter Lock prevents true parallelism (a 4-thread counter uses only one CPU core) while JRuby and Rubinius can utilize multiple cores (JRuby shows ~400% CPU) and JRuby provides realtime profiling. Compares thread-scaling limits on macOS (~2k) vs Linux (~20k–30k), recommends using concurrent-ruby v0.7 primitives, Celluloid for supervised worker restarts (includes a tiny Celluloid-based web server that auto-restarts crashed handlers), and promotes Hamster immutable collections for efficient copy-on-write data structures.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:57End of linear speed model
- 5:28Ruby default implementation
- 8:26Ruby GIL problem
- 14:34Concurrency model limits
- 17:23Concurrent Ruby primitives
- 21:31Communication vs memory sharing
- 24:16Celuloid and object concurrency
- 26:28Mutability problem
related talks
33mConcurrency for !Dummies (Who Don't Get It (...Yet))
23mParallel Processing With Ruby
36mModern Concurrency Practices in Ruby
54mConcurrency: Rubies, plural
42mLook out! Gotchas of Using Threads in Ruby
38mScaling Ruby with Actors, or How I Learned to Stop Worrying and Love Threads
20mSubprocesses, Threads and Fibers
29mScaling Ruby with JRuby
