Pipe and Filter Pattern — Architectural Patterns | by Devsena Mishra
What is a Pipe and Filter Pattern?
It’s an architectural pattern that involves certain filters to filter the data streams, and the pipes that connect them, to produce a certain output.
With the pipe-and-filter pattern, each component called a filter is responsible for a single transformation or data operation. Data is streamed from one filter to the next as quickly as possible, and data operations occur in parallel.
Loosely coupled filters can be reused and combined in different ways to create new pipelines.
The pipe-and-filter pattern is prevalent in data analysis and data transformation use cases. If you’ve ever piped Unix commands together in a terminal window, then you have first-hand experience with the pipe-and-filter pattern.
In fact, Java Streams API, are an example of the implementation of Pipe and Filter pattern as well. But we will talk about that a bit later, let’s first discuss the Pipe and Filter Architecture Pattern and try to make some sense out of its diagram.
To learn more, please watch this video: