Thursday, October 15, 2009

Thoughts on OPL patterns: Pipes & Filters, Layered Systems, and Iterative Refinement

The reading for the first part of the next class consists of three patterns from Out Pattern Language (OPL). The first two, Pipes & Filters and Layered Systems are familiar to us as we have read about them from another source. The third pattern, Iterative Refinement, is new.

Comparing to the description from A System of Patterns, OPL's description on Pipes & Filters is definitely shorter. as a result some aspects of and details about the pattern are left out. For example, it does not mention about the correlation between the similarity of the interface of different filters and the ease of recombining them which is an important design consideration. It also does not cover liabilities of this pattern such as the difficulty of error reporting which the reader should also know.

The description seems to focus on a particular setup of the pipes & filters pattern that consists of a pipeline with each stage handled by a different resource; thus the discussion on dividing the amount of work at each filter equally and buffering capacity. Such discussion may not apply to a setup when all different processes responsible for the different filters are all running on a same processor.

The one on the Layered system seems very clear to me. It also helps greatly that I am already familiar with the pattern. I do feel that the authors put a lot of stress on portability. I guess this must be one of the main reason that people choose to use this pattern.

As for the third pattern, I find it hard to follow. I have seen some examples that avoids the dependencies between tasks to promote parallel execution; then addressing the dependencies at the end when merging the results. Since the invariants of this pattern are very general, I am not sure whether they actually fit into this pattern. Perhaps some pictures or a more concrete example can help to clarify.

No comments:

Post a Comment