Realize variation points

This section presents how the connectors identified in Section 5.7 are designed in order to support the modularization of architectural variation points. We extend the connector of the COSMOS$^{*}$ model to support the modularization of architectural variation points using aspects and we call this new connector model as connector-VP.

For illustrative purpose, let's say that the Public Health Complaint has two different and alternative cipher components, namely LightweightCipher and RobustCipher. Figure 12(a) shows the CipherConnVP connector-VP mediating the communication of LightweightCipher and RobustCipher, with ComplaintMgr mandatory component. Figure 12(b) shows the detailed design of the architecture shown in Figure 12(a). For the sake of clarity, some packages, classes, aspects were omitted. Each connector-VP has at least two crosscutting interfaces: a requisition interface and a delegation interface. In this case, both the requisition and delegation interfaces are implemented using aspects.

Figure 12: (a) Architectural view of two components connected by means of a connector-VP; (b) detailed design of components and connector-VP
Image connvp-v01-1col

Requisition interfaces enable crosscutting components to modify base-level components. They are called requisition interfaces because they request for services provided by adapter classes in connectors-VP. For example, the RIComplaint requisition interface requires services provided by LightweightAdapter and RobustAdapter classes, which perform the role of adapter. Delegation interfaces are responsible for delegating the requisitions made by base-level components to crosscutting components. For instance, in Figure 12(b), DILightweight and DIRobust delegation interfaces extend AALightweightCipher and AARobustCipher crosscutting provided interfaces and they use LightweightAdapter and RobustAdapter adapters, respectively. Finally, the adapters are classes that are meant to connect delegation and requisition interfaces and they also have the role of adapting as described in the Adapter pattern proposed by Gamma et al. [47]. The example in Figure 12(a) shows the relationship between a base-level component and two crosscutting components. In this case, the connector-VP must have a delegation interface for each crosscutting component.

As previously mentioned, in this model, the architectural variability is implemented using aspects and resolved during compile time. This means architectural variants are implemented using aspects and can be added or removed depending on the product configuration. Moreover, aspects within connectors-VP are added or removed according to the presence or absence of these variants. For example, in Figure 12, to configure a product selecting the Robust Cipher feature one can simply remove the DILightweight delegation interface and LightweightCipher architectural variant. Then, only the DILightweight interface delegation would cut across the adapter and consequently it would connect to the RIComplaint requisition interface. If the RIComplaint interface required a service provided by LightweightAdapter, it would return an exception to indicate that the LightweightCipher variant is not available for this product configuration.

Leonardo Tizzei 2013-02-18