Sha256: db1100776b5d082c5a3e159a4360afe31769eec73a0bd7ae2ed632c1863de744

Contents?: true

Size: 1.68 KB

Versions: 32

Compression:

Stored size: 1.68 KB

Contents

# PIGATO-RUBY - Ruby Client / Worker for PIGATO

[![PIGATO](http://ardoino.com/pub/pigato-ruby-200.png)](https://github.com/prdn/pigato-ruby)

**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.

* [Official PIGATO project page](http://prdn.github.io/pigato/) 
* [Node.js and io.js broker/client/worker](https://github.com/prdn/pigato)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'pigato'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install pigato

## API

### Client
#### `Pigato::Client.new(addr, conf)`

**Example**

```
require "rubygems"
require "pigato"

client = Pigato::Client.new('tcp://localhost:55555', { :autostart => 1 })
client.request('echo', 'Hello world', { 'nocache' => 1 })
```

### Worker
#### `Pigato::Worker.new(addr, serviceName)`

**Example**

```
worker = Pigato::Worker.new('tcp://localhost:55555', 'echo')
reply = nil

loop do
  request = worker.recv reply
  worker.reply request
end
```

## Usage

In order to run the example you need to run Node.js PIGATO example Broker from the [main project](https://github.com/prdn/pigato/tree/master/examples)

Example client/worker echo:

* `examples/echo_client.rb`
* `examples/echo_worker.rb`

## Contributing

1. Fork it ( https://github.com/[my-github-username]/pigato/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
pigato-0.5.1 README.md
pigato-0.5.0 README.md
pigato-0.4.9 README.md
pigato-0.4.8 README.md
pigato-0.4.7 README.md
pigato-0.4.6 README.md
pigato-0.4.5 README.md
pigato-0.4.4 README.md
pigato-0.4.3 README.md
pigato-0.4.2 README.md
pigato-0.4.1 README.md
pigato-0.4.0 README.md
pigato-0.3.1 README.md
pigato-0.3.0 README.md
pigato-0.2.27 README.md
pigato-0.2.26 README.md
pigato-0.2.25 README.md
pigato-0.2.23 README.md
pigato-0.2.22 README.md
pigato-0.2.21 README.md