Introduction to Gearman
Gearman is a framework for distributing work among multiple processes and machines. Due to its functionality, it can serve as a manager, load balancer, or interface between different languages with no single point of failure.
Since this book is about Rx/reactive/asynchronous programming, we're going to cover Gearman fairly quickly. Needless to say, Gearman is very easy to set up and use.
The Gearman PHP extension is written in the C language, so we need to install it via PECL or a package manager relevant to your platform (refer to http://gearman.org/download/ for more information).
Gearman's name is an anagram of the word "Manager" and it pretty well captures its purpose. Gearman doesn't do the work itself. It just receives a task (also referred to simply as a job) from a client and delegates it to an available worker.
The structure of any Gearman application is easily understood from the following diagram:
Diagram from the official Gearman...