Giter Club home page Giter Club logo

zmqmachine's Introduction

zmqmachine

by Chuck Remes
http://github.com/chuckremes/zmqmachine

DESCRIPTION:

ZMQMachine is another Ruby implementation of the reactor pattern but this time using 0mq sockets rather than POSIX sockets.

Unlike the great Eventmachine ruby project and the Python Twisted project which work with POSIX sockets, ZMQMachine is inherently threaded. The 0mq sockets backing the reactor use a thread pool for performing their work so already it is different from most other reactors. Also, a single program may create multiple reactor instances which runs in its own thread. All activity within the reactor is single-threaded and asynchronous.

It is possible to extend the 0mq library to “poll” normal file descriptors. This isn’t on my roadmap but patches are accepted.

FEATURES/PROBLEMS:

  • No specs yet.

  • Documentation is limited. I need to write up a lot more detail on the Handler classes passed to socket instances and how this differs from the Eventmachine way.

  • Exceptions and error codes haven’t really been implemented yet.

  • Some classes are just skeletons.

  • Recommended for JRuby since it is the only existing runtime that uses native threads without a GIL. MRI 1.9.x is okay but may have threading problems.

SYNOPSIS:

Read and execute the examples in the examples directory.

REQUIREMENTS:

Requires the 0mq library

  • 0mq 2.0.7

Depends on 2 external gems.

  • ffi-rzmq (>= 0.5.0)

  • ffi (> 0.6.3) (built from master for threading fixes)

INSTALL:

Make sure the 0MQ library is already installed on your system. Secondly, make sure the FFI gem is built from its project master (see Requirements). Lastly, verify the ffi-rzmq gem is built from its project master.

% git clone github.com/chuckremes/zmqmachine.git
% cd zmqmachine
% gem build zmqmachine.gemspec
% gem install zmqmachine-*.gem

LICENSE:

(The MIT License)

Copyright © 2010 Chuck Remes

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

zmqmachine's People

Stargazers

Ar Vicco avatar

Watchers

Ar Vicco avatar James Cloos avatar

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.