asir 0.2.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -2
- data/README.textile +4 -2
- data/VERSION +1 -1
- data/asir.gemspec +1 -4
- data/asir.riterate.yml +1 -0
- data/bin/asir +2 -1
- data/example/asir_control.sh +63 -1
- data/example/asir_control_client_http.rb +2 -2
- data/example/asir_control_client_resque.rb +16 -0
- data/example/asir_control_client_zmq.rb +3 -3
- data/example/config/asir_config.rb +20 -8
- data/example/ex02.rb +1 -1
- data/example/ex03.rb +2 -2
- data/example/ex04.rb +2 -2
- data/example/ex05.rb +1 -1
- data/example/ex06.rb +6 -5
- data/example/ex07.rb +2 -2
- data/example/ex08.rb +2 -2
- data/example/ex09.rb +2 -2
- data/example/ex10.rb +2 -2
- data/example/ex11.rb +5 -5
- data/example/ex12.rb +6 -6
- data/example/ex13.rb +4 -4
- data/example/ex14.rb +4 -4
- data/example/ex15.rb +2 -2
- data/example/ex16.rb +8 -8
- data/example/ex17.rb +12 -11
- data/example/ex18.rb +5 -5
- data/example/ex19.rb +3 -3
- data/example/ex20.rb +3 -3
- data/example/ex21.rb +3 -3
- data/example/ex22.rb +1 -1
- data/example/ex23.rb +2 -2
- data/example/ex24.rb +4 -4
- data/example/ex25.rb +41 -0
- data/example/example_helper.rb +38 -3
- data/example/sample_service.rb +4 -4
- data/hack_night/exercise/prob-3.rb +3 -3
- data/hack_night/exercise/prob-6.rb +2 -2
- data/hack_night/exercise/prob-7.rb +2 -2
- data/hack_night/solution/prob-2.rb +2 -2
- data/hack_night/solution/prob-3.rb +3 -3
- data/hack_night/solution/prob-6.rb +7 -6
- data/hack_night/solution/prob-7.rb +6 -6
- data/{spec → lab}/const_get_speed_spec.rb +0 -0
- data/lib/asir.rb +29 -7
- data/lib/asir/additional_data.rb +25 -0
- data/lib/asir/channel.rb +4 -5
- data/lib/asir/client.rb +29 -13
- data/lib/asir/config.rb +8 -0
- data/lib/asir/description.rb +34 -0
- data/lib/asir/environment.rb +96 -0
- data/lib/asir/error.rb +4 -1
- data/lib/asir/invoker.rb +14 -0
- data/lib/asir/main.rb +84 -103
- data/lib/asir/message.rb +1 -1
- data/lib/asir/poll_throttle.rb +53 -0
- data/lib/asir/retry_behavior.rb +1 -1
- data/lib/asir/thread_variable.rb +183 -0
- data/lib/asir/transport.rb +36 -23
- data/lib/asir/transport/beanstalk.rb +18 -52
- data/lib/asir/transport/conduit.rb +42 -0
- data/lib/asir/transport/connection_oriented.rb +32 -56
- data/lib/asir/transport/delegation.rb +5 -5
- data/lib/asir/transport/demux.rb +33 -0
- data/lib/asir/transport/file.rb +5 -3
- data/lib/asir/transport/payload_io.rb +8 -4
- data/lib/asir/transport/resque.rb +212 -0
- data/lib/asir/transport/stream.rb +19 -9
- data/lib/asir/transport/tcp_socket.rb +3 -2
- data/lib/asir/transport/zmq.rb +14 -17
- data/lib/asir/uri_config.rb +51 -0
- data/lib/asir/version.rb +1 -1
- data/spec/client_spec.rb +48 -0
- data/spec/demux_spec.rb +38 -0
- data/spec/json_spec.rb +0 -2
- data/spec/message_spec.rb +68 -0
- data/spec/performance_spec.rb +66 -0
- data/spec/spec_helper.rb +34 -0
- data/spec/thread_variable_spec.rb +135 -0
- data/spec/transport_spec.rb +82 -0
- metadata +28 -4
data/example/ex12.rb
CHANGED
@@ -5,25 +5,25 @@ require 'example_helper'
|
|
5
5
|
require 'asir/transport/beanstalk'
|
6
6
|
require 'asir/coder/zlib'
|
7
7
|
begin
|
8
|
-
Email.
|
8
|
+
Email.asir.transport = t =
|
9
9
|
ASIR::Transport::Beanstalk.new(:address => '127.0.0.1', :port => 30904)
|
10
10
|
t.encoder =
|
11
11
|
ASIR::Coder::Chain.new(:encoders =>
|
12
12
|
[ ASIR::Coder::Marshal.new,
|
13
13
|
ASIR::Coder::Zlib.new, ])
|
14
|
-
t.
|
15
|
-
pr Email.
|
14
|
+
t.start_conduit!; sleep 1
|
15
|
+
pr Email.asir.send_email(:pdf_invoice,
|
16
16
|
:to => "user@email.com", :customer => @customer)
|
17
17
|
sleep 2
|
18
18
|
server_process do
|
19
|
-
t.
|
20
|
-
t.
|
19
|
+
t.prepare_server!
|
20
|
+
t.run_server!
|
21
21
|
end
|
22
22
|
rescue Object => err
|
23
23
|
$stderr.puts "#{err.inspect}\n#{err.backtrace * "\n"}"
|
24
24
|
ensure
|
25
25
|
t.close; sleep 3; server_kill; sleep 2
|
26
|
-
t.
|
26
|
+
t.stop_conduit!
|
27
27
|
end
|
28
28
|
|
29
29
|
# !SLIDE END
|
data/example/ex13.rb
CHANGED
@@ -6,7 +6,7 @@ require 'asir/transport/webrick'
|
|
6
6
|
require 'asir/coder/base64'
|
7
7
|
require 'asir/coder/zlib'
|
8
8
|
begin
|
9
|
-
Email.
|
9
|
+
Email.asir.transport = t =
|
10
10
|
ASIR::Transport::Webrick.new(:uri => "http://localhost:31913/")
|
11
11
|
t.encoder =
|
12
12
|
ASIR::Coder::Chain.new(:encoders =>
|
@@ -15,8 +15,8 @@ begin
|
|
15
15
|
server_process do
|
16
16
|
t.prepare_server!
|
17
17
|
t.run_server!
|
18
|
-
end
|
19
|
-
pr Email.
|
18
|
+
end
|
19
|
+
pr Email.asir.send_email(:pdf_invoice,
|
20
20
|
:to => "user@email.com",
|
21
21
|
:customer => @customer)
|
22
22
|
sleep 2
|
@@ -24,7 +24,7 @@ rescue Object => err
|
|
24
24
|
$stderr.puts "#{err.inspect}\n#{err.backtrace * "\n"}"
|
25
25
|
ensure
|
26
26
|
t.close rescue nil; sleep 3
|
27
|
-
server_kill
|
27
|
+
server_kill
|
28
28
|
end
|
29
29
|
|
30
30
|
# !SLIDE END
|
data/example/ex14.rb
CHANGED
@@ -5,7 +5,7 @@ require 'example_helper'
|
|
5
5
|
require 'asir/transport/webrick'
|
6
6
|
require 'asir/coder/base64'
|
7
7
|
begin
|
8
|
-
MyClass.
|
8
|
+
MyClass.asir.transport = t =
|
9
9
|
ASIR::Transport::Webrick.new(:uri => "http://localhost:30914/")
|
10
10
|
t.encoder =
|
11
11
|
ASIR::Coder::Chain.new(:encoders =>
|
@@ -14,13 +14,13 @@ begin
|
|
14
14
|
server_process do
|
15
15
|
t.prepare_server!
|
16
16
|
t.run_server!
|
17
|
-
end
|
18
|
-
pr MyClass.new("abc123").
|
17
|
+
end
|
18
|
+
pr MyClass.new("abc123").asir.size
|
19
19
|
sleep 2
|
20
20
|
rescue Object => err
|
21
21
|
$stderr.puts "#{err.inspect}\n#{err.backtrace * "\n"}"
|
22
22
|
ensure
|
23
|
-
t.close; sleep 3; server_kill
|
23
|
+
t.close; sleep 3; server_kill
|
24
24
|
end
|
25
25
|
|
26
26
|
# !SLIDE END
|
data/example/ex15.rb
CHANGED
data/example/ex16.rb
CHANGED
@@ -4,17 +4,17 @@
|
|
4
4
|
require 'example_helper'
|
5
5
|
require 'asir/transport/beanstalk'
|
6
6
|
begin
|
7
|
-
DelayedService.
|
7
|
+
DelayedService.asir.transport = t =
|
8
8
|
ASIR::Transport::Beanstalk.new(:address => '127.0.0.1', :port => 30916)
|
9
9
|
t.encoder =
|
10
10
|
ASIR::Coder::Marshal.new
|
11
|
-
t.
|
11
|
+
t.start_conduit!; sleep 1
|
12
12
|
server_process do
|
13
|
-
t.
|
14
|
-
t.
|
15
|
-
end
|
16
|
-
pr DelayedService.
|
17
|
-
_configure{|req| req.delay = 5}.
|
13
|
+
t.prepare_server!
|
14
|
+
t.run_server!
|
15
|
+
end
|
16
|
+
pr DelayedService.asir.
|
17
|
+
_configure{|req, p| req.delay = 5}.
|
18
18
|
do_it(Time.now)
|
19
19
|
sleep 10
|
20
20
|
rescue Object => err
|
@@ -22,7 +22,7 @@ rescue Object => err
|
|
22
22
|
ensure
|
23
23
|
t.close; sleep 1
|
24
24
|
server_kill; sleep 1
|
25
|
-
t.
|
25
|
+
t.stop_conduit!
|
26
26
|
end
|
27
27
|
|
28
28
|
# !SLIDE END
|
data/example/ex17.rb
CHANGED
@@ -9,28 +9,29 @@ begin
|
|
9
9
|
ASIR::Transport::Beanstalk.new(:address => '127.0.0.1', :port => 30917)
|
10
10
|
t.encoder =
|
11
11
|
ASIR::Coder::Marshal.new
|
12
|
-
t.
|
13
|
-
DelayedService.
|
12
|
+
t.start_conduit!; sleep 1
|
13
|
+
DelayedService.asir.transport =
|
14
14
|
t0 = ASIR::Transport::Buffer.new(:transport => t)
|
15
15
|
t0.pause!
|
16
16
|
server_process do
|
17
|
-
t.
|
18
|
-
t.
|
19
|
-
end
|
20
|
-
pr [ :paused
|
21
|
-
pr DelayedService.
|
22
|
-
_configure{|req| req.delay = 5}.
|
17
|
+
t.prepare_server!
|
18
|
+
t.run_server!
|
19
|
+
end
|
20
|
+
pr [ :paused?, t0.paused?, :at, Time.now.iso8601(2) ]
|
21
|
+
pr DelayedService.asir.
|
22
|
+
_configure{|req, p| req.delay = 5}.
|
23
23
|
do_it(Time.now)
|
24
24
|
sleep 2
|
25
25
|
pr [ :resuming, :size, t0.size, :at, Time.now.iso8601(2) ]
|
26
26
|
t0.resume!
|
27
|
-
pr [ :paused
|
28
|
-
|
27
|
+
pr [ :paused?, t0.paused?, :size, t0.size, :at, Time.now.iso8601(2) ]
|
28
|
+
pr [ :resumed, :size, t0.size, :at, Time.now.iso8601(2) ]
|
29
|
+
sleep 7
|
29
30
|
rescue Object => err
|
30
31
|
$stderr.puts "#{err.inspect}\n#{err.backtrace * "\n"}"
|
31
32
|
ensure
|
32
33
|
t.close; sleep 1; server_kill; sleep 1
|
33
|
-
t.
|
34
|
+
t.stop_conduit!
|
34
35
|
end
|
35
36
|
|
36
37
|
# !SLIDE END
|
data/example/ex18.rb
CHANGED
@@ -15,19 +15,19 @@ begin
|
|
15
15
|
server_process do
|
16
16
|
tcp.prepare_server!
|
17
17
|
tcp.run_server!
|
18
|
-
end
|
18
|
+
end
|
19
19
|
end
|
20
|
-
Email.
|
20
|
+
Email.asir.transport = t =
|
21
21
|
ASIR::Transport::Retry.new(:transport => tcp,
|
22
22
|
:try_sleep => 1,
|
23
23
|
:try_sleep_increment => 2,
|
24
24
|
:try_max => 3,
|
25
25
|
:before_retry => start_server_proc
|
26
26
|
)
|
27
|
-
pr Email.
|
27
|
+
pr Email.asir.send_email(:pdf_invoice,
|
28
28
|
:to => "user@email.com", :customer => 123)
|
29
29
|
sleep 1
|
30
|
-
pr Email.
|
30
|
+
pr Email.asir.send_email(:pdf_invoice,
|
31
31
|
:to => "user2@email.com", :customer => 456)
|
32
32
|
sleep 1
|
33
33
|
rescue ::Exception => err
|
@@ -50,7 +50,7 @@ end
|
|
50
50
|
# EXPECT: service.log" contents:
|
51
51
|
# EXPECT: --- !ruby/object:ASIR::Message
|
52
52
|
# EXPECT: :transport_exceptions:
|
53
|
-
# EXPECT:
|
53
|
+
# EXPECT: Cannot connect to ASIR::Transport::TcpSocket tcp://127.0.0.1:
|
54
54
|
# EXPECT: arguments:
|
55
55
|
# EXPECT: - :pdf_invoice
|
56
56
|
# EXPECT/: :to: user@email.com
|
data/example/ex19.rb
CHANGED
@@ -8,9 +8,9 @@ begin
|
|
8
8
|
server_process do
|
9
9
|
tcp.prepare_server!
|
10
10
|
tcp.run_server!
|
11
|
-
end
|
12
|
-
UnsafeService.
|
13
|
-
pr UnsafeService.
|
11
|
+
end
|
12
|
+
UnsafeService.asir.transport = t = tcp
|
13
|
+
pr UnsafeService.asir.do_it("exit 999; :ok")
|
14
14
|
sleep 1
|
15
15
|
rescue ::ASIR::Error::Unforwardable => err
|
16
16
|
$stderr.puts "### #{$$}: Unforwardable ERROR: #{err.inspect}}"
|
data/example/ex20.rb
CHANGED
@@ -10,9 +10,9 @@ begin
|
|
10
10
|
server_process do
|
11
11
|
zmq.prepare_server!
|
12
12
|
zmq.run_server!
|
13
|
-
end
|
14
|
-
UnsafeService.
|
15
|
-
pr UnsafeService.
|
13
|
+
end
|
14
|
+
UnsafeService.asir.transport = t = zmq
|
15
|
+
pr UnsafeService.asir.do_it(":ok")
|
16
16
|
rescue ::Exception => err
|
17
17
|
$stderr.puts "### #{$$}: ERROR: #{err.inspect}\n #{err.backtrace * "\n "}"
|
18
18
|
raise
|
data/example/ex21.rb
CHANGED
@@ -10,9 +10,9 @@ begin
|
|
10
10
|
server_process do
|
11
11
|
zmq.prepare_server!
|
12
12
|
zmq.run_server!
|
13
|
-
end
|
14
|
-
UnsafeService.
|
15
|
-
pr UnsafeService.
|
13
|
+
end
|
14
|
+
UnsafeService.asir.transport = t = zmq
|
15
|
+
pr UnsafeService.asir.do_it(":ok")
|
16
16
|
rescue ::Exception => err
|
17
17
|
$stderr.puts "### #{$$}: ERROR: #{err.inspect}\n #{err.backtrace * "\n "}"
|
18
18
|
raise
|
data/example/ex22.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# In-core, in-process service, with continuation block.
|
3
3
|
|
4
4
|
require 'example_helper'
|
5
|
-
pr(Email.
|
5
|
+
pr(Email.asir.send_email(:pdf_invoice,
|
6
6
|
:to => "user@email.com",
|
7
7
|
:customer => @customer,
|
8
8
|
&proc { | res | pr [ :in_block, res.result ] })
|
data/example/ex23.rb
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
|
5
5
|
require 'example_helper'
|
6
6
|
begin
|
7
|
-
Email.
|
7
|
+
Email.asir.transport = t =
|
8
8
|
ASIR::Transport::Subprocess.new(:one_way => true)
|
9
|
-
pr(Email.
|
9
|
+
pr(Email.asir.send_email(:pdf_invoice,
|
10
10
|
:to => "user@email.com",
|
11
11
|
:customer => @customer) { | resp |
|
12
12
|
pr [ :in_block, resp.result ] })
|
data/example/ex24.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# !SLIDE :capture_code_output true
|
2
2
|
# Synchronous HTTP service on Rack under WEBrick
|
3
3
|
|
4
|
-
gem 'rack'
|
5
4
|
require 'example_helper'
|
5
|
+
gem 'rack'
|
6
6
|
require 'asir/transport/rack'
|
7
7
|
require 'asir/coder/base64'
|
8
8
|
begin
|
9
|
-
Email.
|
9
|
+
Email.asir.transport = t =
|
10
10
|
ASIR::Transport::Rack.new(:uri => "http://localhost:31924/")
|
11
11
|
t.encoder =
|
12
12
|
ASIR::Coder::Chain.new(:encoders =>
|
@@ -15,8 +15,8 @@ begin
|
|
15
15
|
server_process do
|
16
16
|
t.prepare_server!
|
17
17
|
t.run_server!
|
18
|
-
end
|
19
|
-
pr Email.
|
18
|
+
end
|
19
|
+
pr Email.asir.send_email(:pdf_invoice,
|
20
20
|
:to => "user@email.com",
|
21
21
|
:customer => @customer)
|
22
22
|
sleep 2
|
data/example/ex25.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# !SLIDE :capture_code_output true
|
2
|
+
# One-way Resque service.
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
gem 'resque'
|
6
|
+
require 'example_helper'
|
7
|
+
require 'asir/transport/resque'
|
8
|
+
begin
|
9
|
+
t = ASIR::Transport::Resque.new(:port => 31925,
|
10
|
+
:encoder => ASIR::Coder::Marshal.new)
|
11
|
+
# Control throttling of Resque::Worker inside ASIR::Transport::Resque
|
12
|
+
t.throttle = {
|
13
|
+
# :verbose => true,
|
14
|
+
:min_sleep => 0.0,
|
15
|
+
:max_sleep => 2.0,
|
16
|
+
:inc_sleep => 0.1,
|
17
|
+
:mul_sleep => 1.5,
|
18
|
+
:rand_sleep => 0.1,
|
19
|
+
}
|
20
|
+
t.start_conduit!; sleep 1
|
21
|
+
server_process do
|
22
|
+
t.prepare_server!
|
23
|
+
t.run_server!
|
24
|
+
end
|
25
|
+
UnsafeService.asir.transport = t
|
26
|
+
pr UnsafeService.asir.do_it(":ok")
|
27
|
+
rescue ::Exception => err
|
28
|
+
$stderr.puts "### #{$$}: ERROR: #{err.inspect}\n #{err.backtrace * "\n "}"
|
29
|
+
raise
|
30
|
+
ensure
|
31
|
+
sleep 5
|
32
|
+
t.close rescue nil; sleep 1; server_kill
|
33
|
+
t.stop_conduit!
|
34
|
+
end
|
35
|
+
|
36
|
+
# !SLIDE END
|
37
|
+
# EXPECT: : client process
|
38
|
+
# EXPECT: : server process
|
39
|
+
# EXPECT: UnsafeService.do_it => :ok
|
40
|
+
# EXPECT: : pr: nil
|
41
|
+
# EXPECT!: ERROR
|
data/example/example_helper.rb
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Sample client support
|
2
2
|
#
|
3
|
+
require 'rubygems'
|
4
|
+
case RUBY_PLATFORM
|
5
|
+
when /java/i
|
6
|
+
gem 'spoon'; require 'spoon'
|
7
|
+
end
|
3
8
|
|
4
9
|
$: << File.expand_path("../../lib", __FILE__)
|
5
10
|
require 'asir'
|
@@ -30,11 +35,39 @@ def pr result
|
|
30
35
|
end
|
31
36
|
|
32
37
|
def server_process &blk
|
33
|
-
$
|
34
|
-
|
35
|
-
|
38
|
+
# $stderr.puts " at #{__FILE__}:#{__LINE__}"
|
39
|
+
case RUBY_PLATFORM
|
40
|
+
when /java/i
|
41
|
+
# JRuby cannot fork.
|
42
|
+
# So we must prevent spawn a new jruby and
|
43
|
+
# instruct it to only run the server blk, and not
|
44
|
+
# the subsequent client code.
|
45
|
+
# In other words, we cannot rely on how Process.fork
|
46
|
+
# terminates within the block.
|
47
|
+
if ENV['ASIR_JRUBY_SPAWNED']
|
48
|
+
$stderr.puts " spawned server at #{__FILE__}:#{__LINE__}"
|
49
|
+
puts "*** #{$$}: server process"; $stdout.flush
|
50
|
+
yield
|
51
|
+
Process.exit!(0)
|
52
|
+
# dont do client, client is our parent process.
|
53
|
+
else
|
54
|
+
$stderr.puts " spawning at #{__FILE__}:#{__LINE__}"
|
55
|
+
ENV['ASIR_JRUBY_SPAWNED'] = "1"
|
56
|
+
cmd = "ruby -I #{File.dirname(__FILE__)} -I #{File.expand_path('../../lib', __FILE__)} #{$0} #{ARGV * ' '}"
|
57
|
+
$stderr.puts " cmd = #{cmd}"
|
58
|
+
$server_pid = Spoon.spawnp(cmd)
|
59
|
+
ENV.delete('ASIR_JRUBY_SPAWNED')
|
60
|
+
$stderr.puts " spawned #{$server_pid} at #{__FILE__}:#{__LINE__}"
|
61
|
+
end
|
62
|
+
else
|
63
|
+
# $stderr.puts " at #{__FILE__}:#{__LINE__}"
|
64
|
+
$server_pid = Process.fork do
|
65
|
+
puts "*** #{$$}: server process"; $stdout.flush
|
66
|
+
yield
|
67
|
+
end
|
36
68
|
end
|
37
69
|
sleep 1 # wait for server to be ready.
|
70
|
+
return false # do client.
|
38
71
|
end
|
39
72
|
|
40
73
|
def server_kill
|
@@ -42,6 +75,8 @@ def server_kill
|
|
42
75
|
Process.kill 9, $server_pid
|
43
76
|
Process.waitpid($server_pid)
|
44
77
|
end
|
78
|
+
rescue Errno::ESRCH
|
79
|
+
ensure
|
45
80
|
$server_pid = nil
|
46
81
|
end
|
47
82
|
|
data/example/sample_service.rb
CHANGED
@@ -89,7 +89,7 @@ end
|
|
89
89
|
# !SLIDE
|
90
90
|
# Example Message
|
91
91
|
#
|
92
|
-
Email.
|
92
|
+
Email.asir.send_email(:pdf_invoice,
|
93
93
|
:to => "user@email.com",
|
94
94
|
:customer => @customer)
|
95
95
|
# ->
|
@@ -109,7 +109,7 @@ Email.send_email(:pdf_invoice,
|
|
109
109
|
:to => "user@email.com",
|
110
110
|
:customer => @customer)
|
111
111
|
# ->
|
112
|
-
Email.
|
112
|
+
Email.asir.
|
113
113
|
send_email(:pdf_invoice,
|
114
114
|
:to => "user@email.com",
|
115
115
|
:customer => @customer)
|
@@ -133,9 +133,9 @@ ee.exception_backtrace = [ ... ]
|
|
133
133
|
#
|
134
134
|
|
135
135
|
require 'asir'
|
136
|
-
# Added .
|
136
|
+
# Added .asir support.
|
137
137
|
module Email
|
138
|
-
include ASIR::Client # Email.
|
138
|
+
include ASIR::Client # Email.asir
|
139
139
|
def send_email template_name, options
|
140
140
|
$stderr.puts "*** #{$$}: Email.send_mail #{template_name.inspect} #{options.inspect}"
|
141
141
|
:ok
|
@@ -10,7 +10,7 @@ MathService.send(:include, ASIR::Client)
|
|
10
10
|
# Driver:
|
11
11
|
|
12
12
|
begin
|
13
|
-
MathService.
|
14
|
-
MathService.
|
15
|
-
puts MathService.
|
13
|
+
MathService.asir.transport = # ???
|
14
|
+
MathService.asir.transport._log_enabled = true
|
15
|
+
puts MathService.asir.sum([1, 2, 3])
|
16
16
|
end
|