ZMQ SOA Suite - Ruby Client & Service
For now protocol description is under node js implementation and will be moved soon to a proper place. https://github.com/pjanuario/zmq-service-suite
Installation
Add this line to your application's Gemfile:
gem 'zss'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zss
NOTE:
You need to have 0MQ installed.
If you use MacOS just do
$ brew install zeromq
ZSS Client
require 'zss'
# default Client config
config = {
frontend: 'tcp://127.0.0.1:5560',
identity: 'client',
timeout: 1000 # in ms
}
# it uses default configs
PongClient = ZSS::Client.new(:pong)
# it uses configs
# who can override just a single property
PongClient = ZSS::Client.new(:pong, config)
# call Pong service on verb PING with "payload"
PongClient.ping("payload")
#or
PongClient.call("ping", "payload")
# call Pong service on verb PING with "payload" and headers
PongClient.ping("payload", headers: { something: "data" })
# or
PongClient.call("ping", "payload", headers: { something: "data" })
# call Pong service on verb PING with "payload"
PongClient.ping_pong("payload")
# or
PongClient.call("ping/pong", "payload")
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Deployment
Continuous Integration build on master branch is configured to:
- bump gem patch version
- tag version
- deploy to ruby gems
Major and Minor version are controlled manually, check next chapter.
Bump versioning
We use bump gem to control gem versioning.
Bump Patch version
$ bump patch
Bump Minor version
$ bump minor
Bump Major version
$ bump major
Running Specs
$ rspec
Coverage Report
$ open ./coverage/index.html

