Giter Site home page Giter Site logo

ruby-czmq's Introduction

ruby-czmq

ruby-czmq is my attempt at building a Ruby bindings gem for the CZMQ library.

ruby-czmq realizes a convenient and relatively elegant API on top of the FFI-based ruby-czmq-ffi gem, which provides low-level bindings to CZMQ and works on all the main Ruby VMs: YARV/MRI, JRuby, and Rubinius.

Motivation

One could wonder whether there was actually the need for a third gem (in addition to ffi-rzmq and the more outdated and YARV/MRI-specific rbzmq) providing Ruby bindings for ZeroMQ.

The fact is that both ffi-rzmq and rzmq are bindings for the ZeroMQ library. ZeroMQ is an awesome library, but it provides a rather low-level API designed for C/C++ and relatively difficult to make available to Ruby applications through a convenient and elegant interface. Instead, ruby-czmq provides bindings to CZMQ, a library that was specifically designed to provide a higher-level API to the ZeroMQ functions and that is significantly more Ruby-friendly than ZeroMQ. In addition, CZMQ provides functions, such as service discovery and cryptography, that are not present in ZeroMQ.

By interfacing with CZMQ, instead of ZeroMQ, ruby-czmq can provide many of the functions of ffi-rzmq and rbzmq with significantly less code.

Installation

Stable version

You can get the stable version of ruby-czmq by installing the czmq gem from RubyGems:

gem install czmq

Development version

If you want to try the development version of ruby-czmq, instead, just place these lines:

gem 'czmq-ffi', git: 'https://github.com/mtortonesi/ruby-czmq-ffi.git'
gem 'czmq', git: 'https://github.com/mtortonesi/ruby-czmq.git'

in your Gemfile and run:

bundle install

Examples

You can find some simple examples that demonstrate how to use the ruby-czmq api in the examples directory of this project.

License

MIT

ruby-czmq's People

Contributors

mtortonesi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ferraralug

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.