Often shaded by more recent and trendier architectural patterns getting more attention, Pipe and Filter can help us make our software systems more modular!
By emphasizing the use of simple and specific tools that do one thing well and that can be easily combined together, it aligns closely with the Unix philosophy.
How it works
Simply put, data manipulations occur along a sequence called pipeline, which is made of independent tools called filters, that are connected together via pipes.
See “Pipe and Filter Architecture” for a more detailed description.
Main strength and benefits
As a matter of fact, Pipe and Filter is the ideal pattern for sequential data processing.
Clearly, it promotes modularity by making it easier to maintain and test each filter independently from the rest of the architecture.
And it makes reusability straightforward! Similar to Unix tools, filters can be combined together in different ways for a variety of processing tasks.
So let’s make use of the Pipe and Filter pattern, either for the entire system or just parts of it!