Wynn Netherland changelog.com/posts

sidekiq - More efficient, Resque-compatible message processing for Rails 3

What if 1 Sidekiq process could do the work of 20 Resque processes?

Sidekiq from Mike Perham has a multiple-messages-per-process approach and boosts efficiency in a (mostly) Resque-compatible package. Since your workers must be threadsafe, Resque users will notice Sidekiq’s API is slightly different:

# app/workers/hard_worker.rb
class HardWorker
  include Sidekiq::Worker

  def perform(name, count)
    puts 'Doing hard work'
  end
end

HardWorker.perform_async('bob', 5)

Be sure to check out Mike’s blog post, the project web site, or the GitHub wiki for more.

/via Karthik Hariharan


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00