This repository has been archived by the owner on Jul 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Scaling Ruby with Actors
Benjamin Oakes edited this page Oct 1, 2011
·
4 revisions
The last two years have been a personal tour of EventMachine, Fibers and Threads for me as I've toured the ecosystem looking for a developer-friendly, efficient solution for scaling Ruby. Historically Threads have performed poorly in Ruby but guess what? - recent events may change your mind. Now would be a good time to give them a second chance.
Share | Shared Mem| Variables
| Files |
------|-----------|-----------
Copy | Pipes | ???
| Sockets |
------|-----------|-----------
| Processes | Threads
What goes in the "???" box?
- Go has "Goroutines"
- Maps well to distributed model
- Maps to a pool of threads
- In Erlang and Scala, it's primary
- Has a mailbox -- you send it a mesage
- Thread- or Fiber-backed
- No locks
- Comes with Rubinius
- Works on MRI and JRuby
- Ping pong example
- "Hard to understand, use correctly"
- From Tony Arcieri (Revactor, Reia)
- http://github.com/tarcieri/celluloid on GitHub
- But 1 object == 1 thread :( (lots of memory)
- The presenter's
- ...actually seems a lot like
Thread.new { ... }
- Software Transactional Memory
- Mutation via transactions
- Clojure (and Cloby) uses it
- Does the "ACI" of ACID
- From Java
-
java.util.concurrent
ConcurrentHashMap
ConcurrentLinkedQueue
- Standard actor API
- Concurrent data scrutctures
- STM implementations for Ruby
- Kilim
- Disruptor
- Actors in Scala/Concurrency in Erlang
- Java Concurrency in Practice book
A crowd-sourced conference wiki!
Working together is better. :)
- Speakers, for example:
- Recent Conferences
- Software
- Offline Access
- Contributors (More than 50!)
- Code Frequency