C&C styles specialize the C&C viewtype by introducing a specific set of component-and-connector types and by specifying rules about how elements of those types can be combined. A C&C style is typically associated with a pattern of interaction that prescribes how computation, data, and control flow through systems in this style.
Several dozen C&C styles have been described in design books. This chapter presents six generally useful ones.
In the pipe-and-filter style, the pattern of interaction is characterized by successive transformations of data. Data arrives at a filter, is transformed, and is passed through the pipe to the next filter or filters in the pipeline.
Analyses associated with pipe-and-filter systems include deriving the aggregate transformation provided by a graph of filters and reasoning about system performance.
In the shared-data style, the pattern of interaction is dominated by the retention of persistent data. There are multiple accessors of the data and at least one repository where the persistent data is retained.
Analyses associated with the shared-data style usually center on performance, security, privacy, reliability, and compatibility with, for example, existing repositories and their data.
In the publish-subscribe style, components interact by announcing events. Components may subscribe to a set of events. It is the job of the publish-subscribe runtime infrastructure to make sure that each published event is delivered to all subscribers of that event.
The publish-subscribe style is used to send events and messages to an unknown set of recipients. Because the set of recipients is unknown, a new recipient can be added without modification to the producers.
The client-server style shows components interacting by requesting services of other components. The essence of this style is that communication is typically paired. A request for service from a client is normally paired with the provision of that service.
The client-server style supports learning about the system in terms of separating out common services. The partitioning of functionality into clients and servers allows them to be independently assigned to tiers, based on runtime criteria. Client-server system analyses include determining whether the system's servers provide the client-required services, dependability analyses, security analyses, and performance.
Peer-to-peer systems provide for the exchange of services by direct exchange among components. Peer-to-peer is a kind of call/return style without the asymmetry found in the client-server style. Any component can in principle interact with any other component by requesting its services.
The peer-to-peer style provides flexibility of deploying the system across a global system platform.
The communicating-processes style is characterized by the interaction of concurrently executing components through various connector mechanisms, such as synchronization, message passing, data exchange, start, stop, and so forth.
For most systems, the communicating-processes style is an appropriate one to use to understand any behavior associated with concurrency, especially for analyzing performance and reliability.
C&C styles are sometimes the subject of confusion with one another and with styles in other viewtypes.
Informal box-and-line notations are often used to document C&C styles. UML provides several strategies for representing C&C styles, each of which has shortcomings. Principal strategies include (1) using classes and objects; (2) using subsystems, and (3) using the UML Real-Time Profile.