Project

zeromem-ws

0.0
No commit activity in last 3 years
No release in over 3 years
Eliminates performance degradation of Movitto/rjr websocket json-rpc client under heavy load
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0
>= 2.2.10
~> 13.0

Runtime

~> 0.5.1
>= 0.19.3
 Project Readme

Zeromem::Ws

This is implementation for movitto/rjr websocket Node for JSON-RPC to eliminate
performance degradation under heavy load (1000s queries per minute).

Current implementation has memory leak which cause CPU overhead accumulation.

Installation

gem 'zeromem-ws'

And then execute:

$ bundle

Or install it yourself as:

$ gem install zeromem-ws

Usage

require 'zeromem/ws'

server = Zeromem::Ws::WsHeavy.new :host => 'localhost', :port => 9789, :node_id => "server"
server.dispatcher.handle('method') { |i|
  puts "server: #{i}"
  "#{i}".upcase
}
server.listen

client = Zeromem::Ws::WsHeavy.new :node_id => "client", :timeout => 8000

0.upto(50000) { |i| 
  puts "#{i}" 
  puts client.invoke "ws://localhost:9789", "method", "Hello World" 
}

Bug reports and pull requests are welcome on GitHub at https://github.com/zeromem88/ruby-zeromem-ws.

License

The gem is available as open source under the terms of the MIT License.