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 ...
Get Deploying with JRuby 9k now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.