rzmq-enhancement
- Intro
- NOTE WELL
- Preliminaries
- Install
- Usage
- Tips
- Release Notes
- Contributing to rzmq-enhancement
- Copyright
Intro
The ffi-rzmq wraps ZeroMQ nicely, but not in a Ruby-friendly manner. here, we take that one step further to present a more Ruby-friendy interface. We also pass all objects as JSON, encoding and decoding them automatically for you, so you don’t have to be concered with the details.
NOTE WELL
This is still under development, and currently represents only a minimal interface. For the versions of 0.0.x, there will be “rapid” development and breaking changes.
Only when we reach version 0.1.0 or higher, the interfaces and the API will be stable enough for general use.
Feel free to play with this for now, but don’t put it in production code just yet. Or if you do, be very aggressive about locking down the exact version. For example:
gem 'rzmq_enhancement', '0.0.27'
Preliminaries
This is implemented as a DSLish Ruby-friendly interface. The initial implementation shall be as “lean” as possible, basically serving our needs at Sensorberg. Eventually, we’ll flesh this out to fully support most of the ffi-rzmq interface.
This is also “opinionated”. We pass all objects as JSON strings, which will probably suit most needs, and will allow the receiving (and sending) ends to be language-agnostic, as long as they use JSON as well.
Install
Make sure the ZeroMQ library is already installed on your system. If you are on a Mac, we recommend ‘brew’ or ‘macports’ to get it.
From command-line:
gem install rzmq-enhancement
Or in you Gemfile:
gem 'rzmq-enhancement'
Usage
Please see the Examples.
Tips
Do not use “localhost”. Use, instead, 127.0.0.1, example:
'tcp://127.0.0.1:2200'
Or if all the processes will be running on the same machine,
'ipc://anynameyoulike.ipc'
Release Notes
version | date | details |
---|---|---|
v0.0.27 | 2017-06-22 | zeromq_push semantics now allows you to properly pass the payload in as a parameter. |
Contributing to rzmq-enhancement
- Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.
- Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.
- Fork the project.
- Start a feature/bugfix branch.
- Commit and push until you are happy with your contribution.
- Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright
Rights have been transferred by Fred Mitchell to: Copyright (c) 2017 Sensorberg GbmH. See LICENSE.txt for further details.