vitobotta-brb 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/brb/request.rb +5 -12
- data/lib/brb/tunnel.rb +1 -0
- metadata +53 -33
data/lib/brb/request.rb
CHANGED
|
@@ -57,11 +57,6 @@ module BrB
|
|
|
57
57
|
|
|
58
58
|
# Execute a request on the local object
|
|
59
59
|
def new_brb_in_request(meth, *args)
|
|
60
|
-
client_info = {
|
|
61
|
-
:ip_address => @ip_address,
|
|
62
|
-
:port => @port
|
|
63
|
-
}
|
|
64
|
-
|
|
65
60
|
if is_brb_request_blocking?(meth)
|
|
66
61
|
|
|
67
62
|
m = meth.to_s
|
|
@@ -70,10 +65,9 @@ module BrB
|
|
|
70
65
|
idrequest = args.pop
|
|
71
66
|
thread = args.pop
|
|
72
67
|
|
|
73
|
-
args << client_info
|
|
74
68
|
begin
|
|
75
|
-
|
|
76
|
-
r = @object.send(m, *args)
|
|
69
|
+
args << { :ip_address => @ip_address, :port => @port } if @ip_address
|
|
70
|
+
r = ((args.size > 0) ? @object.send(m, *args) : @object.send(m))
|
|
77
71
|
brb_send([ReturnCode, r, thread, idrequest])
|
|
78
72
|
rescue Exception => e
|
|
79
73
|
brb_send([ReturnCode, e, thread, idrequest])
|
|
@@ -82,11 +76,10 @@ module BrB
|
|
|
82
76
|
#raise e
|
|
83
77
|
end
|
|
84
78
|
else
|
|
85
|
-
args << client_info
|
|
86
|
-
|
|
87
79
|
begin
|
|
88
|
-
|
|
89
|
-
@object.send(meth, *args)
|
|
80
|
+
args << { :ip_address => @ip_address, :port => @port } if @ip_address
|
|
81
|
+
(args.size > 0) ? @object.send(meth, *args) : @object.send(meth)
|
|
82
|
+
|
|
90
83
|
rescue Exception => e
|
|
91
84
|
BrB.logger.error "#{e.to_s} => By calling #{meth} on #{@object.class} with args : #{args.inspect}"
|
|
92
85
|
BrB.logger.error e.backtrace.join("\n")
|
data/lib/brb/tunnel.rb
CHANGED
metadata
CHANGED
|
@@ -1,35 +1,46 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vitobotta-brb
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
hash: 23
|
|
5
5
|
prerelease:
|
|
6
|
+
segments:
|
|
7
|
+
- 0
|
|
8
|
+
- 3
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.3.2
|
|
6
11
|
platform: ruby
|
|
7
|
-
authors:
|
|
12
|
+
authors:
|
|
8
13
|
- Guillaume Luccisano
|
|
9
14
|
autorequire:
|
|
10
15
|
bindir: bin
|
|
11
16
|
cert_chain: []
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
dependencies:
|
|
15
|
-
- !ruby/object:Gem::Dependency
|
|
17
|
+
|
|
18
|
+
date: 2011-06-26 00:00:00 Z
|
|
19
|
+
dependencies:
|
|
20
|
+
- !ruby/object:Gem::Dependency
|
|
16
21
|
name: eventmachine
|
|
17
|
-
|
|
22
|
+
prerelease: false
|
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
18
24
|
none: false
|
|
19
|
-
requirements:
|
|
20
|
-
- -
|
|
21
|
-
- !ruby/object:Gem::Version
|
|
22
|
-
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">"
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
hash: 19
|
|
29
|
+
segments:
|
|
30
|
+
- 0
|
|
31
|
+
- 12
|
|
32
|
+
version: "0.12"
|
|
23
33
|
type: :runtime
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
description: BrB is a simple, fully transparent and extremely fast interface for doing
|
|
27
|
-
simple distributed ruby and message passing
|
|
34
|
+
version_requirements: *id001
|
|
35
|
+
description: BrB is a simple, fully transparent and extremely fast interface for doing simple distributed ruby and message passing
|
|
28
36
|
email: guillaume.luccisano@gmail.com
|
|
29
37
|
executables: []
|
|
38
|
+
|
|
30
39
|
extensions: []
|
|
40
|
+
|
|
31
41
|
extra_rdoc_files: []
|
|
32
|
-
|
|
42
|
+
|
|
43
|
+
files:
|
|
33
44
|
- examples/simple_client.rb
|
|
34
45
|
- examples/simple_core.rb
|
|
35
46
|
- lib/brb/event_machine.rb
|
|
@@ -52,31 +63,40 @@ files:
|
|
|
52
63
|
- Rakefile
|
|
53
64
|
- README.rdoc
|
|
54
65
|
- init.rb
|
|
55
|
-
has_rdoc: true
|
|
56
66
|
homepage: http://github.com/kwi/BrB
|
|
57
67
|
licenses: []
|
|
68
|
+
|
|
58
69
|
post_install_message:
|
|
59
70
|
rdoc_options: []
|
|
60
|
-
|
|
71
|
+
|
|
72
|
+
require_paths:
|
|
61
73
|
- lib
|
|
62
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
75
|
none: false
|
|
64
|
-
requirements:
|
|
65
|
-
- -
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
requirements:
|
|
77
|
+
- - ">="
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
hash: 3
|
|
80
|
+
segments:
|
|
81
|
+
- 0
|
|
82
|
+
version: "0"
|
|
83
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
84
|
none: false
|
|
70
|
-
requirements:
|
|
71
|
-
- -
|
|
72
|
-
- !ruby/object:Gem::Version
|
|
85
|
+
requirements:
|
|
86
|
+
- - ">="
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
hash: 19
|
|
89
|
+
segments:
|
|
90
|
+
- 1
|
|
91
|
+
- 3
|
|
92
|
+
- 4
|
|
73
93
|
version: 1.3.4
|
|
74
|
-
requirements:
|
|
94
|
+
requirements:
|
|
75
95
|
- eventmachine
|
|
76
96
|
rubyforge_project: vitobotta-brb
|
|
77
|
-
rubygems_version: 1.
|
|
97
|
+
rubygems_version: 1.8.5
|
|
78
98
|
signing_key:
|
|
79
99
|
specification_version: 3
|
|
80
|
-
summary: BrB is a simple, fully transparent and extremely fast interface for doing
|
|
81
|
-
simple distributed ruby
|
|
100
|
+
summary: BrB is a simple, fully transparent and extremely fast interface for doing simple distributed ruby
|
|
82
101
|
test_files: []
|
|
102
|
+
|