Giter VIP home page Giter VIP logo

dcell's Introduction

Celluloid

Gem Version MIT licensed Build Status Maintained: no Gitter Chat

Celluloid is a framework for building asynchronous and multithreaded Ruby programs using object-oriented concepts.

Revival Process Underway

Celluloid is in the process of being refactored and released back into the wild during Google Summer of Code. The next era will not have one individual active maintainer, but a team of collaborators. Going forward, previously dormant maintainer Donovan Keme is returning to support future primary maintainer Emese Padányi during GSoC 2020. Her plan extends past the Summer program, and aims to revive the community and codebase of Celluloid together. Backing this process are Harsh Deep and GSoC alumni Dilum Navanjana. We welcome your collaboration and contributions in this massive work.

The codebase is being refactored to pursue a stable release with no deprecation warnings, and with this cleaned up:

Diagram

Diagram meticulously developed by Emese Padányi

Proudly supported by the best cloud infrastructure provider in the world: DigitalOcean

Discussion

Documentation

Please see the Celluloid Wiki for more detailed documentation and usage notes.

The following API documentation is also available:

Related Projects

See also: Projects Using Celluloid

  • Reel: An "evented" web server based on Celluloid::IO
  • DCell: The Celluloid actor protocol distributed over 0MQ
  • ECell: Mesh strategies for Celluloid actors distributed over 0MQ
  • Celluloid::IO: "Evented" IO support for Celluloid actors
  • Celluloid::ZMQ: "Evented" 0MQ support for Celluloid actors
  • Celluloid::DNS: An "evented" DNS server based on Celluloid::IO
  • Celluloid::SMTP: An "evented" SMTP server based on Celluloid::IO
  • nio4r: "New IO for Ruby": high performance IO selectors
  • Timers: A generic Ruby timer library for event-based systems

Contributing to Celluloid

  • Fork this repository on github
  • Make your changes and send us a pull request
  • Pull requests will be reviewed for inclusion in the project

License

Copyright (c) 2011-2018 Tony Arcieri, Donovan Keme.

Distributed under the MIT License. See LICENSE.txt for further details.

dcell's People

Contributors

bts avatar digitalextremist avatar ezkl avatar fbernier avatar halorgium avatar jhosteny avatar mgenereu avatar niamster avatar nicksieger avatar rrrene avatar tarcieri avatar wjossey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dcell's Issues

Renewing address of remote actor after process restart

I have the following use case:

  1. Process1 creates cell1 accessible under the address tcp://127.0.0.1:8887
  2. Process2 creates cell2 accessible under the address tcp://127.0.0.1:8888
  3. cell2 sends message to cell1, cell1 responds successfully
  4. Process1 goes down, cell1 not accessible anymore
  5. cell2 sends message to cell1, infinite loop

Now, the infinite loop is already an issue, but now i have the following divergent cases (just for the sake of the example, assume step 5 didn't occur and process2 is still standing):


6.1.1 Process1 restarts, cell1 accessible under the address tcp://127.0.0.1:8887
6.1.2 cell2 sends message to cell1, cell1 responds successfully


6.2.1 Process1 restarts, cell1 accessible under the address tcp://127.0.0.1:8889
6.2.2 cell2 sends message to cell1, infinite loop


So, bottom line is, Process2 still had the address of cell1 as being under tcp://127.0.0.1:8887, even though process went down. After Process1 restarted, it renewed its address in the registration server (i'm using zookeeper, by the way), but this has not been propagated to the other processes. So, unless the address is exactly the same as before, communication between remote actors will cease, unless both processes are restarted.

In a scenario with long running processes and first-open-port-in-range-selection policy, this is doomed to fail. My question to is: does DCell provide already some workaround for the issue, and if not, where should one start investigating a possible solution?

How to use DCell to connect the remote node and use the actor?

Hello,I am a newer. I want to know how to connect remote ip by DCell.Maybe that is a simple question for you!!!Could Any one can reply ?
such as in my computer is my_ip and the remote server machine is remote_ip.
should it be right to do ?

The code in my local computer
require 'dcell'
DCell.start :id => "node1", :addr => "tcp://my_ip:4001",:directory => {:id => 'remote_node',:addr => 'tcp://remote_ip:4002'}

The code in my remote computer
require 'dcell'
DCell.start :id => "remote_node", :addr => "tcp://remote_ip:4002"

How to do?

Explorer can't find any of its content

Hi Tony,

I am enjoying exploring Celluloid and DCell. But the exploring of explorer is not going so well.

I have a directory with some test DCell files that bring up nodes. In that directory I also created a file for starting the explorer.

➜  cat nd_explorer.rb 
require 'rubygems'
require 'bundler'
Bundler.setup

require 'dcell/explorer'

DCell::Explorer.new("localhost", 8000)

while true
  sleep 1
end

I added the while true just to keep the program running (Is there a less crufty recommended way to do that?). I started this with 'bundle exec ruby nd_explorer.rb' after doing a bundle install in that dir (my Gemfile just points to the git repo for the latest commits for all of your celluloid related gems.

When I go to http://localhost:8000 in my local browser I get:

➜  bundle exec ruby nd_explorer.rb
I, [2012-04-17T09:17:12.879516 #59134]  INFO -- : 404 Not Found: /index.html
I, [2012-04-17T09:17:13.079038 #59134]  INFO -- : 404 Not Found: /favicon.ico
I, [2012-04-17T09:17:14.960667 #59134]  INFO -- : 404 Not Found: /index.html
I, [2012-04-17T09:17:15.127069 #59134]  INFO -- : 404 Not Found: /favicon.ico

I tried also running this from a 'bundle exec irb' console using the instructions here but I get the same results.

https://github.com/celluloid/dcell/wiki/Explorer

I tried copying the explorer dir from the gem to my local dir, but no dice. I am running all of this on Rubinious HEAD installed via rvm.

Zookeeper adapter

Documentation doesn't specify the way to use ZK adapter in DCell. After trying to specify it using:

require 'dcell'
require 'celluloid/io'
require 'json'
require 'socket'

DCell.start :id => `hostname`.chomp!, :addr => "tcp://#{IPSocket.getaddress(Socket.gethostname)}:5555",
            :registry =>
                {
                    :adapter => 'zk',
                    :host => '192.168.15.11'
                }

I've received exception:

D, [2013-05-13T09:31:50.458973 #20433] DEBUG -- : Terminating 1 actors...
D, [2013-05-13T09:31:50.460026 #20433] DEBUG -- : Shutdown completed cleanly
/var/lib/gems/1.9.1/gems/dcell-0.14.0/lib/dcell.rb:62:in `rescue in block in setup': invalid registry adapter:  (ArgumentError)
        from /var/lib/gems/1.9.1/gems/dcell-0.14.0/lib/dcell.rb:59:in `block in setup'
        from <internal:prelude>:10:in `synchronize'
        from /var/lib/gems/1.9.1/gems/dcell-0.14.0/lib/dcell.rb:45:in `setup'
        from /var/lib/gems/1.9.1/gems/dcell-0.14.0/lib/dcell.rb:101:in `start'
        from agent-zoo.rb:6:in `<main>'

Thanks to the @aflatter at IRC channel solution to the problem is to add requires for:

  1. zk
  2. dcell/registries/zk_adapter

Also :registry block looks slightly different:

            :registry =>
                {
                    :adapter => 'zk',
                    :server => '192.168.15.11',
                }

DCell::NodeManager is crashing

DCell tests are crashing and DCell is not usable on my machine
OS: Mac OS X 10.6.8
ruby: 1.9.3
zmq latest via brew

celluloid-zmq tests are running fine.

rake
/Users/roman/.rvm/rubies/ruby-1.9.3-p125/bin/ruby -S rspec ./spec/dcell/actor_proxy_spec.rb ./spec/dcell/celluloid_ext_spec.rb ./spec/dcell/directory_spec.rb ./spec/dcell/explorer_spec.rb ./spec/dcell/global_spec.rb ./spec/dcell/node_spec.rb ./spec/dcell/registries/moneta_adapter_spec.rb ./spec/dcell/registries/redis_adapter_spec.rb ./spec/dcell/registries/zk_adapter_spec.rb
Waiting for test node to start up.... done!

DCell::ActorProxy
I, [2012-04-08T16:44:11.429329 #59970]  INFO -- : Connected to test_node
I, [2012-04-08T16:44:11.432012 #59989]  INFO -- : Connected to roman-mbpro-2
  makes synchronous calls to remote actors
  linking
    links to remote actors
    unlinks from remote actors
E, [2012-04-08T16:44:11.457325 #59989] ERROR -- : TestActor crashed!
RuntimeError: the spec purposely crashed me :(
/Users/roman/Desktop/sand/dcell/spec/test_node.rb:24:in `crash'
/Users/roman/.rvm/gems/ruby-1.9.3-p125@celluloid/bundler/gems/celluloid-7e02f248a673/lib/celluloid/calls.rb:56:in `dispatch'
/Users/roman/.rvm/gems/ruby-1.9.3-p125@celluloid/bundler/gems/celluloid-7e02f248a673/lib/celluloid/actor.rb:223:in `block in handle_message'
/Users/roman/.rvm/gems/ruby-1.9.3-p125@celluloid/bundler/gems/celluloid-7e02f248a673/lib/celluloid/task.rb:45:in `block in initialize'
    traps exit messages from other actors

Celluloid extensions
  marshals Celluloid::ActorProxy objects
  marshals Celluloid::Mailbox objects

DCell::Directory
  stores node addresses

DCell::Explorer
I, [2012-04-08T16:44:11.576386 #59970]  INFO -- : Connected to roman-mbpro-2
I, [2012-04-08T16:44:11.584819 #59970]  INFO -- : 200 OK: index.html
  reports the current node's status

DCell::Global
  can handle unexisting keys
  stores values
  stores the keys of all globals

DCell::Node
  finds all available nodes
  finds remote actors
  lists remote actors

DCell::Registry::MonetaAdapter
  behaves like a DCell registry
    node registry
      stores node addresses
      stores the IDs of all nodes
    global registry
      stores values
      stores the keys of all globals

DCell::Registry::RedisAdapter
  behaves like a DCell registry
    node registry
      stores node addresses
      stores the IDs of all nodes
    global registry
      stores values
      stores the keys of all globals

Finished in 0.18086 seconds
22 examples, 0 failures
W, [2012-04-08T16:44:11.710418 #59970]  WARN -- : DCell::NodeManager is crashing on initialize too quickly, sleeping for 30 seconds
W, [2012-04-08T16:44:11.712206 #59970]  WARN -- : DCell::Server is crashing on initialize too quickly, sleeping for 30 seconds
E, [2012-04-08T16:44:16.429760 #59970] ERROR -- : DCell::Node crashed!
IOError: error sending 0MQ message: Context was terminated
/Users/roman/.rvm/gems/ruby-1.9.3-p125@celluloid/bundler/gems/celluloid-zmq-23d0d1504021/lib/celluloid/zmq/sockets.rb:84:in `send'
/Users/roman/Desktop/sand/dcell/lib/dcell/node.rb:103:in `send_message'
/Users/roman/Desktop/sand/dcell/lib/dcell/node.rb:109:in `send_heartbeat'
/Users/roman/Desktop/sand/dcell/lib/dcell/node.rb:110:in `block in send_heartbeat'
/Users/roman/.rvm/gems/ruby-1.9.3-p125@celluloid/bundler/gems/celluloid-7e02f248a673/lib/celluloid/actor.rb:197:in `block (2 levels) in after'
/Users/roman/.rvm/gems/ruby-1.9.3-p125@celluloid/bundler/gems/celluloid-7e02f248a673/lib/celluloid/task.rb:45:in `block in initialize'
E, [2012-04-08T16:44:16.577219 #59970] ERROR -- : DCell::Node crashed!
IOError: error sending 0MQ message: Context was terminated
/Users/roman/.rvm/gems/ruby-1.9.3-p125@celluloid/bundler/gems/celluloid-zmq-23d0d1504021/lib/celluloid/zmq/sockets.rb:84:in `send'
/Users/roman/Desktop/sand/dcell/lib/dcell/node.rb:103:in `send_message'
/Users/roman/Desktop/sand/dcell/lib/dcell/node.rb:109:in `send_heartbeat'
/Users/roman/Desktop/sand/dcell/lib/dcell/node.rb:110:in `block in send_heartbeat'
/Users/roman/.rvm/gems/ruby-1.9.3-p125@celluloid/bundler/gems/celluloid-7e02f248a673/lib/celluloid/actor.rb:197:in `block (2 levels) in after'
/Users/roman/.rvm/gems/ruby-1.9.3-p125@celluloid/bundler/gems/celluloid-7e02f248a673/lib/celluloid/task.rb:45:in `block in initialize'
I, [2012-04-08T16:44:16.578493 #59970]  INFO -- : Terminating 13 actors...
W, [2012-04-08T16:44:16.580972 #59970]  WARN -- : DCell::NodeManager is crashing on initialize too quickly, sleeping for 30 seconds
I, [2012-04-08T16:44:16.584393 #59970]  INFO -- : Shutdown completed cleanly

Cannot follow the configuration example, please help

Versions:

  • zeromq-4.0.7 (also tried 4.1.2)
  • ffi-rzmq-2.0.4
  • ruby-2.0.0-p353
  • redis-2.8.4

The example: https://github.com/celluloid/dcell/wiki/Configuration

2.0.0-p353 :001 > require 'dcell'
 => true 
2.0.0-p353 :002 > require 'dcell/registries/redis_adapter'
 => false 
2.0.0-p353 :003 > registry = DCell::Registry::RedisAdapter.new :server => 'localhost'
 => #<DCell::Registry::RedisAdapter:0x00000001d88e60 @env="production", @namespace="dcell_production", @redis=#<Redis::Namespace:0x00000001d888e8 @namespace="dcell_production", @redis=#<Redis client v3.2.1 for redis://127.0.0.1:6379/0>, @warning=true, @deprecations=false>, @node_registry=#<DCell::Registry::RedisAdapter::NodeRegistry:0x00000001d88870 @redis=#<Redis::Namespace:0x00000001d888e8 @namespace="dcell_production", @redis=#<Redis client v3.2.1 for redis://127.0.0.1:6379/0>, @warning=true, @deprecations=false>>, @global_registry=#<DCell::Registry::RedisAdapter::GlobalRegistry:0x00000001d88848 @redis=#<Redis::Namespace:0x00000001d888e8 @namespace="dcell_production", @redis=#<Redis client v3.2.1 for redis://127.0.0.1:6379/0>, @warning=true, @deprecations=false>>> 
2.0.0-p353 :004 > registry.set_global 'x', 12
 => false 
2.0.0-p353 :005 > registry.get_global 'x' => 12 
2.0.0-p353 :006 > registry.global_keys
 => ["x"] 
2.0.0-p353 :007 > DCell.start :registry => registry
NoMethodError: undefined method `[]' for #<DCell::Registry::RedisAdapter:0x00000001d88e60>
        from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/dcell-0.16.1/lib/dcell.rb:55:in `block in setup'
        from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/dcell-0.16.1/lib/dcell.rb:46:in `synchronize'
        from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/dcell-0.16.1/lib/dcell.rb:46:in `setup'
        from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/dcell-0.16.1/lib/dcell.rb:114:in `start'
        from (irb):7
        from /usr/local/rvm/rubies/ruby-2.0.0-p353/bin/irb:12:in `<main>'

Moneta update 0.7.0

You seem to depend on the old moneta, the new one supports much more backends.

Cannot get remote actor

I have a :time_server actor registered with node1. In node2, which is connected to node1, I can get the list of actors on node1, but when I try to get the remote actor I get this error:

rbx-2.2.10 :060 > DCell::Node[:node1].actors
=> [:node_manager, :dcell_server, :info, :time_server]
rbx-2.2.10 :061 > DCell::Node[:node1][:time_server]
E, [2014-10-02T13:02:21.052500 #7312] ERROR -- : couldn't decode message
DCell::Server::InvalidMessageError: invalid message: dump format error
/Users/riccardo.tacconi/.rvm/gems/rbx-2.2.10/gems/dcell-0.16.0/lib/dcell/server.rb:59:in decode_message' /Users/riccardo.tacconi/.rvm/gems/rbx-2.2.10/gems/dcell-0.16.0/lib/dcell/server.rb:38:inhandle_message'
/Users/riccardo.tacconi/.rvm/gems/rbx-2.2.10/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in dispatch' /Users/riccardo.tacconi/.rvm/gems/rbx-2.2.10/gems/celluloid-0.16.0/lib/celluloid/calls.rb:122:indispatch'
/Users/riccardo.tacconi/.rvm/gems/rbx-2.2.10/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in invoke' /Users/riccardo.tacconi/.rvm/gems/rbx-2.2.10/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:intask'
/Users/riccardo.tacconi/.rvm/gems/rbx-2.2.10/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in task' /Users/riccardo.tacconi/.rvm/gems/rbx-2.2.10/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:ininitialize'
/Users/riccardo.tacconi/.rvm/gems/rbx-2.2.10/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in create' kernel/bootstrap/proc.rb:20:incall'

I am using redis and OSX

0-15-stable broken with finalizer changes

Pull request #71 which was merged into the "stable" branch seems to have broken things far worse

Node1 connects to registry
Node2 connects to registry, calls method on node1, still working

Node2 disconnects
Finalizer clears ENTIRE registry
Node2 reconnects

Node 1 no longer exists to node2 or any node for that matter since it cleared the entire registry. Will require a restart of process to become visible again. (but actually, if you restart the process, it clears the registry yet again, triggering an infinite clearing of the registry which will not be in sync until all nodes are taken offline at same time, then brought back up)

Map DCell::Explorer within Rack

I'm not sure if this concerns dcell or reel, but I'd like to provide DCell Explorer web views under a certain namespace from my main rack app (using rack map for it). From what I've seen is the explorer not a rack app, but a reel server, which is by default not a rack app. But I've seen also that there is the reel-rack extension. How can I use this approach to expose the DCell::Explorer server an a map endpoint? An example of what I want to do:

map '/sidekiq' do        
  run Sidekiq::Web       
end                      
map '/dcell' do          
  run DCell::Explorer    
end                      

Itchy & Scratchy broken on pure master?

Itchy so far starts up OK.

But start up Scratchy and this comes up:

I, [2014-04-08T06:55:11.303000 #91779]  INFO -- : Connected to itchy
E, [2014-04-08T06:55:11.401000 #91779] ERROR -- : couldn't decode message
DCell::Server::InvalidMessageError: invalid message: wrong number of arguments calling `initialize` (2 for 1)
    /Users/de/01E/libraries/digitalextremist/dcell/lib/dcell/server.rb:59:in `decode_message'
    /Users/de/01E/libraries/digitalextremist/dcell/lib/dcell/server.rb:38:in `handle_message'
    org/jruby/RubyKernel.java:1965:in `public_send'
    /Users/de/.rvm/gems/jruby-1.7.11@global/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
    /Users/de/.rvm/gems/jruby-1.7.11@global/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch'
    /Users/de/.rvm/gems/jruby-1.7.11@global/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `handle_message'
    /Users/de/.rvm/gems/jruby-1.7.11@global/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `task'
    /Users/de/.rvm/gems/jruby-1.7.11@global/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `initialize'
    /Users/de/.rvm/gems/jruby-1.7.11@global/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `create'

Referencing: https://github.com/celluloid/dcell/blob/master/lib/dcell/server.rb#L57

I am running jRuby 1.7.11 on Mac OS X with an empty cup next to my wireless mouse.

Communication with <node> interrupted

Hi,

I'm running 3 ubuntu 12.04 amd64 nodes.
When starting dcell in an irb session, I get communication interrupted.
This does not seem good...

#first node started:
1.9.3p194 :001 > require 'dcell'
 => true
1.9.3p194 :002 > DCell.start addr: 'tcp://10.0.0.14:2042'
I, [2012-06-01T17:26:57.145755 #3691]  INFO -- : Connected to ubu02
 => #<Celluloid::Supervisor(DCell::Group):0xa952cc>
I, [2012-06-01T17:28:22.362609 #3691]  INFO -- : Found node ubu01
I, [2012-06-01T17:28:27.368780 #3691]  INFO -- : Connected to ubu01
I, [2012-06-01T17:29:43.682388 #3691]  INFO -- : Found node tole
I, [2012-06-01T17:29:48.701250 #3691]  INFO -- : Connected to tole
W, [2012-06-01T17:30:13.721359 #3691]  WARN -- : Communication with tole interrupted
W, [2012-06-01T17:30:13.722086 #3691]  WARN -- : Communication with ubu01 interrupted
I, [2012-06-01T17:30:18.746543 #3691]  INFO -- : Connected to tole
I, [2012-06-01T17:30:18.747069 #3691]  INFO -- : Connected to ubu01
W, [2012-06-01T17:30:37.600724 #3691]  WARN -- : Communication with ubu01 interrupted
W, [2012-06-01T17:30:38.769308 #3691]  WARN -- : Communication with tole interrupted
I, [2012-06-01T17:30:38.774246 #3691]  INFO -- : Connected to tole
I, [2012-06-01T17:30:38.774640 #3691]  INFO -- : Connected to ubu01
W, [2012-06-01T17:30:52.644008 #3691]  WARN -- : Communication with ubu01 interrupted
I, [2012-06-01T17:30:52.671897 #3691]  INFO -- : Connected to ubu01
W, [2012-06-01T17:31:02.674378 #3691]  WARN -- : Communication with ubu01 interrupted
W, [2012-06-01T17:31:03.795929 #3691]  WARN -- : Communication with tole interrupted
I, [2012-06-01T17:31:08.814475 #3691]  INFO -- : Connected to tole
I, [2012-06-01T17:31:08.815058 #3691]  INFO -- : Connected to ubu01

#second node:
1.9.3p194 :001 > require 'dcell'
 => true
1.9.3p194 :002 > DCell.start addr: 'tcp://10.0.0.10:2043', directory: { id: 'ubu02', addr: 'tcp://10.0.0.14:2042' }
I, [2012-06-01T17:28:17.302204 #3687]  INFO -- : Connected to ubu02
I, [2012-06-01T17:28:17.302992 #3687]  INFO -- : Connected to ubu01
 => #<Celluloid::Supervisor(DCell::Group):0x83cc14>
I, [2012-06-01T17:29:52.467079 #3687]  INFO -- : Found node tole
I, [2012-06-01T17:29:57.486929 #3687]  INFO -- : Connected to tole
W, [2012-06-01T17:30:07.488696 #3687]  WARN -- : Communication with ubu02 interrupted
W, [2012-06-01T17:30:07.489085 #3687]  WARN -- : Communication with tole interrupted
I, [2012-06-01T17:30:07.509395 #3687]  INFO -- : Connected to ubu02
I, [2012-06-01T17:30:07.510559 #3687]  INFO -- : Connected to tole
W, [2012-06-01T17:30:23.741460 #3687]  WARN -- : Communication with ubu02 interrupted
W, [2012-06-01T17:30:23.742249 #3687]  WARN -- : Communication with tole interrupted
I, [2012-06-01T17:30:23.751953 #3687]  INFO -- : Connected to ubu02
I, [2012-06-01T17:30:23.753235 #3687]  INFO -- : Connected to tole
W, [2012-06-01T17:30:33.755624 #3687]  WARN -- : Communication with tole interrupted
I, [2012-06-01T17:30:33.772550 #3687]  INFO -- : Connected to tole

#third node:
1.9.3p194 :001 > require 'dcell'
 => true
1.9.3p194 :002 > DCell.start addr: 'tcp://10.0.0.6:2044', directory: { id: 'ubu02', addr: 'tcp://10.0.0.14:2042' }
I, [2012-06-01T17:29:38.626024 #4828]  INFO -- : Connected to ubu02
I, [2012-06-01T17:29:38.626869 #4828]  INFO -- : Connected to tole
 => #<Celluloid::Supervisor(DCell::Group):0x1567768>
1.9.3p194 :003 > I, [2012-06-01T17:30:02.639891 #4828]  INFO -- : Found node ubu01
I, [2012-06-01T17:30:02.677549 #4828]  INFO -- : Connected to ubu01
W, [2012-06-01T17:30:22.513723 #4828]  WARN -- : Communication with ubu02 interrupted
I, [2012-06-01T17:30:22.531024 #4828]  INFO -- : Connected to ubu02
W, [2012-06-01T17:30:27.566748 #4828]  WARN -- : Communication with ubu01 interrupted
W, [2012-06-01T17:30:32.532805 #4828]  WARN -- : Communication with ubu02 interrupted
I, [2012-06-01T17:30:32.551753 #4828]  INFO -- : Connected to ubu02
I, [2012-06-01T17:30:32.552106 #4828]  INFO -- : Connected to ubu01
W, [2012-06-01T17:30:47.618859 #4828]  WARN -- : Communication with ubu01 interrupted
W, [2012-06-01T17:30:47.619192 #4828]  WARN -- : Communication with ubu02 interrupted
I, [2012-06-01T17:30:47.647090 #4828]  INFO -- : Connected to ubu02
I, [2012-06-01T17:30:47.647379 #4828]  INFO -- : Connected to ubu01
W, [2012-06-01T17:30:57.648953 #4828]  WARN -- : Communication with ubu02 interrupted
W, [2012-06-01T17:30:57.649156 #4828]  WARN -- : Communication with ubu01 interrupted
I, [2012-06-01T17:30:57.670792 #4828]  INFO -- : Connected to ubu02
I, [2012-06-01T17:30:57.671186 #4828]  INFO -- : Connected to ubu01

I'm running the followin versions:

root@ubu02:~# gem list | egrep 'dcell|zmq'
celluloid-zmq (0.10.0)
dcell (0.10.0)
ffi-rzmq (0.9.3)
root@ubu02:~# dpkg --list | grep zmq
ii  libzmq-dev                      2.1.11-1ubuntu1            ZeroMQ lightweight messaging kernel (development libraries and header files)
ii  libzmq1                         2.1.11-1ubuntu1            ZeroMQ lightweight messaging kernel (shared library)
root@ubu02:~# ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

Possibility to allow a DCell Node to be a client only, w/o needing to serve a PORT

In attempting to use DCell on Heroku it would appear there is a limitation to one PORT being available (you may only bind to $PORT):

https://devcenter.heroku.com/articles/error-codes#r11-bad-bind

Therefore you would have a limitation of not having a web app also be a member of the DCell network. So, for example, a Sinatra/Rails app would not be able to both serve its HTTP port and the ZeroMQ/TCP one required to be a P2P member of the DCell network.

Another class of DCell nodes, allowing them to simply become a client and fire off messages, would allow using DCell on something like Heroku. Of course, you could use RabbitMQ to bridge a web app into a DCell P2P network, but adds complexity if you really want to use DCell/ZeroMQ throughout.

Using it in forked / multithreaded env

I'm trying to use DCell in my rails app like the following:

# initializer
DCell.start id: 'sender', addr: 'tcp://127.0.0.1:9002'

# controller
...
def index
  DCell::Node['client'][:xmpp].send_message 'something'
end

The node client is existing and implements the actor :xmpp which has the method send_message. When I start Rails in development mode (unicorn webserver), everything works. DCell connects to the client and calls the method send_message on the existing actor :xmpp.

But when I use passenger as a web server, the line DCell::Node['client'][:xmpp].send_message 'something' hangs forever. In the client node I do not get any connection attempt (... Connected to sender). I think this might be because passenger is using multiple threads and forking. Is there any solution to this? How to use DCell in a multithreaded environment?

Proposal: use "lazy pirate pattern" for req/reply

I havent dug into the underlying celluloid zmq library, and am pretty zeromq noob, so forgive my ignorance if this proposal doesent work with the current architecture:

The issue Im having is similar to #70 say we have two nodes:

Node2 make request to node 1, ok
Node 1 goes down
Node2 makes another request before registry updated (node1 still exists)
Node2 hangs indefinitely until node 1 comes back up.

If node1 does not come back up, all hope is lost for node2.

I tried working around this by checking the registry for existence of node before ever invoking the remote method (and storing a number of attempts, then sleeping X seconds, then check again, before throwing error after 3), however this only works if heartbeat updates the registry before you attempt to access the remote node at all.

See https://github.com/jasonayre/cylons/blob/master/lib/cylons/agent.rb#L120 if it helps illustrate.

So it would seem to me that really the client needs to be able to account for failure to connect or send message to node, retry X attempts after X duration, at the zeromq layer, to solve. The "lazy pirate pattern" seems to describe this the closest.

http://zguide.zeromq.org/php:chapter4#Client-Side-Reliability-Lazy-Pirate-Pattern

@tarcieri Is this a viable addition or would this somehow conflict with current architecture?

0.16.2

To avoid confusion it's worth to release 0.16.2 from the current master.

@Zloy

Getting reference to remote service raises NoMethodError on remote side

Using the itchy.rb and scratchy.rb examples, I get the following exception from Itchy when Scratchy tries to get a reference to the service :itchy:

$ ruby itchy.rb
Ready for mayhem!
I, [2013-04-10T14:48:07.165925 #11058]  INFO -- : Connected to scratchy
Bite!
E, [2013-04-10T14:48:07.173112 #11058] ERROR -- : Itchy crashed!
NoMethodError: undefined method `<<' for nil:NilClass
    /Users/user/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/bundler/gems/celluloid-7c9e9bcbe500/lib/celluloid/calls.rb:86:in `respond'
    /Users/user/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/bundler/gems/celluloid-7c9e9bcbe500/lib/celluloid/calls.rb:70:in `rescue in dispatch'
    /Users/user/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/bundler/gems/celluloid-7c9e9bcbe500/lib/celluloid/calls.rb:78:in `dispatch'
    /Users/user/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/bundler/gems/celluloid-7c9e9bcbe500/lib/celluloid/actor.rb:317:in `block in handle_message'
    /Users/user/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/bundler/gems/celluloid-7c9e9bcbe500/lib/celluloid/tasks/task_fiber.rb:28:in `block in initialize'
Ready for mayhem!
# hangs here

I get the same error with my own DCell nodes and services.

unexpected zookeeper error when using DCell

I have been using DCell in a Ruby application for 2 years. Today when I restarted the server I got the following zookeeper error (reproduced using the scratchy.rb example):

2015-07-12 21:29:29,030 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /127.0.0.1:62409

2015-07-12 21:29:29,030 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@793] - Connection request from old client /127.0.0.1:62409; will be dropped if server is in r-o mode

2015-07-12 21:29:29,037 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@839] - Client attempting to establish new session at /127.0.0.1:62409

2015-07-12 21:29:29,039 [myid:] - INFO [SyncThread:0:ZooKeeperServer@595] - Established session 0x14e841d7b760004 with negotiated timeout 20001 for client /127.0.0.1:62409

2015-07-12 21:29:29,054 [myid:] - INFO [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@627] - Got user-level KeeperException when processing sessionid:0x14e841d7b760004 type:create cxid:0x55a2dc39 zxid:0xf64 txntype:-1 reqpath:n/a Error Path:/dcell/production/nodes Error:KeeperErrorCode = NodeExists for /dcell/production/nodes

2015-07-12 21:29:29,059 [myid:] - INFO [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@627] - Got user-level KeeperException when processing sessionid:0x14e841d7b760004 type:create cxid:0x55a2dc3b zxid:0xf66 txntype:-1 reqpath:n/a Error Path:/dcell/production/globals Error:KeeperErrorCode = NodeExists for /dcell/production/globals

2015-07-12 21:29:29,065 [myid:] - INFO [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@627] - Got user-level KeeperException when processing sessionid:0x14e841d7b760004 type:setData cxid:0x55a2dc3d zxid:0xf68 txntype:-1 reqpath:n/a Error Path:/dcell/production/nodes/scratchy Error:KeeperErrorCode = NoNode for /dcell/production/nodes/scratchy

I am sure there is something wrong the way I have restarted the server. I have no updated any packages.

Any help would be greatly appreciated.

Thanks,

-Marco G.

libzmq 2.0.10 incompatible with ffi-rzmq 0.9.3

Currently attempting to configure DCell on an Ubuntu 11.04 Server install, getting the following error in irb:

1.9.3-p194 :001 > require 'dcell'
Unable to load this gem. The libzmq version 2.0.10 is incompatible with ffi-rzmq.
I, [2012-07-01T17:22:27.930358 #19697]  INFO -- : Shutdown completed cleanly

Gems:

*** LOCAL GEMS ***

bundler (1.1.4)
celluloid (0.10.0)
celluloid-io (0.10.0)
celluloid-zmq (0.10.0)
certified (0.1.0)
dcell (0.10.0)
ffi (1.0.11)
ffi-rzmq (0.9.3)
http (0.2.0)
http_parser.rb (0.5.3)
moneta (0.6.0)
nio4r (0.4.0)
rake (0.9.2.2)
redis (3.0.1)
redis-namespace (1.2.0)
reel (0.0.2)
rubygems-bundler (1.0.3)
rvm (1.11.3.4)

Will try things out on OSX in a few days.

Can hang up after running specs

I've started to develop side project using DCell, after I run specs it can hang the process on exit sometimes. One time it printed

Finished in 0.39956 seconds
1 example, 0 failures
E, [2012-01-05T17:12:20.944779 #59831] ERROR -- : DCell::Server crashed!
RuntimeError: 
/Users/brainopia/.rvm/gems/ruby-1.9.3-p0/bundler/gems/dcell-7bffa4be88ce/celluloidzmq/lib/celluloid/zmq/reactor.rb:63:in`resume'
/Users/brainopia/.rvm/gems/ruby-1.9.3-p0/bundler/gems/dcell-7bffa4be88ce/celluloidzmq/lib/celluloid/zmq/reactor.rb:63:in`block in run_once'
/Users/brainopia/.rvm/gems/ruby-1.9.3-p0/bundler/gems/dcell-7bffa4be88ce/celluloidzmq/lib/celluloid/zmq/reactor.rb:58:in`each'
/Users/brainopia/.rvm/gems/ruby-1.9.3-p0/bundler/gems/dcell-7bffa4be88ce/celluloidzmq/lib/celluloid/zmq/reactor.rb:58:in`run_once'
/Users/brainopia/.rvm/gems/ruby-1.9.3-p0/gems/celluloid-io-0.7.0/lib/celluloid/io/mailbox.rb:53:in `receive'
/Users/brainopia/.rvm/gems/ruby-1.9.3-p0/gems/celluloid-0.7.1/lib/celluloid/actor.rb:117:in `run'
/Users/brainopia/.rvm/gems/ruby-1.9.3-p0/gems/celluloid-0.7.1/lib/celluloid/actor.rb:83:in `block in initialize'
/Users/brainopia/.rvm/gems/ruby-1.9.3-p0/gems/celluloid-0.7.1/lib/celluloid/actor_pool.rb:42:in `call'
/Users/brainopia/.rvm/gems/ruby-1.9.3-p0/gems/celluloid-0.7.1/lib/celluloid/actor_pool.rb:42:in `block in create'

A few times it would print a warning after some time of inactivity:

Finished in 0.39624 seconds
1 example, 0 failures
W, [2012-01-05T17:13:15.342901 #59908]  WARN -- : Communication with master interrupted

In the rest (the majority) of the cases it would finish as supposed to after printing specs status.

Do you need the repro or is this known issue?

Shutdown is broken

Built a process like the example. When I try to stop the process with something like ctrl-c I see lots of error/warning messages about the supervision group related to NodeManager, et al.

This is a placeholder ticket while I take a look into this. @tarcieri if you have any suggestions as to where to start looking, or what might be wrong, I'd love to hear what you've got.

If I'm not able to fix the problem, I'll leave any information I find on this ticket.

Compatibility with Sidekiq

Hi.

When I include dcell in my Gemfile I'm not able to run sidekiq anymore (bundle exec sidekiq).

No initializers, only the gem 'dcell' in the Gemfile.

This is the stacktrace:

2014-11-07T10:00:33.577Z 31757 TID-5iihw INFO: Starting processing, hit Ctrl-C to stop
linking timeout of 5 seconds exceeded
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/actor.rb:217:in block (2 levels) in linking_request' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/actor.rb:203:inloop'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/actor.rb:203:in block in linking_request' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:109:inexclusive'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid.rb:431:in exclusive' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/actor.rb:198:inlinking_request'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/actor.rb:90:in monitor' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/actor.rb:101:inlink'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid.rb:199:in new_link' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/sidekiq-3.2.6/lib/sidekiq/launcher.rb:20:ininitialize'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in public_send' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:indispatch'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in dispatch' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:inblock in handle_message'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in block in task' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:inblock in initialize'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in block in create' (celluloid):0:inremote procedure call'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in value' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:inmethod_missing'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in _send_' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/celluloid-0.15.2/lib/celluloid.rb:189:innew'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/sidekiq-3.2.6/lib/sidekiq/cli.rb:75:in run' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/gems/sidekiq-3.2.6/bin/sidekiq:8:in<top (required)>'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/bin/sidekiq:23:in load' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/bin/sidekiq:23:in

'
/home/stefano/.rvm/gems/ruby-2.1.3@smallpay/bin/ruby_executable_hooks:15:in eval' /home/stefano/.rvm/gems/ruby-2.1.3@smallpay/bin/ruby_executable_hooks:15:in'

Any suggestions?

dcell broke?

Maybe this is just my machine, but I tried: require 'dcell' on irb in 2.1.0, 2.1.1, and jruby-1.7.11.

On MRI I get:

NameError: uninitialized constant HTTP::Header
    from /Users/ryanstout/.rvm/gems/ruby-2.1.0/gems/reel-0.4.0/lib/reel/response.rb:3:in `<class:Response>'
    from /Users/ryanstout/.rvm/gems/ruby-2.1.0/gems/reel-0.4.0/lib/reel/response.rb:2:in `<module:Reel>'
    from /Users/ryanstout/.rvm/gems/ruby-2.1.0/gems/reel-0.4.0/lib/reel/response.rb:1:in `<top (required)>'
    from /Users/ryanstout/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/ryanstout/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/ryanstout/.rvm/gems/ruby-2.1.0/gems/reel-0.4.0/lib/reel.rb:18:in `<top (required)>'
    from /Users/ryanstout/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/ryanstout/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/ryanstout/.rvm/gems/ruby-2.1.0/gems/dcell-0.15.0/lib/dcell.rb:2:in `<top (required)>'
    from /Users/ryanstout/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /Users/ryanstout/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /Users/ryanstout/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from (irb):1
    from /Users/ryanstout/.rvm/rubies/ruby-2.1.0/bin/irb:11:in `<main>'

On Jruby I get:

FFI::NotFoundError: Function 'zmq_ctx_new' not found in [/usr/local/lib/libzmq.dylib]
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/ffi/library.rb:168:in `attach_function'
    from org/jruby/RubyArray.java:1613:in `each'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/ffi/library.rb:164:in `attach_function'
    from /Users/ryanstout/.rvm/gems/jruby-1.7.11/gems/ffi-rzmq-core-1.0.3/lib/ffi-rzmq-core/libzmq.rb:76:in `LibZMQ'
    from /Users/ryanstout/.rvm/gems/jruby-1.7.11/gems/ffi-rzmq-core-1.0.3/lib/ffi-rzmq-core/libzmq.rb:6:in `(root)'
    from org/jruby/RubyKernel.java:1085:in `require'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/ryanstout/.rvm/gems/jruby-1.7.11/gems/ffi-rzmq-core-1.0.3/lib/ffi-rzmq-core.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1085:in `require'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/ryanstout/.rvm/gems/jruby-1.7.11/gems/ffi-rzmq-core-1.0.3/lib/ffi-rzmq-core.rb:3:in `(root)'
    from org/jruby/RubyKernel.java:1085:in `require'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
... 2 levels...
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/ryanstout/.rvm/gems/jruby-1.7.11/gems/ffi-rzmq-2.0.1/lib/ffi-rzmq.rb:66:in `(root)'
    from org/jruby/RubyKernel.java:1085:in `require'
    from /Users/ryanstout/.rvm/gems/jruby-1.7.11/gems/celluloid-zmq-0.16.0.pre/lib/celluloid/zmq.rb:1:in `(root)'
    from /Users/ryanstout/.rvm/gems/jruby-1.7.11/gems/celluloid-zmq-0.16.0.pre/lib/celluloid/zmq.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1121:in `eval'
    from /Users/ryanstout/.rvm/gems/jruby-1.7.11/gems/dcell-0.15.0/lib/dcell.rb:1:in `(root)'
    from /Users/ryanstout/.rvm/gems/jruby-1.7.11/gems/dcell-0.15.0/lib/dcell.rb:3:in `(root)'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
    from /Users/ryanstout/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:135:in `require'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1521:in `loop'
    from org/jruby/RubyKernel.java:1284:in `catch'
    from org/jruby/RubyKernel.java:1284:in `catch'

Am I missing something?

Thanks

client example

i understannd the logic of the server, But how can i call a node from a rails application and wait it.

There is some example of a client connected to a node server. Or a client must be obbligatory another node server?

`require 'dcell'` already throws `DCell::NotConfiguredError` at the end

Having a simple script with one line:

require 'dcell'

already gives the following error when the script terminates:

DCell::NotConfiguredError: please configure DCell with DCell.setup

I'd expect it to do nothing until I call something like DCell.start or try to use is (DCell::Node.all etc.). (Happens for me in Rails when I run a rake task: I want to skip DCell completely then, but it always throws this error at the end of the script.)

registry: on node exit all nodes are cleared

Once one node leaves the playground it removes all items from the node registry. Thus it is not possible to launch several nodes in separate instances even on one machine if one of the nodes crashes.

Thoughts about the future of dcell and celluloid-zmq

dcell

cons

  • depends on another process for registry needs
  • no authentication
  • no authorization
  • connected peers can execute any ruby code
  • encryption setup must be done manually
  • not compatible with other languages

pros

  • no need to implement serialization or a rpc protocol, its just marshaled objects send to celluloid mailboxes

celluloid-zmq

celluloid-zmq can stay as it is right now, the zeromq maintainers said they made some mistakes with zeromq, their answer: https://github.com/zeromq/czmq. czmq is a high level zeromq binding written in c which should be the used for other language bindings.
Other notable new projects bourn around czmq: https://github.com/zeromq/zproto, https://github.com/zeromq/zyre. zproto is a protocol generator for server and client classes in several languages around czmq based on finite state machines. zyre is a discovery framework.

czmq is rapidly approaching version 3 which adds a lot new features, i have written a wrapper for it: https://github.com/Asmod4n/ruby-ffi-czmq. I believe it should not replace celluloid-zmq.

czmq v3 api summary: https://github.com/zeromq/czmq#api-v3-summary

possbile solutions for the current cons of dcell

  • zyre can be used for node and service discovery and for global storage
  • authentication can be done with zauth
  • a small DSL can be written for Celluloid Actors to white- and blacklist methods based on capabilities
  • automatic configuration of encryption can be handled with zcert and zconfig
  • compatibility with other languages can be achieved by using msgpack for serialization and wamp as the RPC protocol (only using wamp as a example, due to the usage of zeromq and zyre it can be reduced to 3 rpc calls)

While capnproto looks nice I haven't yet found a c binding which could be used as a starting point for a ffi wrapper which handles serialization and rpc, the "time traveling" part also gets at least partially solved with zeromqs message batching. capnproto also has the same issue as protobuf for me: you need to learn a new type system and duplicate existing code.

I just don't know where to inject all that code.
Wrap everything into a czmq zactor written in c or ruby or better have both options in case there is no c compiler installed?
Inject most of it into celluloid actors itself?
Expand Celluloid Supervisors?

I for one would go for the czmq zactors in c and ruby so dcell can be the get go for other languages to wrap the c zactor to have a portable rpc implementation.

What would change to how it is now to users of dcell would be rather minimal, the only thing that would be missing are datatypes msgpack can't serialize.

[Trivial] Prerequisites need on Introduction page.

Hello developers.

I think It is good idea to add Prerequisites page link on this page.
https://github.com/celluloid/dcell

Because I didn't know It's need redis-server until execute itchy.rb sample
And I couldn't find Redis keyword on that page.

Could you add the following block on that page.?

Prerequisites

Read Prerequisites page.

Execution result

% ruby itchy.rb 
D, [2014-07-08T18:07:03.363530 #3568] DEBUG -- : Terminating 1 actor...
/path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis/client.rb:276:in `rescue in establish_connection': Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED) (Redis::CannotConnectError)
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis/client.rb:271:in `establish_connection'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis/client.rb:69:in `connect'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis/client.rb:290:in `ensure_connected'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis/client.rb:177:in `block in process'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis/client.rb:256:in `logging'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis/client.rb:176:in `process'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis/client.rb:84:in `call'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis.rb:1747:in `block in hset'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis.rb:36:in `block in synchronize'
    from /path/to/ruby/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis.rb:36:in `synchronize'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-3.0.4/lib/redis.rb:1746:in `hset'
    from /path/to/ruby/ruby/gems/2.0.0/gems/redis-namespace-1.3.1/lib/redis/namespace.rb:317:in `method_missing'
    from /path/to/ruby/ruby/gems/2.0.0/gems/dcell-0.15.0/lib/dcell/registries/redis_adapter.rb:40:in `set'
    from /path/to/ruby/ruby/gems/2.0.0/gems/dcell-0.15.0/lib/dcell/registries/redis_adapter.rb:53:in `set_node'
    from /path/to/ruby/ruby/gems/2.0.0/gems/dcell-0.15.0/lib/dcell/directory.rb:14:in `set'
    from /path/to/ruby/ruby/gems/2.0.0/gems/dcell-0.15.0/lib/dcell.rb:68:in `block in setup'
    from /path/to/ruby/ruby/gems/2.0.0/gems/dcell-0.15.0/lib/dcell.rb:45:in `synchronize'
    from /path/to/ruby/ruby/gems/2.0.0/gems/dcell-0.15.0/lib/dcell.rb:45:in `setup'
    from /path/to/ruby/ruby/gems/2.0.0/gems/dcell-0.15.0/lib/dcell.rb:101:in `start'
    from t.rb:3:in `<main>'

It worked properly I launch redis-server.

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

Multiple test failures

The latest Gemfile gets the wrong version of the http gem for reel. After adding the explicit dependency to the Gemfile for dcell I am able to run the tests. However I am now getting the following failures:

rspec spec/dcell [jruby-1.7.11@dcell-dev]
Waiting for test node to start up......... done!

DCell::ActorProxy
I, [2014-03-30T14:05:14.790000 #11785] INFO -- : Connected to test_node
I, [2014-03-30T14:05:14.805000 #11807] INFO -- : Connected to Sharons-iMac.local
makes synchronous calls to remote actors
handles blocks
makes future calls to remote actors
linking
links to remote actors (FAILED - 1)
unlinks from remote actors (FAILED - 2)
traps exit messages from other actors (FAILED - 3)

Celluloid extensions
marshals Celluloid::ActorProxy objects (FAILED - 4)
marshals Celluloid::Mailbox objects
marshals Celluloid::Future objects

DCell::Directory
stores node addresses

DCell::Explorer
E, [2014-03-30T14:05:29.972000 #11785] ERROR -- : Actor crashed!
TypeError: can't convert Symbol into Integer
org/jruby/RubyFixnum.java:1143:in []' /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/reel-f444124b341d/lib/reel/server.rb:23:ininitialize'
/Users/jessesanford/workspace/dcell/lib/dcell/explorer.rb:13:in initialize' org/jruby/RubyKernel.java:1965:inpublic_send'
/Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/calls.rb:26:in dispatch' /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/calls.rb:63:indispatch'
/Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/cell.rb:60:in invoke' /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/cell.rb:71:intask'
/Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/actor.rb:362:in task' /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/tasks.rb:55:ininitialize'
/Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/tasks.rb:47:in initialize' /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/tasks/task_fiber.rb:15:increate'
(celluloid):0:in `remote procedure call'
reports the current node's status (FAILED - 5)

DCell::Global
can handle unexisting keys
stores values
stores the keys of all globals

DCell::Node
finds all available nodes
finds remote actors
lists remote actors

DCell::Registry::RedisAdapter
behaves like a DCell registry
node registry
stores node addresses
stores the IDs of all nodes
global registry
stores values
stores the keys of all globals

DCell::Registry::ZkAdapter
behaves like a DCell registry
node registry
log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).
log4j:WARN Please initialize the log4j system properly.
stores node addresses
stores the IDs of all nodes
global registry
stores values
stores the keys of all globals

Failures:

  1. DCell::ActorProxy linking links to remote actors
    Failure/Error: @local_actor.link @remote_actor
    Celluloid::TimeoutError:
    mailbox timeout exceeded

    (celluloid):0:in `remote procedure call'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/calls.rb:92:in`value'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'

    ./spec/dcell/actor_proxy_spec.rb:47:in`(root)'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in `instance_eval'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:254:in `with_around_each_hooks'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:111:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:390:in `run_examples'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in`map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in `run_examples'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:371:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in`map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/reporter.rb:58:in `report'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:25:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in`autorun'

  2. DCell::ActorProxy linking unlinks from remote actors
    Failure/Error: @local_actor.link @remote_actor
    Celluloid::TimeoutError:
    mailbox timeout exceeded

    (celluloid):0:in `remote procedure call'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/calls.rb:92:in`value'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'

    ./spec/dcell/actor_proxy_spec.rb:53:in`(root)'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in `instance_eval'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:254:in `with_around_each_hooks'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:111:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:390:in `run_examples'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in`map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in `run_examples'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:371:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in`map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/reporter.rb:58:in `report'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:25:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in`autorun'

  3. DCell::ActorProxy linking traps exit messages from other actors
    Failure/Error: @local_actor.link @remote_actor
    Celluloid::TimeoutError:
    mailbox timeout exceeded

    (celluloid):0:in `remote procedure call'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/calls.rb:92:in`value'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'

    ./spec/dcell/actor_proxy_spec.rb:61:in`(root)'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in `instance_eval'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:254:in `with_around_each_hooks'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:111:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:390:in `run_examples'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in`map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in `run_examples'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:371:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in`map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/reporter.rb:58:in `report'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:25:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in`autorun'

  4. Celluloid extensions marshals Celluloid::ActorProxy objects
    Failure/Error: Marshal.load(string).should be_alive
    ArgumentError:
    wrong number of arguments calling initialize (1 for 2)

    ./lib/dcell/celluloid_ext.rb:39:in `_load'

    org/jruby/RubyMarshal.java:148:in`load'

    ./spec/dcell/celluloid_ext_spec.rb:17:in `(root)'

    org/jruby/RubyBasicObject.java:1536:in`instance_eval'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:254:in`with_around_each_hooks'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:111:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:390:in`run_examples'

    org/jruby/RubyArray.java:2409:in `map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in`run_examples'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:371:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in`run'

    org/jruby/RubyArray.java:2409:in `map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/reporter.rb:58:in `report'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:25:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in`autorun'

  5. DCell::Explorer reports the current node's status
    Failure/Error: @explorer = DCell::Explorer.new(EXPLORER_HOST, EXPLORER_PORT)
    TypeError:
    can't convert Symbol into Integer

    org/jruby/RubyFixnum.java:1143:in `[]'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/reel-f444124b341d/lib/reel/server.rb:23:in`initialize'

    ./lib/dcell/explorer.rb:13:in `initialize'

    org/jruby/RubyKernel.java:1965:in`public_send'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/calls.rb:26:in `dispatch'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/calls.rb:63:in`dispatch'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/cell.rb:60:in `invoke'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/cell.rb:71:in`task'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/actor.rb:362:in `task'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/tasks.rb:55:in`initialize'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/tasks.rb:47:in `initialize'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/tasks/task_fiber.rb:15:in`create'

    (celluloid):0:in `remote procedure call'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/calls.rb:92:in`value'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid/proxies/cell_proxy.rb:17:in`send'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/bundler/gems/celluloid-c71cc18af4e6/lib/celluloid.rb:169:in `new'

    ./spec/dcell/explorer_spec.rb:10:in`(root)'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:237:in `instance_eval'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:237:in`instance_eval'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:21:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:85:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:85:in `each'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:85:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:446:in `run_hook'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:345:in`run_before_each_hooks'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:294:in `run_before_each'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:113:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:254:in `with_around_each_hooks'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:111:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:390:in `run_examples'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in`map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in `run_examples'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:371:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in`map'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/reporter.rb:58:in`report'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:25:in `run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in`run'

    /Users/jessesanford/.rvm/gems/jruby-1.7.11@dcell-dev/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `autorun'

Finished in 21.86 seconds
25 examples, 5 failures

Failed examples:

rspec ./spec/dcell/actor_proxy_spec.rb:46 # DCell::ActorProxy linking links to remote actors
rspec ./spec/dcell/actor_proxy_spec.rb:52 # DCell::ActorProxy linking unlinks from remote actors
rspec ./spec/dcell/actor_proxy_spec.rb:60 # DCell::ActorProxy linking traps exit messages from other actors
rspec ./spec/dcell/celluloid_ext_spec.rb:15 # Celluloid extensions marshals Celluloid::ActorProxy objects
rspec ./spec/dcell/explorer_spec.rb:13 # DCell::Explorer reports the current node's status
D, [2014-03-30T14:05:30.539000 #11785] DEBUG -- : Terminating 13 actors...
W, [2014-03-30T14:05:30.546000 #11785] WARN -- : Terminating task: type=:call, meta={:method_name=>:run}, status=:zmqwait
Celluloid::TaskFiber backtrace unavailable. Please try Celluloid.task_class = Celluloid::TaskThread if you need backtraces here.

JDBC via Sequel over DCell

I'd like to do the same thing as mentioned here http://ewout.name/2010/10/jdbc-access-with-distributed-ruby/
But with DCell instead of Drb, and I miserably fail.

I tried to make something like :

class SequelCsvSource
  include Celluloid
  def initialize
    @db = Sequel.connect("jdbc:h2:mem:")
  end

  def load(file)
    @ds = @db.fetch("SELECT * FROM CSVREAD('#{file}')")
  end
end

But it seems I cannot expose a sequel dataset as it contains Procs and they can't be serialized.
JRuby gives me this error :

 Celluloid::AbortError: caused by TypeError: no marshal_dump is defined for class Proc

Any ideas ?

DCell::NodeManager is crashing on initialize too quickly

When I execute the following ruby code using 1.9.3-p125 on Linux Mint 12:

require 'dcell'
DCell.start :id => "node1", :addr => "tcp://127.0.0.1:7777"

I get the following:

$ ruby node1.rb 
I, [2012-04-19T18:59:05.475372 #10118]  INFO -- : Connected to node1
W, [2012-04-19T18:59:05.529861 #10118]  WARN -- : DCell::NodeManager is crashing on initialize too quickly, sleeping for 30 seconds
W, [2012-04-19T18:59:05.530934 #10118]  WARN -- : DCell::Server is crashing on initialize too quickly, sleeping for 30 seconds
W, [2012-04-19T18:59:35.531249 #10118]  WARN -- : DCell::NodeManager is crashing on initialize too quickly, sleeping for 30 seconds
W, [2012-04-19T18:59:35.532206 #10118]  WARN -- : DCell::Server is crashing on initialize too quickly, sleeping for 30 seconds

I have:

tom@tole:~$ gem list | grep dcell
dcell (0.10.0)
tom@tole:~$ dpkg --list | grep zmq
ii  libzmq-dev                             2.1.9-1                                 ZeroMQ lightweight messaging kernel (development libraries and header files)
ii  libzmq1                                2.1.9-1                                 ZeroMQ lightweight messaging kernel (shared library)

DCell tries to setup regardless, so long as its required

Hi,

So, firstly, I just released a SOA framework gem that is powered by dcell
https://github.com/jasonayre/cylons

If I could get a link in the readme that would be cool!

But anyways, Im having an issue was wondering if you could shed some light on, I believe it to be a bug but..

I noticed when running my apps that are using my gem, when DCell shouldn't be connecting to anything or doing anything, it still acts like it tried to connect, or is somehow launching threads, Im not sure. I thought it was a bug in my own code, because I was really sloppy with my requires in the main file,

https://github.com/jasonayre/cylons/blob/master/lib/cylons.rb

-- The problem is, if I include my gem in a rails app, and I run a rake task, or spec, or do anything where rails is loaded, even though the railtie is being skipped, when I exit the console or task finishes, it throws this error:

Terminating 4 actors...
Celluloid::SupervisionGroup crashed!
DCell::NotConfiguredError: please configure DCell with DCell.setup
    /Users/jayre/.rvm/gems/jruby-1.7.4/gems/dcell-0.15.0/lib/dcell.rb:76:in `id'
    /Users/jayre/.rvm/gems/jruby-1.7.4/gems/dcell-0.15.0/lib/dcell/celluloid_ext.rb:56:in `address'
    /Users/jayre/.rvm/gems/jruby-1.7.4/gems/celluloid-0.15.2/lib/celluloid/links.rb:22:in `delete'
    /Users/jayre/.rvm/gems/jruby-1.7.4/gems/celluloid-0.15.2/lib/celluloid/actor.rb:354:in `handle_exit_event'
    /Users/jayre/.rvm/gems/jruby-1.7.4/gems/celluloid-0.15.2/lib/celluloid/actor.rb:340:in `handle_system_event'
    /Users/jayre/.rvm/gems/jruby-1.7.4/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `task'
    /Users/jayre/.rvm/gems/jruby-1.7.4/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `initialize'
    /Users/jayre/.rvm/gems/jruby-1.7.4/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `create'

SOMETIMES, it will throw that error I should say, but everytime without fail it says
Terminating 4 actors
As if it somehow trying to load dead supervision groups that don't even exist in the context of this application run? Im horribly confused as to what is happening, as it's not even connecting to ZK or anything.

Checkout https://github.com/jasonayre/cylons_demo

The admin app in particular, thats the one Ive been testing with. I commented out every require and all the code in my main module in the main cylons.rb file (and pointed to the local gem), and yet, it still does the same thing. Heres the thing, the railtie right now is responsible for creating the rpc service clients dynamically, from what is present in the zookeeper registry. So, theres no way for the app to know that any actors exist anywhere without there being a connection, which there cannot possibly be when all the code is commented out. I pushed a branch to demonstrate.

https://github.com/jasonayre/cylons/tree/dcell_bug_example

So ya if you pull down the cylons_demo + point the admin app to that branch, and load a console, you should see when you exit, either the big error, or the
Terminating 4 actors
It seems kind of random.

But ya, if you pull down gem and uncomment require 'dcell', youll see it won't happen.

Anyways, any idea what Im missing, or what could be happening?

P.S. great gem, hope you're planning on continuing development on it! :)

LoadError: cannot load such file -- moneta/memory

dcell (0.10.0)
moneta (0.7.14)

irb(main):001:0> require 'dcell'
LoadError: cannot load such file -- moneta/memory
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/dcell-0.10.0/lib/dcell/registries/moneta_adapter.rb:2:in `<top (required)>'
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/dcell-0.10.0/lib/dcell.rb:22:in `<top (required)>'
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from (irb):1
        from /Users/mbailey/.rbenv/versions/1.9.3-p194/bin/irb:12:in `<main>'

Architecture issues

My question is about Directory service and its meaning

According to wiki, to join a cluster I should specify address of a directory node (as I understand it should coordinate connected nodes) - but it just forwards all requests to registry and basicly becomes a redundant entity

More over - registry does not track a node state (I'm talking about redis adapter, don't know about other adapters) and stores dead nodes for infinite time

There is no timeouts, connection check, etc - this means if try to connect to a dead node, which we can find in a registry, we will wait for it forever

I want to know what was the original idea ?

What responsibilities of a Directory service ?

Who is responsible for Node state tracking ?

If Directory service should coordinate connected nodes - it means, we don't have to be connected to registry - instead, we should forward all the registry's calls to the Directory service , right ?

In case if a different Directory nodes connected to same Registry - should nodes from one cluster be discoverable by nodes from another one ?

add an example

Hi,
I started playing with dcell but I have a pretty hard time figuring what to do to build a simple test system with some actors and one client, my actors are working but do not "talk" to each others (I started an explorer node which only sees itself). I configured redis as a registry but none of them ever connects to my redis instance :/

Here is one of my actors:

require 'rubygems'
require 'bundler/setup'

require 'dcell'

class TimeServer
  include Celluloid

  def time
    "The time is: #{Time.now}"
  end
end


TimeServer.supervise_as :time_server

DCell.start :id => "actor1", :addr => "tcp://127.0.0.1:2041",
  :registry => { adapter: 'redis' }

sleep

It starts fine printing "Connected to actor1" (which really puzzle me btw, why does it connects to itself ?) but never connects to redis.

Having an example somewhere would be nice to give us a sandbox to play with and understand how things works before trying it on a real project.

dcell node id is not unique

Currently the node id autogeneration is just a hostname of a local box. This does not allow by default launching several clients easily(w/o generating the uuid in the client code).

Block when acessing actor from foreign node

I'm using DCell with redis registry. I've started these two scripts where both nodes were registered the first time to redis. Through it, they are sharing an access address and they communicate.

Problem is, if I stop one script, everytime the running script tries to access it, it blocks.

DCell::Node["app"] 
#=> #<DCell::Node[app] @addr="tcp://127.0.0.1:8888"> 
# Important, the node is there, but since the respective script is running, no actor is reachable. 
DCell::Node["app"]["time_server"]
#=> Connected to "app"
......

It seems that this happens because the stopped script has registered itself in redis the first time it ran, but it never unregistered itself when it stopped. Hence, the second script still gets the reference to its address.

So the question is, is there a way to unregister itself from the cluster on process stopped? Some way to prevent the block from happening?

DCell::Server::InvalidMessageError: invalid message: wrong number of arguments calling `initialize` (1 for 2)

Getting this on DCell >=0.15.0 using both MRI 1.9.3-p545 and jruby 1.7.11

$ ruby scratchy.rb
Fighting itchy! (check itchy's output)
I, [2014-03-29T15:59:12.457000 #68690] INFO -- : Connected to itchy
E, [2014-03-29T15:59:12.555000 #68690] ERROR -- : couldn't decode message
DCell::Server::InvalidMessageError: invalid message: wrong number of arguments calling initialize (1 for 2)
/Users/jessesanford/.rvm/gems/jruby-1.7.11/gems/dcell-0.16.0.pre/lib/dcell/server.rb:59:in decode_message' /Users/jessesanford/.rvm/gems/jruby-1.7.11/gems/dcell-0.16.0.pre/lib/dcell/server.rb:38:inhandle_message'
org/jruby/RubyKernel.java:1965:in public_send' /Users/jessesanford/.rvm/gems/jruby-1.7.11/gems/celluloid-0.16.0.pre/lib/celluloid/calls.rb:26:indispatch'
/Users/jessesanford/.rvm/gems/jruby-1.7.11/gems/celluloid-0.16.0.pre/lib/celluloid/calls.rb:122:in dispatch' /Users/jessesanford/.rvm/gems/jruby-1.7.11/gems/celluloid-0.16.0.pre/lib/celluloid/cell.rb:60:ininvoke'
/Users/jessesanford/.rvm/gems/jruby-1.7.11/gems/celluloid-0.16.0.pre/lib/celluloid/cell.rb:71:in task' /Users/jessesanford/.rvm/gems/jruby-1.7.11/gems/celluloid-0.16.0.pre/lib/celluloid/actor.rb:362:intask'
/Users/jessesanford/.rvm/gems/jruby-1.7.11/gems/celluloid-0.16.0.pre/lib/celluloid/tasks.rb:55:in initialize' /Users/jessesanford/.rvm/gems/jruby-1.7.11/gems/celluloid-0.16.0.pre/lib/celluloid/tasks/task_fiber.rb:15:increate'

dcell needs a new maintainer

I am not using dcell and have no plans on using dcell in the future.

I have been trying to review and accept patches, but things have not been going well. Being unable to quickly test changes against my own systems, it seems many of the ones I have accepted have caused breakages.

There are a lot of open issues lately: #69, #70, #73, #75, #77, #79, #81, #82, #85 and I don't have time to review or help fix them.

dcell could really use a new maintainer! Is anyone interested? @niamster? @TiagoCardoso1983?

Implement Celluloid::Sync

For inclusion of Celluloid itself, we will need to use culture/sync for a while, since Bundler does not support the sort of interdependency we need. I'd put this in a new 0.17.0-dependent branch.

Clean up the registry API

As per celluloid/floss#14, the registry API is to be refactored. As per a discussion with @tarcieri on IRC, this includes the following changes:

A new API for implementing a registry.

class RegistryAdapter
    def initialize(options = {})
    end

    def get(namespace, key)
    end

    def set(namespace, key, value)
    end

    def keys(namespace)
    end

    def clear(namespace)
    end
end

A registry should be an actor too.

Refactor Global and Directory

Provide a NamespaceProxy to DRY this up:

global = registry[:global] # => DCell::Registry::NamespaceProxy
global[:foo] = :bar

One of the following:

  • Provide DCell.global[:foo] and DCell.directory[:bar] (or DCell[:global, :foo])
  • Use Node[:bar] for the directory and DCell[:bar] for globals.

Opinions?

Unable to run spec on OSX with various MRI Rubies

I've tried running the default rake task with various different ruby versions, but I haven't been able to get anything to work.

With Ruby 2.2.1 and Ruby 1.9.3 I get a seg fault in the http_parser gem, and with Ruby 2.1.2 I can start the task but it fails when trying to initialize the SupervisionGroup with a Celluloid::Task::TerminatedError. I'm just trying to poke around the code and hopefully start updating the documentation to the new changes. Any help would be awesome, thanks. :)

NameError: undefined method 'respond_to?' for class 'Celluloid::ActorProxy'

Using MRI 1.9.3-p545 and Jruby 1.7.11

NameError: undefined method 'respond_to?' for class 'Celluloid::ActorProxy'
alias_method at org/jruby/RubyModule.java:2283
ActorProxy at /Users/jessesanford/workspace/dcell_test/vendor/bundle/jruby/1.9/gems/dcell-0.16.0.pre/lib/dcell/celluloid_ext.rb:16
Celluloid at /Users/jessesanford/workspace/dcell_test/vendor/bundle/jruby/1.9/gems/dcell-0.16.0.pre/lib/dcell/celluloid_ext.rb:12
(root) at /Users/jessesanford/workspace/dcell_test/vendor/bundle/jruby/1.9/gems/dcell-0.16.0.pre/lib/dcell/celluloid_ext.rb:11
require at org/jruby/RubyKernel.java:1085
require at /Users/jessesanford/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require at /Users/jessesanford/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53
(root) at /Users/jessesanford/workspace/dcell_test/vendor/bundle/jruby/1.9/gems/dcell-0.16.0.pre/lib/dcell.rb:1
require at org/jruby/RubyKernel.java:1085
require at /Users/jessesanford/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require at /Users/jessesanford/.rvm/rubies/jruby-1.7.11/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53
(root) at script_runner.rb:39

Position of alias_method in ActorProxy

module Celluloid
  class ActorProxy
    # Marshal uses respond_to? to determine if this object supports _dump so
    # unfortunately we have to monkeypatch in _dump support as the proxy
    # itself normally jacks respond_to? and proxies to the actor
    def respond_to?(meth, check_private = false)
      return false if meth == :marshal_dump
      return true  if meth == :_dump
      __respond_to?(meth, check_private)
    end
    alias_method :__respond_to?, :respond_to?

Unless alias_method is below def respond_to? it breaks with itchy & scratchy, but I wonder if there is a specific reason for the placement, for other areas of Celluloid? I can't see how though, because the method doesn't exist until it's defined. In my local code I have it as shown above. Commit that along with #59?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.