message_bus 2.0.0.beta.1 → 2.0.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of message_bus might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG +3 -0
- data/README.md +3 -1
- data/assets/message-bus.js +0 -1
- data/examples/bench/bench.lua +14 -0
- data/examples/bench/puma.rb +4 -0
- data/examples/bench/wrk.sample +1 -0
- data/lib/message_bus/version.rb +1 -1
- data/vendor/assets/javascripts/message-bus.js +0 -1
- metadata +6 -5
- data/examples/bench/ab.sample +0 -1
- data/examples/bench/payload.post +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a32c3e5353a1c04d239f2ddba14caf80cc63eafa
|
4
|
+
data.tar.gz: 271d25c01760c1e04d9bd4aca26524629d42b12f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17214e44a821ca146db76a7e22ae3eeada69024c6eaea5351aac4aaaa78bcaf4bebb68aa5cb460c77bc9c172aef5e5ac7e932a040b935e27210a4584f701f7d2
|
7
|
+
data.tar.gz: 259dafb9a6538358b03a63bad0cb521d89ea3e680be667fb4fb85ffdeea3ee4aeedba31db9e843d209bda73dbc0765000c75ad68fcfc9b888294cc18b97615de
|
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
03-01-2016
|
2
2
|
|
3
|
+
- Version 2.0.0.beta.2
|
4
|
+
- Fix: Remove stray console.log
|
5
|
+
|
3
6
|
- Version 2.0.0.beta.1
|
4
7
|
- Feature: add support for chunked encoding transport, this significnatlly improves long polling performance
|
5
8
|
- Feature: strip around_filters and client filters, which were speculative
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ message_id = MessageBus.publish "/channel", "message"
|
|
42
42
|
# in another process / spot
|
43
43
|
|
44
44
|
MessageBus.subscribe "/channel" do |msg|
|
45
|
-
# block called in a
|
45
|
+
# block called in a background thread when message is received
|
46
46
|
end
|
47
47
|
|
48
48
|
MessageBus.backlog "/channel", id
|
@@ -214,6 +214,7 @@ end
|
|
214
214
|
#### Puma
|
215
215
|
```ruby
|
216
216
|
# path/to/your/config/puma.rb
|
217
|
+
require 'message_bus'
|
217
218
|
on_worker_boot do
|
218
219
|
MessageBus.after_fork
|
219
220
|
end
|
@@ -222,6 +223,7 @@ end
|
|
222
223
|
#### Unicorn
|
223
224
|
```ruby
|
224
225
|
# path/to/your/config/unicorn.rb
|
226
|
+
require 'message_bus'
|
225
227
|
after_fork do |server, worker|
|
226
228
|
MessageBus.after_fork
|
227
229
|
end
|
data/assets/message-bus.js
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
wrk.method = "POST"
|
2
|
+
wrk.body = ""
|
3
|
+
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
|
4
|
+
wrk.headers["Connection"] = "keep-alive"
|
5
|
+
|
6
|
+
request = function()
|
7
|
+
local hexdict = {48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102}
|
8
|
+
local randstr = {}
|
9
|
+
for i=1, 32 do
|
10
|
+
randstr[i] = hexdict[math.random(1, 16)]
|
11
|
+
end
|
12
|
+
local path = wrk.path .. "message-bus/" .. string.char(unpack(randstr)) .. "/poll"
|
13
|
+
return wrk.format(nil, path)
|
14
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
wrk -c100 -d2m --timeout=30s --latency -s bench.lua http://127.0.0.1:3000
|
data/lib/message_bus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: message_bus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.beta.
|
4
|
+
version: 2.0.0.beta.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -60,10 +60,11 @@ files:
|
|
60
60
|
- assets/index.handlebars
|
61
61
|
- assets/jquery-1.8.2.js
|
62
62
|
- assets/message-bus.js
|
63
|
-
- examples/bench/
|
63
|
+
- examples/bench/bench.lua
|
64
64
|
- examples/bench/config.ru
|
65
|
-
- examples/bench/
|
65
|
+
- examples/bench/puma.rb
|
66
66
|
- examples/bench/unicorn.conf.rb
|
67
|
+
- examples/bench/wrk.sample
|
67
68
|
- examples/chat/chat.rb
|
68
69
|
- examples/chat/config.ru
|
69
70
|
- examples/chat/docker_container/chat.yml
|
@@ -115,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
116
|
version: 1.3.1
|
116
117
|
requirements: []
|
117
118
|
rubyforge_project:
|
118
|
-
rubygems_version: 2.4.5
|
119
|
+
rubygems_version: 2.4.5.1
|
119
120
|
signing_key:
|
120
121
|
specification_version: 4
|
121
122
|
summary: ''
|
data/examples/bench/ab.sample
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ab -n 1000 -c 25 -p payload.post -T "application/x-www-form-urlencoded" "http://localhost:3000/message-bus/poll"
|
data/examples/bench/payload.post
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
foo=222&bob=1
|