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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82d57b58ca16d1422134657e6b185c5192b0f3c8
4
- data.tar.gz: 9d87638ef14e32e57c5b3062f0cfab969260fe51
3
+ metadata.gz: a32c3e5353a1c04d239f2ddba14caf80cc63eafa
4
+ data.tar.gz: 271d25c01760c1e04d9bd4aca26524629d42b12f
5
5
  SHA512:
6
- metadata.gz: defc3054b3f7bee5ac3b6ef58953153e51c39cde11deaa6876f9befa9953af1ebd7fd870253dfe5a4fec8bca6e8c8e5b09192c0ea075db26e6139c65f8c5edb5
7
- data.tar.gz: aa4762a17e508d234889e3ea37fea18bd3a3e758e4d3ee5cf81d0c121c94f5763dff71bff22b476130a2ac1ef4cabd7085267f7a776dbaf8de61a866b6c27504
6
+ metadata.gz: 17214e44a821ca146db76a7e22ae3eeada69024c6eaea5351aac4aaaa78bcaf4bebb68aa5cb460c77bc9c172aef5e5ac7e932a040b935e27210a4584f701f7d2
7
+ data.tar.gz: 259dafb9a6538358b03a63bad0cb521d89ea3e680be667fb4fb85ffdeea3ee4aeedba31db9e843d209bda73dbc0765000c75ad68fcfc9b888294cc18b97615de
data/.travis.yml CHANGED
@@ -1,3 +1,4 @@
1
+ before_install: gem install bundler
1
2
  language: ruby
2
3
  rvm:
3
4
  - 1.9.3
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 backgroud thread when message is recieved
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
@@ -143,7 +143,6 @@ window.MessageBus = (function() {
143
143
  chunk = chunk.replace(/\r\n\|\|\r\n/g, separator);
144
144
 
145
145
  try {
146
- console.log(chunk);
147
146
  reqSuccess(JSON.parse(chunk));
148
147
  } catch(e) {
149
148
  if (console.log) {
@@ -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,4 @@
1
+ require 'message_bus'
2
+ on_worker_boot do
3
+ MessageBus.after_fork
4
+ end
@@ -0,0 +1 @@
1
+ wrk -c100 -d2m --timeout=30s --latency -s bench.lua http://127.0.0.1:3000
@@ -1,3 +1,3 @@
1
1
  module MessageBus
2
- VERSION = "2.0.0.beta.1"
2
+ VERSION = "2.0.0.beta.2"
3
3
  end
@@ -143,7 +143,6 @@ window.MessageBus = (function() {
143
143
  chunk = chunk.replace(/\r\n\|\|\r\n/g, separator);
144
144
 
145
145
  try {
146
- console.log(chunk);
147
146
  reqSuccess(JSON.parse(chunk));
148
147
  } catch(e) {
149
148
  if (console.log) {
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.1
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-05 00:00:00.000000000 Z
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/ab.sample
63
+ - examples/bench/bench.lua
64
64
  - examples/bench/config.ru
65
- - examples/bench/payload.post
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: ''
@@ -1 +0,0 @@
1
- ab -n 1000 -c 25 -p payload.post -T "application/x-www-form-urlencoded" "http://localhost:3000/message-bus/poll"
@@ -1 +0,0 @@
1
- foo=222&bob=1