Coder Social home page Coder Social logo

beaver's Introduction

Beaver

Because everyone loves an Eager Beaver

Much of this is a shameless copy paste job from gocardless#hutch (https://github.com/gocardless/hutch).

We took much inspiration from Sneakers too (https://github.com/jondot/sneakers). In fact, many thanks to Jondot who encouraged us to create this (well, not quite this).

(Eager) Beaver will ONLY process / consume jobs from a RabbitMQ server. Do not use this in production yet, we've just written it and have zero tests while we figure out if it works.

WHY? What's wrong with Hutch? What's wrong with Sneakers?

Nothing really. But they didn't work for our setup.

We use a multitude of different platforms and therefore publish directly to RabbitMQ with our own methods. We therefore didn't need the produce functions in either Hutch or Sneakers.

Hutch also has (at the current time) no support to send a CA and it was faster for us to create this than patch theirs. Sorry chaps.

Hutch requires access to the RabbitMQ API to clear the bindings out. Whilst this is a lovely idea, we run a heavily locked down cluster on a public IP and didn't want any traffic hitting the API. It was doable but added much work / config changes on our firewalls and chef recipes.

Sneakers is a fabulous repository and we urge you all to try this first. It does however create a connection for each worker which didn't fit with our setup. We didn't have a lot of luck with it in production - we use god as a process monitor which is already famous for memory leaks. We found our servers dying a miserable death after a few hours, even when the connections were reduced to 1.

Finally, we found the Sneakers Rails support lacking and we originally went off to create a sneakers-rails gem. Which we may still do.The principal of Sneaker's consume methods is to consume JSON to be platform independent. We like this a lot, it fits nicely with our multi-language set up.

The only problem is that it doesn't fit when you need access to your Rails models. If you're starting off, try and build your consumers so they accept JSON only and don't really need a db.

So that's that.

Again, Beaver will only consume. It uses the same process method as Hutch.

Installation

Add this line to your application's Gemfile:

gem 'beaver', git: "https://github.com/PolkaSpots/beaver"

And then execute:

$ bundle

Or install it yourself as (not working yet):

$ gem install beaver

Usage

TODO: Write usage instructions here. Yeah, this has be to completed.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/beaver/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

beaver's People

Contributors

simonmorley avatar

Stargazers

Lydia Curtis avatar Andrew Margarit avatar  avatar Zak Mooney avatar  avatar  avatar

Watchers

 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.