RubyGems.org

sparrow

0.4.1

# Sparrow is a really fast lightweight queue written in Ruby that speaks memcached. # That means you can use Sparrow with any memcached client library (Ruby or otherwise). # # Basic tests shows that Sparrow processes messages at a rate of 850-900 per second. # The load Sparrow can cope with increases exponentially as you add to the cluster. # Sparrow also takes advantage of eventmachine, which uses a non-blocking io, offering great performance. # # Sparrow is a in-memory queue but will persist the data to disk when receiving a term signal. # # Sparrow comes with built in support for daemonization and clustering. # Also included are example libraries and clients. For example: # # require 'memcache' # m = MemCache.new('127.0.0.1:11212') # m['queue_name'] = '1' # Publish to queue # m['queue_name'] #=> 1 Pull next msg from queue # m['queue_name'] #=> nil # m.delete('queue_name) # Delete queue # # # or using the included client: # # class MyQueue < MQ3::Queue # def on_message # logger.info "Received msg with args: #{args.inspect}" # end # end # # MyQueue.servers = [ # MQ3::Protocols::Memcache.new({:host => '127.0.0.1', :port => 11212, :weight => 1}) # ] # MyQueue.publish('test msg') # MyQueue.run # # Messages are deleted as soon as they're read and the order you add messages to the queue probably won't # be the same order when they're removed. # # Additional memcached commands that are supported are: # flush_all # Deletes all queues # version # quit # The memcached commands 'add', and 'replace' just call 'set'. # # Call sparrow with --help for usage options # # The daemonization won't work on Windows. # # Check out the code: # svn checkout http://sparrow.googlecode.com/svn/trunk/ sparrow # # Sparrow was inspired by Twitter's Starling

installgem install sparrow
Authors

Alex MacCAw

6,698 total downloads 1,733 for this version
Owners

Baf018e2cc4616e4776d323215c7136c

Gemfile
gem 'sparrow', '~> 0.4.1'
Versions
  1. 0.4.1 August 1, 2008 (11 KB)
  2. 0.4 August 1, 2008 (11 KB)
  3. 0.3.1 February 3, 2008 (11.5 KB)
  4. 0.3 February 2, 2008 (11.5 KB)
  5. 0.2 January 26, 2008 (10 KB)
Development Dependencies
  1. hoe >= 1.7.0