3.8 For Further Reading
Here in the early days of what some are calling the age of component-based software engineering, we are awash in stories where the architect thought he or she could plug two
It is tempting to treat architecture as an assembly of components, but there are great conceptual advantages to be
Chapter 4. Styles of the
FOR MORE INFORMATION
In Section 4.10, we provide references for reading about dozens of styles. We discuss notation for C&C styles in Section 4.7.
Many C&C styles exist, and we discuss only a few of them in this chapter. We discuss six—pipe-and-filter, shared-data, publish-subscribe, client-server, peer-to-peer, and communicating-processes—that apply to a wide variety of systems and provide enough semantic richness to
4.1 The Pipe-and-Filter Style
The pattern of interaction in the pipe-and-filter style is characterized by successive transformations of streams of data. Data arrives at a filter, is transformed, and is passed through pipes to the
4.1.2 Elements, Relations, and Properties
The pipe-and-filter style, summarized in Table 4.1, provides a single type of component—the
and a single type of connector—the
. A filter transforms data that it receives through one or more pipes and transmits the result through one or more pipes. A pipe is a connector that conveys streams of data from the output port of one filter to the input port of another filter. Pipes act as unidirectional
Table 4.1. Summary of the pipe-and-filter style
Because pipes buffer data during communication, filters can act asynchronously, concurrently, or independently. Moreover, a filter need not know the identity of its upstream or downstream filters. For this reason, pipe-and-filter systems have the nice property that the overall computation can be treated as the functional composition of the compositions of the filters.
Constraints on composition of elements in this style
4.1.3 What the Pipe-and-Filter Style Is For and What It's Not For
Systems with a pipe-and-filter style are heavily oriented toward data transformation. Often, pipes and filters
4.1.4 Relation to Other Styles
A C&C view in a pipe-and-filter style is not the same as a data flow projection or a data flow view. In the pipe-and-filter style, "lines" between components represent connectors, which have a specific computational meaning: They transmit streams of data from one filter to another. In data flow projections, the lines represent relations indicating the communication of data between components. The latter have little computational meaning: They simply mean that data flows from one element to the next. This flow might be realized by a connector, such as a procedure call, the routing of an event between a publisher and a subscriber, or data transmitted via a pipe. The reason that these views might be
4.1.5 Examples of the Pipe-and-Filter Style
Figure 4.1, taken from Appendix A, shows a pipe-and-filter primary presentation for the ECS system.
Figure 4.1. ECS