The Pipes and Filter Architectural Pattern: Divides the task of a system in to sequential processing steps and these are connected through by the data flow through the system – The output data of a one step is input to the subsequent step. Each processing step is implemented by filter component. A filter consumes and delivers the data incrementally (so it delivers output before consuming whole input). Each pipe implements the data flow between adjacent processing steps. Filter components are the processing units of the pipeline.
There two types of filters: passive and active. Passive filters can either have data pushed to them or have data pulled from them. Most commonly, active filters are in a loop pulling its data from and pushing it down the pipeline. An active filter will begin processing on its own as a separate program or thread.
The Pipes and filters pattern is very popular and simple. I think, it’s better to use passive filters when data available asynchronously and Active filters are good when data is available all the time for processing.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment