jondot/sneakers — 2.2k★ on GitHub (Ruby). A fast background processing framework for Ruby and RabbitMQ
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
⚠️⚠️⚠️ Sneakers users have decided to continue with a new repo
and a new name: meet ruby-amqp/kicks.
Unfortunately, this repo was abandoned by its original author who has exclusive control
over the RubyGems project. So the community of users has decided to move it
to a different "fork" (continuation) under a new name.
What is Sneakers
__
,--' >
`=====
A high-performance RabbitMQ background processing framework for
Ruby.
Sneakers is being used in production for both I/O and CPU intensive workloads, and have achieved the goals of high-performance and 0-maintenance, as designed.
Installation
Add this line to your application's Gemfile:
gem 'sneakers'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sneakers
Documentation
A quick start guide is available in the section below.
Visit the wiki for more detailed
documentation and GitHub releases for release
notes.
How do we add a worker? Firstly create a file and name it as boot.rb
then create a worker named as Processor.
touch boot.rb
require 'sneakers'
require 'redis'
require 'json'
$redis = Redis.new
class Processor
include Sneakers::Worker
from_queue :logs
def work(msg)
err = JSON.parse(msg)
if err["type"] == "error"
$redis.incr "processor:#{err["error"]}"
end
ack!
end
end
Let's test it out quickly from the command line:
$ sneakers work Processor --require boot.rb
We just told Sneakers to spawn a worker named Processor, but first --require a file that we dedicate to setting up environment, including workers and what-not.
If you go to your RabbitMQ admin now, you'll see a new queue named logs was created. Push a couple messages like below:
Which increments started and handled.ack, and times the work unit.
From here, you can continue over to the
Wiki
Docker
If you use Docker, there's some benefits to be had and you can use both
docker and docker-compose with this project, in order to run tests,
integration tests or a sample worker without setting up RabbitMQ or the
environment needed locally on your development box.
To build a container run docker build . -t sneakers_sneakers
To run non-integration tests within a docker container, run docker run --rm sneakers_sneakers:latest
To run full integration tests within a docker topology including RabbitMQ,
Redis (for integration worker) run scripts/local_integration, which will
use docker-compose to orchestrate the topology and the sneakers Docker image
to run the tests
To run a sample worker within Docker, try the TitleScraper example by
running script/local_worker. This will use docker-compose as well. It will
also help you get a feeling for how to run Sneakers in a Docker based
production environment
Use Dockerfile.slim instead of Dockerfile for production docker builds.
It generates a more compact image, while the "regular" Dockerfile generates
a fatter image - yet faster to iterate when developing
Compatibility
Sneakers main branch: Ruby 3.0+
Sneakers 2.7.x and later (using Bunny 2.9): Ruby 2.2.x
Sneakers 1.1.x and later (using Bunny 2.x): Ruby 2.x
Sneakers 1.x.x and earlier: Ruby 1.9.x, 2.x
Contributing
Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).
Thanks:
To all Sneakers Contributors - you make this happen, thanks!
Copyright
Copyright (c) 2015-2018 Dotan Nahum @jondot. See LICENSE for further details.
TopGit's last sync did not record any GitHub topics for jondot/sneakers. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on jondot/sneakers?
The most recent commit recorded on jondot/sneakers was 2.3 years ago, based on the GitHub push timestamp. The repository has 319 forks — one of the better signals of community interest.
How many stars does jondot/sneakers have?
jondot/sneakers has 2.2k GitHub stars — refresh the page for the live number, or check github.com/jondot/sneakers. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is jondot/sneakers written in?
jondot/sneakers is written primarily in Ruby. GitHub's language field is based on the largest share of bytes in the default branch.
Where do I read more about jondot/sneakers?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/jondot/sneakers is the definitive source.
Read full README in the tab above.
Want a second opinion on sneakers?
Ask an AI that can read this page — one click and you get its take on sneakers.