Giter Club home page Giter Club logo

celluloid-redis's Introduction

Celluloid::Redis

Gem Version Build Status Code Climate Coverage Status

A Celluloid::IO-based connection backend for the redis-rb gem, providing "evented" connection support that can multiplex long-lived blocking calls like pub/sub and blpop(rpush) with the Celluloid message protocol.

Why?

Unlike EventMachine, Celluloid::IO ideally does not need to provide separate "Celluloid-enabled" versions of each and every library that ever does any kind of I/O, but can instead leverage dependency injection APIs that tell libraries to use Celluloid::IO::TCPSocket instead of TCPSocket.

Unfortunately, the redis-rb gem is a bit gnarly and does a lot of strange things like monkeypatching its own subclasses of TCPSocket and UNIXSocket in attempts to add better timeout handling.

Rather than trying to inject itself into that mess, this gem provides Redis::Connection::Celluloid which seeks to be a drop-in replacement for Redis::Connection::Ruby.

Installation

Add this line to your application's Gemfile:

gem 'celluloid-redis'

And then execute:

$ bundle

Or install it yourself as:

$ gem install celluloid-redis

Require it in your Ruby application with:

require 'celluloid/redis'

Usage

When instantiating the client object, specify :celluloid:

redis = Redis.new(:driver => :celluloid)

Contributing

  • Fork this repository on github
  • Make your changes and send us a pull request
  • If we like them we'll merge them
  • If we've accepted a patch, feel free to ask for commit access

License

Copyright (c) 2013 Tony Arcieri. Distributed under the MIT License. See LICENSE.txt for further details.

celluloid-redis's People

Contributors

dphase avatar marshall-lee avatar simonrobson avatar tarcieri avatar

Watchers

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