Sunday, September 13, 2009

Pipes and Filters

The Pipes and filters pattern is very popular and widely used. It is almost a common sense idea to divide a large processing task into small sequences of independent steps and have some kind of connection between them. This is exactly what this pattern does: the processing steps are encapsulated into filters components and they are connected by pipes.
I have used this architectural pattern in an I/O project at work. The work involved moving data from a server’s memory to storage devices on a fiber channel network under the control of an adapter firmware. The task consisted of fetching the I/O request from the server’s memory, interpreting the request, fetching the data, computing and verifying a checksum on the data, then setting up DMA engines to send the data over the fibre channel network. We used the pattern to divide the task into several sequential processing steps. The work of each filter was isolated from the other components and this was a major advantage this year when we decided to use multiple threads on the system.

No comments:

Post a Comment