Ruby concurrency is when two tasks will begin, run, and complete in overlapping time periods. It doesn’t essentially mean, though, that they’ll ever each be running at a similar instant (e.g., multiple threads on a single-core machine). In distinction, correspondence is once 2 tasks virtually run at a similar time (e.g., multiple threads on a multicore processor).
Multiple Processes vs. Multithreading: Processes:
Examples of Ruby solutions that use multiple processes:
Resque: A Redis-backed Ruby library for making background jobs, inserting them on multiple queues, and process them later.
Unicorn: AN protocol server for Rack applications designed to solely serve quick shoppers on low-latency, high-bandwidth connections and profit of options in Unix/Unix-like kernels.
Examples of Ruby solutions that use multithreading:
Sidekiq: A full-featured backgrounding framework for Ruby. It aims to be easy to integrate with any trendy Rails application and far higher performance than different existing solutions.
Puma: A Ruby internet server engineered for concurrency.
Thin: a awfully quick and easy Ruby internet server.