tupelo 0.14 → 0.15

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tupelo
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.14'
4
+ version: '0.15'
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-12-11 00:00:00.000000000 Z
11
+ date: 2013-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: atdo
@@ -84,119 +84,124 @@ files:
84
84
  - lib/tupelo/app/trace.rb
85
85
  - lib/tupelo/app/builder.rb
86
86
  - lib/tupelo/client.rb
87
- - lib/tupelo/tuplets/persistent-archiver.rb
88
- - lib/tupelo/tuplets/persistent-archiver/worker.rb
89
- - lib/tupelo/tuplets/persistent-archiver/tuplespace.rb
90
- - lib/tupelo/util/boolean.rb
91
87
  - lib/tupelo/app.rb
92
88
  - lib/tupelo/archiver.rb
89
+ - lib/tupelo/client/worker.rb
90
+ - lib/tupelo/client/common.rb
91
+ - lib/tupelo/client/tuplespace.rb
92
+ - lib/tupelo/client/transaction.rb
93
+ - lib/tupelo/client/atdo.rb
94
+ - lib/tupelo/client/reader.rb
95
+ - lib/tupelo/tuplets/persistent-archiver/worker.rb
96
+ - lib/tupelo/tuplets/persistent-archiver/tuplespace.rb
97
+ - lib/tupelo/tuplets/persistent-archiver.rb
93
98
  - lib/tupelo/archiver/persister.rb
94
99
  - lib/tupelo/archiver/worker.rb
95
100
  - lib/tupelo/archiver/tuplespace.rb
96
101
  - lib/tupelo/archiver/persistent-tuplespace.rb
97
- - lib/tupelo/client/transaction.rb
98
- - lib/tupelo/client/worker.rb
99
- - lib/tupelo/client/reader.rb
100
- - lib/tupelo/client/tuplespace.rb
101
- - lib/tupelo/client/atdo.rb
102
- - lib/tupelo/client/common.rb
102
+ - lib/tupelo/util/boolean.rb
103
103
  - lib/tupelo/version.rb
104
104
  - bench/pipeline.rb
105
105
  - bugs/read-take.rb
106
106
  - bugs/take-write.rb
107
+ - example/pubsub.rb
108
+ - example/timeout-trans.rb
109
+ - example/fish01.rb
110
+ - example/tiny-client.rb
111
+ - example/add.rb
112
+ - example/parallel.rb
113
+ - example/socket-broker.rb
114
+ - example/multi-tier/memo2.rb
115
+ - example/multi-tier/drb.rb
116
+ - example/multi-tier/memo.rb
117
+ - example/multi-tier/kvspace.rb
118
+ - example/multi-tier/http.rb
119
+ - example/multi-tier/multi-sinatras.rb
120
+ - example/app-and-tup.rb
121
+ - example/small.rb
122
+ - example/bounded-retry.rb
123
+ - example/fish.rb
124
+ - example/zk/lock.rb
125
+ - example/concurrent-transactions.rb
126
+ - example/cancel.rb
127
+ - example/map-reduce/map-reduce-v2.rb
128
+ - example/map-reduce/remote-map-reduce.rb
129
+ - example/map-reduce/map-reduce.rb
130
+ - example/map-reduce/prime-factor.rb
131
+ - example/write-wait.rb
132
+ - example/tcp.rb
107
133
  - example/timeout.rb
134
+ - example/read-in-trans.rb
135
+ - example/subspaces/simple.rb
136
+ - example/subspaces/pubsub.rb
137
+ - example/subspaces/addr-book-v1.rb
138
+ - example/subspaces/addr-book.rb
139
+ - example/subspaces/ramp.rb
140
+ - example/subspaces/addr-book-v2.rb
141
+ - example/subspaces/sorted-set-space-OLD.rb
142
+ - example/subspaces/shop/shop-v2.rb
143
+ - example/subspaces/shop/shop-v1.rb
144
+ - example/subspaces/sorted-set-space.rb
145
+ - example/balance-xfer-retry.rb
146
+ - example/take-nowait-caution.rb
147
+ - example/lock-mgr-with-queue.rb
148
+ - example/hash-tuples.rb
149
+ - example/pulse.rb
150
+ - example/transaction-logic.rb
151
+ - example/lease.rb
152
+ - example/chat/chat.rb
153
+ - example/chat/chat-nohistory.rb
154
+ - example/balance-xfer.rb
155
+ - example/uniq-id.rb
108
156
  - example/add-dsl.rb
109
- - example/remote.rb
110
- - example/increment.rb
111
- - example/matching.rb
112
- - example/dphil.rb
113
- - example/broker-optimistic.rb
157
+ - example/lock-mgr.rb
158
+ - example/broker-locking.rb
159
+ - example/dphil-optimistic.rb
114
160
  - example/fail-and-retry.rb
115
- - example/load-balancer.rb
116
- - example/read-in-trans.rb
117
- - example/bounded-retry.rb
118
- - example/pregel/remote.rb
119
- - example/pregel/pagerank.rb
161
+ - example/fish0.rb
120
162
  - example/pregel/pregel.rb
121
163
  - example/pregel/distributed.rb
164
+ - example/pregel/pagerank.rb
122
165
  - example/pregel/update.rb
166
+ - example/pregel/remote.rb
167
+ - example/pregel/dist-opt.rb
168
+ - example/dphil-optimistic-v2.rb
169
+ - example/broker-optimistic-v2.rb
170
+ - example/remote.rb
123
171
  - example/take-nowait.rb
124
- - example/boolean-match.rb
125
- - example/lease.rb
126
- - example/broker-locking.rb
127
- - example/transaction-logic.rb
172
+ - example/wait-interrupt.rb
173
+ - example/tiny-service.rb
174
+ - example/optimist.rb
128
175
  - example/message-bus.rb
129
- - example/small-simplified.rb
130
- - example/small.rb
131
- - example/lock-mgr.rb
132
- - example/take-nowait-caution.rb
133
- - example/concurrent-transactions.rb
134
- - example/tcp.rb
135
- - example/notify.rb
136
- - example/pulse.rb
137
- - example/chat/chat.rb
138
- - example/chat/chat-nohistory.rb
139
- - example/hash-tuples.rb
140
176
  - example/balance-xfer-locking.rb
141
- - example/balance-xfer-retry.rb
177
+ - example/increment.rb
178
+ - example/child-of-child.rb
179
+ - example/custom-class.rb
180
+ - example/matching.rb
142
181
  - example/custom-search.rb
143
- - example/app-and-tup.rb
144
- - example/multi-tier/memo2.rb
145
- - example/multi-tier/http.rb
146
- - example/multi-tier/multi-sinatras.rb
147
- - example/multi-tier/kvspace.rb
148
- - example/multi-tier/memo.rb
149
- - example/multi-tier/drb.rb
150
- - example/take-many.rb
151
- - example/subspaces/ramp.rb
152
- - example/subspaces/sorted-set-space.rb
153
- - example/subspaces/addr-book.rb
154
- - example/subspaces/simple.rb
155
- - example/subspaces/shop/shop-v2.rb
156
- - example/subspaces/shop/shop-v1.rb
157
- - example/subspaces/pubsub.rb
158
- - example/subspaces/addr-book-v2.rb
159
- - example/dphil-optimistic.rb
182
+ - example/broker-optimistic.rb
183
+ - example/notify.rb
184
+ - example/small-simplified.rb
185
+ - example/broker-queue.rb
160
186
  - example/async-transaction.rb
161
- - example/wait-interrupt.rb
162
- - example/fish0.rb
163
- - example/zk/lock.rb
187
+ - example/boolean-match.rb
188
+ - example/load-balancer.rb
189
+ - example/take-many.rb
164
190
  - example/deadlock.rb
165
- - example/fish.rb
166
- - example/add.rb
167
- - example/dphil-optimistic-v2.rb
168
- - example/parallel.rb
169
- - example/tiny-client.rb
170
- - example/map-reduce/map-reduce.rb
171
- - example/map-reduce/remote-map-reduce.rb
172
- - example/map-reduce/map-reduce-v2.rb
173
- - example/map-reduce/prime-factor.rb
174
- - example/map-reduce/prime-factor-balanced.rb
175
- - example/lock-mgr-with-queue.rb
176
- - example/balance-xfer.rb
177
- - example/cancel.rb
178
- - example/socket-broker.rb
179
- - example/timeout-trans.rb
180
- - example/uniq-id.rb
181
- - example/optimist.rb
182
- - example/tiny-server.rb
183
- - example/pubsub.rb
184
- - example/broker-optimistic-v2.rb
185
- - example/write-wait.rb
186
- - example/custom-class.rb
187
- - test/stress/archiver-load.rb
188
- - test/stress/concurrent-transactions.rb
189
- - test/system/test-archiver.rb
190
- - test/lib/mock-client.rb
191
- - test/lib/time-fuzz.rb
192
- - test/lib/mock-queue.rb
193
- - test/lib/mock-seq.rb
191
+ - example/dphil.rb
194
192
  - test/lib/testable-worker.rb
193
+ - test/lib/mock-seq.rb
195
194
  - test/lib/mock-msg.rb
196
- - test/unit/test-mock-seq.rb
197
- - test/unit/test-mock-queue.rb
195
+ - test/lib/mock-queue.rb
196
+ - test/lib/time-fuzz.rb
197
+ - test/lib/mock-client.rb
198
+ - test/system/test-archiver.rb
198
199
  - test/unit/test-ops.rb
199
200
  - test/unit/test-mock-client.rb
201
+ - test/unit/test-mock-seq.rb
202
+ - test/unit/test-mock-queue.rb
203
+ - test/stress/concurrent-transactions.rb
204
+ - test/stress/archiver-load.rb
200
205
  - bin/tup
201
206
  - bin/tspy
202
207
  homepage: https://github.com/vjoel/tupelo
@@ -231,8 +236,8 @@ signing_key:
231
236
  specification_version: 4
232
237
  summary: Distributed tuplespace
233
238
  test_files:
234
- - test/unit/test-mock-seq.rb
235
- - test/unit/test-mock-queue.rb
236
239
  - test/unit/test-ops.rb
237
240
  - test/unit/test-mock-client.rb
241
+ - test/unit/test-mock-seq.rb
242
+ - test/unit/test-mock-queue.rb
238
243
  has_rdoc:
@@ -1,55 +0,0 @@
1
- # Factor numbers using remote hosts. Run with --trace to see contention.
2
- # This is more "map" than "map-reduce", though you could aggregate the
3
- # factored numbers, such as by finding the largest prime factor.
4
-
5
- require 'tupelo/app/remote'
6
-
7
- hosts = ARGV.shift or abort "usage: #$0 <ssh-hostname>,<ssh-hostname>,..."
8
- hosts = hosts.split(",")
9
-
10
- Tupelo.tcp_application do
11
- hosts.each_with_index do |host, hi|
12
- remote host: host, passive: true, eval: %{
13
- require 'prime' # ruby stdlib for prime factorization
14
- class M
15
- def initialize nh, hi
16
- @nh, @hi = nh, hi
17
- end
18
- def === x
19
- Array === x and
20
- x[0] == "input" and
21
- x[1] % @nh == @hi
22
- end
23
- end
24
- my_pref = M.new(#{hosts.size}, #{hi})
25
- loop do
26
- _, input =
27
- begin
28
- take(my_pref, timeout: 1.0) # fewer fails (5.0 -> none at all)
29
- rescue TimeoutError
30
- take(["input", Integer])
31
- end
32
- write ["output", input, input.prime_division]
33
- end
34
- }
35
- end
36
-
37
- local do
38
- t0 = Time.now
39
- inputs = 1_000_000_000_000 .. 1_000_000_000_050
40
-
41
- inputs.each do |input|
42
- write ["input", input]
43
- end
44
-
45
- inputs.size.times do
46
- _, input, outputs = take ["output", Integer, nil]
47
- output_str = outputs.map {|prime, exp|
48
- exp == 1 ? prime : "#{prime}**#{exp}"}.join(" * ")
49
- log "#{input} == #{output_str}"
50
- end
51
-
52
- t1 = Time.now
53
- log "elapsed: %6.2f seconds" % (t1-t0)
54
- end
55
- end
@@ -1,12 +0,0 @@
1
- require 'tupelo/app'
2
-
3
- svr = "tiny-server.yaml"
4
-
5
- Tupelo.application servers_file: svr do
6
- if owns_servers
7
- puts "server started"
8
- sleep
9
- else
10
- abort "server seems to be running already; check file #{svr.inspect}"
11
- end
12
- end