Background Processing with Rails, Redis and Sidekiq
In any non-trivial web application you will get to a point where certain requests take so long to answer that your application will break if you try to respond with a synchronous HTTP response.
In this case you need to offload the work into a background process and start to build out a slightly more distributed workflow for your backend architecture.
This screencast is a quick overview of how to build background processes in Rails apps using Redis and Sidekiq, and then deploy the proper infrastructure onto Heroku.
This is a pattern that is necessary to understand to do any kind of serious web development.
=========================================================================================
Source Code: https://github.com/AlwaysBCoding/Episodes/tree/master/background-processing/ExampleApp