Sidekiq Job or Worker?

sidekiq においてJobなのかWorkerなのかという議論があるようだ。

Rename Sidekiq::Worker to Sidekiq::Job · Discussion #4971 · mperham/sidekiq

個人的には、下記Wikiにも書いてあるとおり worker という概念が曖昧になりがちな概念なので1つ1つのクラスとしてはJobと表現したほうが好み。

そのほうがRails標準のActiveJobとも同列な概念として扱えるし。

Within the Sidekiq ecosystem, the term worker is ambiguous and thus meaningless.

  • Sidekiq::Job is a module included in a job class.
  • If you have 10 “workers” executing jobs, you have 10 threads.
  • If you start a “worker”, you have a process.
  • If you have 10 “workers” enqueued, you have 10 jobs.

ref. Best Practices · mperham/sidekiq Wiki

思うは招く

下記の植松電機社長のTEDトークがたいへん良かった。