Using workers to create pipelines

This recipe demonstrates creating groups of worker pools and connecting them together to form a pipeline. For this recipe, we link together two pools, but the pattern can be used for much more complex operations, similar to middleware.

Worker pools can be useful for keeping workers relatively simple and to also further control concurrency. For example, it may be useful to serialize logging while parallelizing other operations. It may also be useful to have a smaller pool for more expensive operations so that you don't overload machine resources.