Sha256: bd6a8e02975a897da73c057fbfe872bb0771134e66e833b63c2f2938dd8cfbd3

Contents?: true

Size: 1.66 KB

Versions: 5

Compression:

Stored size: 1.66 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 => true })
client.request('echo', 'Hello world')
```

### 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

5 entries across 5 versions & 1 rubygems

Version Path
pigato-0.2.7 README.md
pigato-0.2.6 README.md
pigato-0.2.5 README.md
pigato-0.2.4 README.md
pigato-0.2.3 README.md