From: Tony Arcieri Date: 2011-12-01T05:49:10+09:00 Subject: [ANN] DCell 0.0.1: Distributed actors for Ruby DCell is a distributed actor framework for Ruby. Somewhat similar to DRb, DCell allows you to make calls to Celluloid actors registered on remote nodes the exact way you'd make calls to local Celluloid actors: using the familiar obj.method(...) syntax. DCell uses 0MQ as the network transport and relies on an external coordination service: either Redis or Zookeeper. DCell is available on Github: http://github.com/tarcieri/dcell It's also released via Rubygems: http://rubygems.org/gems/dcell DCell is the distributed component of the Celluloid concurrent object library for Ruby (the name stands for Distributed Celluloid). For more information about Celluloid, please see: Celluloid RDoc: http://celluloid.github.com/ Celluloid on Github: http://github.com/tarcieri/celluloid DCell exposes Celluloid's asynchronous messaging protocol across Ruby VMs using 0MQ and Marshal. Any Celluloid proxy object can be marshalled just like any Ruby object, giving you handles to Celluloid actors you can pass around a distributed system just like any other object (and similar to Erlang PIDs). Unlike DRb, DCell supports asynchronous method invocation by calling obj.method! allowing you to signal actors on remote nodes you want a method invoked without waiting for a response. DCell also supports futures, allowing you to signal a remote actor you want a method invoked, then collecting the result later. This makes for extremely simple scatter/gather programming across distributed systems. In many ways, DCell can be thought of as asynchronous DRb. DCell draws many ideas about fault-tolerance from Erlang. Distributed actors can link together across nodes, so that when an actor crashes on one node, every actor it's linked to on remote nodes is notified. This allows a crash in one actor (e.g. a group leader) to propagate to all its dependent actors, which can decide what to do in the event of a crash. Perhaps they'll crash too and restart in a clean state (this is the default behavior), or they can intercept the crash notification and take action (e.g. holding a leader election) This is the initial release of DCell so it's somewhat sparse on features, however you can do the following already: - Find all nodes in the system with DCell::Node.all - Find a specific node in the system using DCell::Node[node_id] - Locate all registered actors on a node with DCell::Node#all - Locate a specific actor on a node with DCell::Node#[name] Once you've obtained a handle to an actor, it should quack just like any other Celluloid actor in the system. DCell aims to provide an abstraction layer which, as much as possible, makes Celluloid actors behave just like local actors, much in the same way Erlang tries to make remote processes act like local processes. If you'd like to keep up on DCell development please follow me on Twitter: http://twitter.com/bascule Enjoy! -- Tony Arcieri