Celluloid provides a simple and natural way to build fault-tolerant
concurrent programs in Ruby. With Celluloid, you can build systems out
of concurrent objects just as easily as you build sequential
programs out of regular objects.
Much of the difficulty with building concurrent programs in Ruby arises
because the object-oriented mechanisms for structuring code, such as
classes and inheritance, are separate from the concurrency
mechanisms, such as threads and locks. Celluloid combines these into a
single structure, an active object running within a thread, called an
"actor", or in Celluloid vernacular, a "cell".
The Actor Model can be summarized as follows:
- Actors communicate by sending messages
- Every actor has a mailbox with a unique address.
- If you have an actor's address, you can send it messages
- Actors can create other actors, and when they do they know their address so they can send the newly-created actors messages
- Actors can pass addresses (or handles) to themselves or other actors in messages
Casiano Rodriguez León