lib/dcell/celluloid_ext.rb in dcell-0.9.0 vs lib/dcell/celluloid_ext.rb in dcell-0.10.0
- old
+ new
@@ -43,11 +43,11 @@
class Mailbox
# This custom dumper registers actors with the DCell registry so they can
# be reached remotely.
def _dump(level)
mailbox_id = DCell::Router.register self
- "#{mailbox_id}@#{DCell.id}"
+ "#{mailbox_id}@#{DCell.id}@#{DCell.addr}"
end
# Create a mailbox proxy object which routes messages over DCell's overlay
# network and back to the original mailbox
def self._load(string)
@@ -55,15 +55,26 @@
end
end
class SyncCall
def _dump(level)
- rpc_id = DCell::RPC::Manager.register self
+ uuid = DCell::RPC::Manager.register self
payload = Marshal.dump([@caller,@method,@arguments,@block])
- "#{rpc_id.to_s(16)}@#{DCell.id}:#{payload}"
+ "#{uuid}@#{DCell.id}:#{payload}"
end
def self._load(string)
DCell::RPC._load(string)
+ end
+ end
+
+ class Future
+ def _dump(level)
+ mailbox_id = DCell::Router.register self
+ "#{mailbox_id}@#{DCell.id}@#{DCell.addr}"
+ end
+
+ def self._load(string)
+ DCell::FutureProxy._load(string)
end
end
end