"Pipes and filters" was an interesting read, but I think the example of using a compiler was not best suited for someone exposed the pattern.
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.
Pipes are synchronized and operate on a first-in-first-out buffer paradigm. Trying to confuse the reader, this example of a pipe resembles a common queue to push and pop items off the stack. Is this an incorrect assumption or understanding?
Not sure what the author means when "you have to change your code whenever you want to recombine or reuse filter components." I thought the idea of having multiple filters was to support multiple formats.
The Pipes and Filters pattern presented is recognizable, and it is likely you have been using the pattern all along. Dr. Johnson identified other sources to gaining a better understanding of the pattern. Bill Walker's Master's thesis is a wonderful example of applying the Pipes and Filters pattern. The fact it was about music was an interesting topic and one that I can associate with fairly easily. I am considering the idea of bringing Dagos Manolescu's "A DataFlow Pattern language" to fruition for a writing assignment or class project.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment