# Incremental Construction for Scalable Component-Based Systems
## 3 Component-Based Incremental Construction Process  
Components in many component models are objects developed in an object-oriented programming language. For example, using Java, an EJB component can be created by using object aggregation/composition or inheritance mechanisms for objects. A COM component model supports a containment composition mechanism [25]. In the object-oriented development (OOD) paradigm, a class can be composed with aspects [26], mixins [27] and traits [28]. Hence, to complete our study of achieving incremental construction independent of any specific object-based component model, OOD itself is considered as a component model. Such a consideration is in compliance with the reference framework for the survey of component models defined in [29]. Using the four general categories of composition mechanisms, our proposed taxonomy (extracted from a survey on software composition mechanisms [15]) of software composition mechanisms in CBD is shown in Figure 3.  
We conclude that the composition mechanisms from containment and extension categories, by and large, are used to define larger basic program units from the smaller program units. In contrast, composition mechanisms from connection (except trait-class composition) and coordination categories define interactions among the composed program units in the resultant composite unit; these mechanisms are useful to construct systems [30]. In CBD, a system is a pair \(\langle Comp,Comm\rangle\) of computation (components) and communication (connections or coordinators). Starting from \(S_{0}\) (a component or a composite of components and connectors), incremental construction is a process (Figure 4a) to construct systems by adding increments  
Figure 3: A taxonomy of software composition mechanisms. Figure 2: Four general categories of composition mechanisms. (a component/connector/composite) to an incomplete system. The behavior of a system is based on both the computation and communication. It is a set of services exhibited by the system; a service's role is the execution of computation from one or more components and possible interactions between the components. An incremental step (Figure 3(b)), relates the two consecutive systems as \(B_{S_{i}}\subseteq B_{S_{i+1}}\). In this relation, \(B_{S_{i}}\) and \(B_{S_{i+1}}\) represent the behaviors of systems \(S_{i}\) and \(S_{i+1}\) respectively; the symbol '\(\subseteq\)' represents the behavior containment, i.e., the functionality of the new system (\(S_{i+1}\)) contains the functionality of the old system (\(S_{i}\)). However, the exact structure of an increment and the precise nature of the behavior of the increment is different for different categories of component models. The concept of behavior containment is based on the functionality of components and system. Adding further details, the system pair (\((Comp,Comm)\)) can be represented as a tuple \(\langle Comp,C,D\rangle\) of computation (\(Comp\)), control (\(C\)) and data (\(D\)). An execution of a system's service may invoke computations from more than one component. Hence, for a service's execution request, a system's functionality is the _result_ of executing its computations (according to its control flow) on its data. As with the system, the functionality of a component can be defined as a set of (provided) services exhibited by the component, e.g., component \(C\) in Figure 4(a). The control flow in the computation of a service of a component defines interactions (tuple of \(\langle Req,Res\rangle\) sending/receiving messages) on the component's ports; this knowledge of interactions through ports is required to use the component in a system. Hence, the component's functionality is a set of message sequences (Figure 4(a)). Interaction protocols in Wright [31], behavior protocol in SOFA2 [32], gate (port) protocols in TrustMe [33] and RBSEFFs (resource demanding service effect specification) in Palladio [34] component models use the concept of interactions on component ports.