Concurrent Systems in Ruby
summary
Compares concrete concurrency options in Ruby and shows when each actually works versus fails, with code patterns and libraries: classic mutex/condition locks, optimistic updates via atomic gem with retry semantics, persistent data via Hamster persistent structures, and actor supervision using Celluloid actors. Explains Ruby 1.8 green threads versus 1.9+ native threads, fiber stack limits and the tradeoff between process isolation and shared-memory threads, and demos supervisor restarts where an actor dies and is relaunched repeatedly until a configured threshold.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:00Theoretical foundations of concurrency
- 3:34Concurrency vs parallelism
- 7:26Race conditions and memory sharing
- 9:32Race condition problems in Ruby
- 11:17Safe concurrency solutions
- 13:06Mutexes and atomic operations
- 16:42Green threads and features
- 19:57Task scheduler components
- 21:23Ruby Fibers and limitations
- 23:11Processes vs threads in Unix
- 25:16Concurrency system comparison
- 26:43Concurrency model conclusions
- 27:03Celuloid and actor model
- 31:08Celuloid error handling
- 34:22Recommendations and resources
- 35:06Conclusion and Q&A
related talks
30mAdvanced Multithreading in Ruby
54mConcurrency: Rubies, plural
36mModern Concurrency Practices in Ruby
35mConcurrency in Ruby: Threads, Fibers and Ractors Demystified
36mIntroduction to Concurrency in Ruby
37mLetting Concurrency Help You Today
23mParallel Processing With Ruby
20mSubprocesses, Threads and Fibers
