qrpc 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +4 -0
- data/Gemfile.lock +6 -4
- data/VERSION +1 -1
- data/lib/qrpc/client/dispatcher.rb +1 -1
- data/lib/qrpc/protocol/qrpc-object.rb +1 -1
- data/lib/qrpc/protocol/request.rb +1 -1
- data/qrpc.gemspec +10 -10
- data/test-client.rb +6 -4
- data/test-server.rb +2 -0
- metadata +72 -75
data/CHANGES.txt
CHANGED
data/Gemfile.lock
CHANGED
@@ -6,9 +6,9 @@ GEM
|
|
6
6
|
depq (0.4)
|
7
7
|
em-jack (0.1.3)
|
8
8
|
eventmachine
|
9
|
-
eventmachine (0.
|
9
|
+
eventmachine (1.0.0.beta.3)
|
10
10
|
git (1.2.5)
|
11
|
-
hash-utils (0.18.
|
11
|
+
hash-utils (0.18.1)
|
12
12
|
jeweler (1.6.4)
|
13
13
|
bundler (~> 1.0)
|
14
14
|
git (>= 1.2.5)
|
@@ -18,10 +18,12 @@ GEM
|
|
18
18
|
addressable (>= 2.2.2)
|
19
19
|
hash-utils (>= 0.18.0)
|
20
20
|
multi_json
|
21
|
-
macaddr (1.
|
21
|
+
macaddr (1.4.0)
|
22
|
+
systemu (~> 2.2.0)
|
22
23
|
multi_json (1.0.3)
|
23
24
|
rake (0.9.2)
|
24
|
-
|
25
|
+
systemu (2.2.0)
|
26
|
+
uuid (2.3.3)
|
25
27
|
macaddr (~> 1.0)
|
26
28
|
|
27
29
|
PLATFORMS
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
@@ -38,7 +38,7 @@ module QRPC
|
|
38
38
|
|
39
39
|
def self.create(client_id, id, method, arguments = [ ], priority = QRPC::DEFAULT_PRIORITY)
|
40
40
|
qrpc = QRPC::Protocol::QrpcObject::create(:client => client_id, :priority => priority)
|
41
|
-
super(method, arguments, :id => id, :qrpc => qrpc)
|
41
|
+
super(method, arguments, :id => id.to_s, :qrpc => qrpc.output)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
data/qrpc.gemspec
CHANGED
@@ -4,13 +4,13 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.3.
|
7
|
+
s.name = "qrpc"
|
8
|
+
s.version = "0.3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.email =
|
11
|
+
s.authors = ["Martin Koz\u{e1}k"]
|
12
|
+
s.date = "2011-08-28"
|
13
|
+
s.email = "martinkozak@martinkozak.net"
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE.txt",
|
16
16
|
"README.md"
|
@@ -41,11 +41,11 @@ Gem::Specification.new do |s|
|
|
41
41
|
"test-client.rb",
|
42
42
|
"test-server.rb"
|
43
43
|
]
|
44
|
-
s.homepage =
|
45
|
-
s.licenses = [
|
46
|
-
s.require_paths = [
|
47
|
-
s.rubygems_version =
|
48
|
-
s.summary =
|
44
|
+
s.homepage = "http://github.com/martinkozak/qrpc"
|
45
|
+
s.licenses = ["MIT"]
|
46
|
+
s.require_paths = ["lib"]
|
47
|
+
s.rubygems_version = "1.8.10"
|
48
|
+
s.summary = "Queued JSON-RPC client and server. Works as normal RPC server, but through queue interface, so allows highly scalable, distributed and asynchronous remote API implementation and fast data processing. It's based on eventmachine and beanstalkd, so it's fast and thread safe."
|
49
49
|
|
50
50
|
if s.respond_to? :specification_version then
|
51
51
|
s.specification_version = 3
|
data/test-client.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
require "rubygems"
|
4
|
+
|
3
5
|
$:.push("./lib")
|
4
6
|
require "qrpc/client"
|
5
7
|
require "qrpc/locator"
|
6
8
|
require "eventmachine"
|
7
9
|
|
8
|
-
|
10
|
+
|
9
11
|
EM::run do
|
10
12
|
client = QRPC::Client::new QRPC::Locator::new :test
|
11
13
|
# puts client.inspect
|
@@ -18,7 +20,7 @@ EM::run do
|
|
18
20
|
|
19
21
|
10000.times do
|
20
22
|
client.subtract(2, 3) do |i|
|
21
|
-
|
23
|
+
puts i
|
22
24
|
count += 1
|
23
25
|
if count >= 10000
|
24
26
|
EM::stop
|
@@ -30,8 +32,8 @@ EM::run do
|
|
30
32
|
# puts i
|
31
33
|
# end
|
32
34
|
end
|
33
|
-
=end
|
34
35
|
|
36
|
+
=begin
|
35
37
|
require "beanstalk-client"
|
36
38
|
require "json-rpc-objects/request"
|
37
39
|
|
@@ -51,7 +53,7 @@ job.delete
|
|
51
53
|
job = b.reserve
|
52
54
|
puts job.body
|
53
55
|
job.delete
|
54
|
-
|
56
|
+
=end
|
55
57
|
=begin
|
56
58
|
100.times do
|
57
59
|
b.put(req1.to_json)
|
data/test-server.rb
CHANGED
metadata
CHANGED
@@ -1,104 +1,101 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: qrpc
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.2
|
4
5
|
prerelease:
|
5
|
-
version: 0.3.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
-
|
7
|
+
authors:
|
8
|
+
- Martin Kozák
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-08-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: json-rpc-objects
|
17
|
-
requirement: &
|
16
|
+
requirement: &26326300 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
|
-
requirements:
|
20
|
-
- -
|
21
|
-
- !ruby/object:Gem::Version
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
22
21
|
version: 0.3.3
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
26
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *26326300
|
25
|
+
- !ruby/object:Gem::Dependency
|
27
26
|
name: depq
|
28
|
-
requirement: &
|
27
|
+
requirement: &26325280 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
|
-
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0.4'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
37
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *26325280
|
36
|
+
- !ruby/object:Gem::Dependency
|
38
37
|
name: em-jack
|
39
|
-
requirement: &
|
38
|
+
requirement: &26324140 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
44
43
|
version: 0.1.3
|
45
44
|
type: :runtime
|
46
45
|
prerelease: false
|
47
|
-
version_requirements: *
|
48
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *26324140
|
47
|
+
- !ruby/object:Gem::Dependency
|
49
48
|
name: eventmachine
|
50
|
-
requirement: &
|
49
|
+
requirement: &26321580 !ruby/object:Gem::Requirement
|
51
50
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version:
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
56
55
|
type: :runtime
|
57
56
|
prerelease: false
|
58
|
-
version_requirements: *
|
59
|
-
- !ruby/object:Gem::Dependency
|
57
|
+
version_requirements: *26321580
|
58
|
+
- !ruby/object:Gem::Dependency
|
60
59
|
name: uuid
|
61
|
-
requirement: &
|
60
|
+
requirement: &26320640 !ruby/object:Gem::Requirement
|
62
61
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
66
65
|
version: 2.3.2
|
67
66
|
type: :runtime
|
68
67
|
prerelease: false
|
69
|
-
version_requirements: *
|
70
|
-
- !ruby/object:Gem::Dependency
|
68
|
+
version_requirements: *26320640
|
69
|
+
- !ruby/object:Gem::Dependency
|
71
70
|
name: bundler
|
72
|
-
requirement: &
|
71
|
+
requirement: &26319580 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
77
76
|
version: 1.0.0
|
78
77
|
type: :development
|
79
78
|
prerelease: false
|
80
|
-
version_requirements: *
|
81
|
-
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: *26319580
|
80
|
+
- !ruby/object:Gem::Dependency
|
82
81
|
name: jeweler
|
83
|
-
requirement: &
|
82
|
+
requirement: &26318540 !ruby/object:Gem::Requirement
|
84
83
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
88
87
|
version: 1.5.2
|
89
88
|
type: :development
|
90
89
|
prerelease: false
|
91
|
-
version_requirements: *
|
90
|
+
version_requirements: *26318540
|
92
91
|
description:
|
93
92
|
email: martinkozak@martinkozak.net
|
94
93
|
executables: []
|
95
|
-
|
96
94
|
extensions: []
|
97
|
-
|
98
|
-
extra_rdoc_files:
|
95
|
+
extra_rdoc_files:
|
99
96
|
- LICENSE.txt
|
100
97
|
- README.md
|
101
|
-
files:
|
98
|
+
files:
|
102
99
|
- .document
|
103
100
|
- CHANGES.txt
|
104
101
|
- Gemfile
|
@@ -124,34 +121,34 @@ files:
|
|
124
121
|
- test-client.rb
|
125
122
|
- test-server.rb
|
126
123
|
homepage: http://github.com/martinkozak/qrpc
|
127
|
-
licenses:
|
124
|
+
licenses:
|
128
125
|
- MIT
|
129
126
|
post_install_message:
|
130
127
|
rdoc_options: []
|
131
|
-
|
132
|
-
require_paths:
|
128
|
+
require_paths:
|
133
129
|
- lib
|
134
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
131
|
none: false
|
136
|
-
requirements:
|
137
|
-
- -
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
|
140
|
-
segments:
|
132
|
+
requirements:
|
133
|
+
- - ! '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
segments:
|
141
137
|
- 0
|
142
|
-
|
143
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
hash: -2316095507865135214
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
140
|
none: false
|
145
|
-
requirements:
|
146
|
-
- -
|
147
|
-
- !ruby/object:Gem::Version
|
148
|
-
version:
|
141
|
+
requirements:
|
142
|
+
- - ! '>='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
149
145
|
requirements: []
|
150
|
-
|
151
146
|
rubyforge_project:
|
152
|
-
rubygems_version: 1.8.
|
147
|
+
rubygems_version: 1.8.10
|
153
148
|
signing_key:
|
154
149
|
specification_version: 3
|
155
|
-
summary: Queued JSON-RPC client and server. Works as normal RPC server, but through
|
150
|
+
summary: Queued JSON-RPC client and server. Works as normal RPC server, but through
|
151
|
+
queue interface, so allows highly scalable, distributed and asynchronous remote
|
152
|
+
API implementation and fast data processing. It's based on eventmachine and beanstalkd,
|
153
|
+
so it's fast and thread safe.
|
156
154
|
test_files: []
|
157
|
-
|