zeromem-ws 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -10
  3. data/lib/zeromem/ws/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 579bf8ce72bba762da6743212abec307be29a5a5
4
- data.tar.gz: 96aefe2c08de15ff3bd6da05f3dda0084a551299
3
+ metadata.gz: 7b0d5d96cc5bb5be04147542ba2edb82471ed8d5
4
+ data.tar.gz: 258079e59fc407083915527ba6d481a497781ee3
5
5
  SHA512:
6
- metadata.gz: a60bcb1a4aa5ad28f7bdea84831aa9289458f9a5ed775257af50c6ef1d5b1198b447cfe2890b1a1fb6805b0873836c590507a86002395dc6ea25fc3b376558a7
7
- data.tar.gz: 20e7ca7b02553693d2f7144609f85077a69438d8a442c37e1f7b766024352d970187f1a66e5fa87cb2c046ce89f53d651e4c4005542a7b6b9a5602122d333619
6
+ metadata.gz: 53f80343063fabc79faf8ba78147027493c614667446e8eae4a907137157f811c53dd05aecaf1b5d5b1e6d1210cde7aaa9e16995450212a7ccffb58220362763
7
+ data.tar.gz: 398efc088dedc70fbe6b6681aa1a8910236d5e685080fc9298a1709975d547197661a7d130b0a401fbe91c256df01e62ceb4fe313171e8375f61f7a5d83c53cd
data/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # Zeromem::Ws
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/zeromem/ws`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ This is implementation for movitto/rjr websocket Node for JSON-RPC to eliminate
4
+ performance degradation under heavy load (1000s queries per minute).
5
+
6
+ Current implementation has memory leak which cause CPU overhead accumulation.
4
7
 
5
- TODO: Delete this and the text above, and describe your gem
6
8
 
7
9
  ## Installation
8
10
 
9
- Add this line to your application's Gemfile:
11
+
10
12
 
11
13
  ```ruby
12
14
  gem 'zeromem-ws'
@@ -21,18 +23,26 @@ Or install it yourself as:
21
23
  $ gem install zeromem-ws
22
24
 
23
25
  ## Usage
26
+ ```ruby
27
+ require 'zeromem/ws'
24
28
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
29
+ server = Zeromem::Ws::WsHeavy.new :host => 'localhost', :port => 9789, :node_id => "server"
30
+ server.dispatcher.handle('method') { |i|
31
+ puts "server: #{i}"
32
+ "#{i}".upcase
33
+ }
34
+ server.listen
28
35
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
36
+ client = Zeromem::Ws::WsHeavy.new :node_id => "client", :timeout => 8000
30
37
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
38
+ 0.upto(50000) { |i|
39
+ puts "#{i}"
40
+ puts client.invoke "ws://localhost:9789", "method", "Hello World"
41
+ }
42
+ ```
32
43
 
33
- ## Contributing
34
44
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/zeromem-ws.
45
+ Bug reports and pull requests are welcome on GitHub at https://github.com/zeromem88/ruby-zeromem-ws.
36
46
 
37
47
  ## License
38
48
 
@@ -1,5 +1,5 @@
1
1
  module Zeromem
2
2
  module Ws
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeromem-ws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zeromem88