PIGATO - an high-performance microservices framework based on ZeroMQ
PIGATO aims to offer an high-performance, reliable, scalable and extensible service-oriented framework supporting multiple programming languages: Node.js/Io.js and Ruby.
Add this line to your application's Gemfile:
gem 'pigato'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pigato
Example
require "rubygems"
require "pigato"
client = Pigato::Client.new('tcp://localhost:55555', { :autostart => 1 })
client.request('echo', 'Hello world', { 'nocache' => 1 })
Example
worker = Pigato::Worker.new('tcp://localhost:55555', 'echo')
reply = nil
loop do
request = worker.recv reply
worker.reply request
end
In order to run the example you need to run Node.js PIGATO example Broker from the main project
Example client/worker echo:
examples/echo_client.rb
examples/echo_worker.rb
- Fork it ( https://github.com/[my-github-username]/pigato/fork )
- 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 a new Pull Request