Queue / Worker
I am surprised that there are so many web developers don't understand how queue/worker model can help them on their web applications. If your websites have to support features like image processing, pdf generation, emailing, etc, then, the queue / worker model will definitely help you. So, how queue/worker model works?It is relatively easy. Let's take image processing as an example, everyone should know that image processing is a really resources-intensive job especially you have to run tonnes of them(only if you have POPULAR website) on single server. By using a queue/worker model, you can put all your processing jobs in a queue server and spawn a worker thread or have a worker server to handle all the jobs for you. Before Implementation:
uploading images > wait > processing image > wait > redirecting the userAfter Implementation:
uploading images > ( redirecting the user & processing images ) Now, your servers are redirecting your users and processing images concurrently. Your user experience will not affected by your long blocking image processing jobs anymore.Ruby Plugin: http://github.com/defunkt/resque , http://github.com/tobi/delayed_job
