tupelo 0.8 → 0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tupelo/client/worker.rb +20 -14
- data/lib/tupelo/client.rb +1 -0
- data/lib/tupelo/version.rb +1 -1
- data/test/lib/mock-msg.rb +4 -0
- data/test/system/test-archiver.rb +1 -2
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 241bdc610aa513222cd452c8624bcf69cd9b2686
|
4
|
+
data.tar.gz: 674756c0a1156745007199a4e476df72df7183ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6b2e338a9d11abfe109ed608b8b51807bc69994a75824978c37f0b2ad00327efc080b8e8ee1eb85303b9fee3961045fbae1b2b9bc6fa5c6776a743e7f818f67
|
7
|
+
data.tar.gz: 026cf80f84292493865f5f644f54ce883defa9351d99c6268c02791d500edd88cbeaa0cc4c25c556d0a96f3cee424f33dea1a4d97d1f421bfd1532803a323d21
|
data/lib/tupelo/client/worker.rb
CHANGED
@@ -160,14 +160,11 @@ class Tupelo::Client
|
|
160
160
|
|
161
161
|
def read_messages_from_seq
|
162
162
|
seq.each do |msg|
|
163
|
-
## skip msg if tags not relevant
|
164
|
-
## (and client must apply tags--i.e. not using multicast)
|
165
163
|
self << msg
|
166
164
|
end
|
167
165
|
end
|
168
166
|
|
169
167
|
def run_worker_thread
|
170
|
-
update_to_tick @start_tick
|
171
168
|
run_request_loop
|
172
169
|
rescue => ex
|
173
170
|
log.error ex
|
@@ -222,7 +219,7 @@ class Tupelo::Client
|
|
222
219
|
|
223
220
|
log.info "requesting tuplespace from arc"
|
224
221
|
arc << [GET_TUPLESPACE, nil, tick]
|
225
|
-
## replace nil with
|
222
|
+
## replace nil with tags, if any
|
226
223
|
|
227
224
|
begin
|
228
225
|
arc_tick = arc.read[0]
|
@@ -256,19 +253,28 @@ class Tupelo::Client
|
|
256
253
|
def handle_message msg
|
257
254
|
log.debug {"seq sent #{msg.inspect}"}
|
258
255
|
|
259
|
-
if msg.
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
"received at global_tick=#{global_tick}"
|
267
|
-
raise "fatal error"
|
256
|
+
if msg.control?
|
257
|
+
client.handle_ack msg
|
258
|
+
op_type, *args = msg.control_op
|
259
|
+
if op_type == Funl::SUBSCRIBE_ALL
|
260
|
+
update_to_tick msg.global_tick
|
261
|
+
else
|
262
|
+
raise "Unimplemented: #{msg.inspect}"
|
268
263
|
end
|
264
|
+
return
|
265
|
+
end
|
266
|
+
|
267
|
+
if !global_tick
|
268
|
+
raise "bug: should have subscribed and received ack before data"
|
269
|
+
end
|
270
|
+
|
271
|
+
if msg.global_tick < global_tick + 1
|
272
|
+
log.debug {"discarding redundant message at #{msg.global_tick}"}
|
273
|
+
# due to archiver timing, for example
|
274
|
+
return
|
269
275
|
end
|
270
276
|
|
271
|
-
@global_tick
|
277
|
+
@global_tick = msg.global_tick
|
272
278
|
@delta = 0
|
273
279
|
|
274
280
|
record_history msg
|
data/lib/tupelo/client.rb
CHANGED
data/lib/tupelo/version.rb
CHANGED
data/test/lib/mock-msg.rb
CHANGED
@@ -10,8 +10,7 @@ Tupelo.application do |app|
|
|
10
10
|
child_pid = app.child do |client|
|
11
11
|
# Test that tuples written before this client started are readable.
|
12
12
|
a = client.read_all [Integer]
|
13
|
-
client.
|
14
|
-
sleep 0.1
|
13
|
+
client.write_wait result: a
|
15
14
|
end
|
16
15
|
|
17
16
|
# Normally we would wait using tuples, but in this case we want more
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tupelo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.9'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel VanderWerf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: atdo
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: easy-serve
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: funl
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: object-template
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Distributed tuplespace.
|
@@ -177,28 +177,28 @@ licenses:
|
|
177
177
|
metadata: {}
|
178
178
|
post_install_message:
|
179
179
|
rdoc_options:
|
180
|
-
- --quiet
|
181
|
-
- --line-numbers
|
182
|
-
- --inline-source
|
183
|
-
- --title
|
180
|
+
- "--quiet"
|
181
|
+
- "--line-numbers"
|
182
|
+
- "--inline-source"
|
183
|
+
- "--title"
|
184
184
|
- tupelo
|
185
|
-
- --main
|
185
|
+
- "--main"
|
186
186
|
- README.md
|
187
187
|
require_paths:
|
188
188
|
- lib
|
189
189
|
required_ruby_version: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
|
-
- -
|
191
|
+
- - ">="
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '0'
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
|
-
- -
|
196
|
+
- - ">="
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0'
|
199
199
|
requirements: []
|
200
200
|
rubyforge_project:
|
201
|
-
rubygems_version: 2.1.
|
201
|
+
rubygems_version: 2.1.4
|
202
202
|
signing_key:
|
203
203
|
specification_version: 4
|
204
204
|
summary: Distributed tuplespace
|