Actors in Ruby! Why let Elixir have all the fun?
summary
Claim: Ruby can run an actor model for real workloads rather than just handwavy examples. Implementation detail: Celluloid gives proxies, async calls, finalizers, linking and supervisors, pools and a supervision container so crashed actors restart instead of corrupting shared state. Limits: the GIL blocks true CPU parallelism but IO releases the lock so actors help with network/file-bound jobs. Scale example: a demo uses 2 helpers but the pattern scales to 10–30 workers; related production pieces include NIO4r and DCell.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:45We use it every time we interact with computers
- 4:23Process forks the brute force approach
- 5:41Irrational fear of Threads
- 5:56Deadlocks! Impossible Bugs! Racing Conditions!
- 6:43The problem is controlling Mutable Shared State
- 6:55Mutexes, Conditional Variables and Monitors are too clunky
- 7:36Imagine a normal OC system with 2 key differences
- 8:04All method calls are Asynchronous
- 8:22That's an Actor System
- 11:36No Shared State!
- 12:22retention and protection and hiding of state. and extreme late binding of all things.
- 13:32More than a concurrency model, a programming model
- 14:14Concurrent-Ruby Celluloid
- 15:45Going back to our ticket prices example
- 17:41What about exceptions? How those actors qet GCed?
- 18:47Manually handling actors is not fun
- 21:19Just like Thread Pools or Connection Pools
- 22:29Supervisors
- 23:28Supervisor Configs
- 27:58might be part of Ruby 3
- 28:12Concluding
related talks
38mScaling Ruby with Actors, or How I Learned to Stop Worrying and Love Threads
25mRactor Demonstration
37mLetting Concurrency Help You Today
38mModeling concurrency in Ruby and beyond
31mActor, Thread and me
28mRactors in Ruby 4.0: Message Passing Without the Pain
28mCome Discuss Ractors and Concurrency with 'The Dude'!
37mRubinius - tales from the trenches of developing a ruby implementation
