Sneakers

Performance background processing for Ruby


Fork on Github →

Psst! Fancy our non-profit but cool shirt? :)

Performance Happy

Hybrid multi-process and multi-threaded processing model max out all your cores.

Worker Management

If you liked how Unicorn works, we used a similar model to support rolling upgrades and reloads.

Scalable Queue Broker

We built on RabbitMQ a robust, performant and stable queue broker that everyone loves.

Quick Start

Install the gem:

$ gem install 'sneakers'

Make a worker or two:

require 'sneakers'
require 'open-uri'
require 'nokogiri'

class TitleScraper
  include Sneakers::Worker
  from_queue 'downloads'

  def work(msg)
    doc = Nokogiri::HTML(open(msg))
    worker_trace doc.css('title').text
    ack!
  end
end

Include our rake tasks:

require 'sneakers/tasks'

And run:

$ export WORKERS=TitleScraper
$ rake sneakers:run