Filters and pipes
Pipes and Filters is a design pattern that is responsible for moving the output of one system into another. This design pattern is useful when trying to connect two different systems with different web services schema or different formats. This often occurs during updating old software, so that the new one can use portions of the old one. Integrating such systems involve a whole series of transformations, like transforming XML-based service communications another XML format or Binary to XML based.
A solution for this problem is to implement a sequence of filter components, where filters transform the received messages and forward the to the next component. The interchanged data between filters and other components are transported through pipes.
When a system needs more than one filter, the pipes carry the data from the first filter to another until its fully transformed into a compatible format. Pipes also buffer the carried data until the target filter is ready to transform them. After applying all needed transformations, the pipe transfer the data to the targeted application which consumes it.
This pattern needs the output data to be compatible with the input of the next filer or application. In general the output of one component should be compatible with the input of the next component in row.
The picture below shows an example of using filers and pipes:
Comments
No comments yet.Add Comment