Controller/Worker Model

In the controller/worker (sometimes called boss/worker) model, a controller entity receives one or more requests, then creates worker entities to execute them. Typically, the controller controls the number of workers and what each worker does. A worker runs independently of other workers.

An example of this model is a print job spooler controlling a set of printers. The spooler's role is to ensure that the print requests received are handled in a timely fashion. When the spooler receives a request, the controller entity chooses a printer and causes a worker to print the job on the printer. Each worker prints one job at a time on a printer, while it also handles flow control and other printing details. The spooler may support job cancellation or other features that require the controller to cancel worker entities or reassign jobs.