Are there any good books or other resources on building out a system to do background processing? It seems that it's a common task, but there are different approaches.
Re:Where Ruby/Sinatra falls short
by ryanbrunner on Monday October 15, 2018 @11:18AM
(#18220408)
The Ruby world at least seems to have settled on relatively simple Redis backed queues, where you directly request the job to be executed rather than use a more generic message broker.
For sure there are more complex scenarios, but if you're just getting started you'll be well served by just reading the docs for sidekiq.
Unless you're building something with very specific requirements just use Sidekiq [0]. It's easy to install and performs very well.
Re:Where Ruby/Sinatra falls short
by matthewmacleod on Monday October 15, 2018 @11:50AM
(#18220677)
Not a direct answer, but Rails now includes ActiveJob which abstracts over the various jobs are available and is nice and simple to set up.
Another really common mistake is tasks being performed inside the web request that should instead be offloaded to background job processing. If something is going to take more than milliseconds, it should be a job. If you see a PR where someone is bumping up the HTTP timeout in order to keep their slow processing request from being timed out by the webserver, they are doing something inline that should actually be a job.