foreign_actor 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/foreign_actor/client.rb +3 -3
- data/lib/foreign_actor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbdfb5ae177372dc6f577a4b13645fe913198834
|
4
|
+
data.tar.gz: 46183bcb89ae866973a149b201c74e15b0918076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18d811ee8a8a026e4d2142e336a146c09ef05ac11f21c88597b745bd90ea3b2b0ba7c8000f64e9c77f6d46f5e2f8de5901cc72b2589c5cba6dfbccccf0878c4f
|
7
|
+
data.tar.gz: 861dc8e97f7f61b87c3dcf073c58c2a27300aadfcc0059640997179cc9b6cee18ef1b19a2945aec863f11765596cf4609f778a0bca9d72421c156c871ada7f43
|
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# What is this ?
|
2
2
|
|
3
|
-
I wanted to combine two great libraries for concurrent work:
|
3
|
+
I wanted to combine two great libraries for concurrent work: Zeromq and Celluloid.
|
4
4
|
Foreign Actor is my attempt at building a simple way to distribute celluloid actors
|
5
5
|
in multiple processes/machines, the idea is to be able to move an actor to another process with no change to the actor itself and minimal changes on the server and client side code.
|
6
6
|
|
7
7
|
|
8
8
|
# How ?
|
9
|
-
I used the
|
9
|
+
I used the Zeromq library to achieve my goal using XREQ/XREP sockets, this allows multiple clients with multiple workers each clients being able to make calls with or without a return value.
|
10
10
|
|
11
11
|
Here is what it looks like:
|
12
12
|
![](https://raw.github.com/schmurfy/foreign_actor/master/docs/design.png "Architecture")
|
data/lib/foreign_actor/client.rb
CHANGED
@@ -72,10 +72,10 @@ module ForeignActor
|
|
72
72
|
def initialize(endpoint, request_timeout = nil, reactor_name = :xs_reactor)
|
73
73
|
@reactor_name = reactor_name
|
74
74
|
@request_timeout = request_timeout
|
75
|
-
@socket = Actor[@reactor_name].socket(ZMQ::XREQ)
|
75
|
+
@socket = Actor[@reactor_name].socket(::ZMQ::XREQ)
|
76
76
|
rc = @socket.connect(endpoint)
|
77
|
-
unless ZMQ::Util.resultcode_ok?(rc)
|
78
|
-
raise IOError, "connect failed: #{ZMQ::Util.error_string}"
|
77
|
+
unless ::ZMQ::Util.resultcode_ok?(rc)
|
78
|
+
raise IOError, "connect failed: #{::ZMQ::Util.error_string}"
|
79
79
|
end
|
80
80
|
|
81
81
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreign_actor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Ammous
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi-rzmq
|