Running Background Jobs with Sidekiq
Twitalytics needs to annotate the text in each post with the stock information from the stock-service you created in Chapter 1, Getting Started with JRuby. Invoking the service could take a long time, which makes this interaction a good candidate for a background job.
You’ve already learned how to use the JVM’s concurrency features to perform asynchronous request processing. The power of a true multithreaded platform makes it possible to increase throughput by running operations in parallel, but there are still many cases when you may want to move some computation into a separate process. This is true for any compute-intensive job that might steal CPU time from the request threads. It’s also useful for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access