Summary
Building applications that have high cohesion and low coupling is a major goal in software engineering. In this chapter, we explored the pipeline pattern and you learned how to build component-based systems using flow-based programming (FPB) techniques. We studied FPB patterns and use cases that would benefit from applying the pipeline pattern.
We studied an example order processing flow. We progressed from an imperative implementation to a concurrent one using Goroutines and channels. We learned how I/O buffers can effectively be used to hold more than one order at a time and how this can compensate for variability in the time it takes each filter to process each order.
Our last implementation was an improvement upon the prior attempts. We created an elegant API based on the Filterer
interface. We were able to define and control our entire order processing flow with this one command: Â
pipeline := BuildPipeline(Decrypt{}, Charge{}, Authenticate{})
Lastly, we implemented various FPB...