When decomposing a system into components, components should be designed to perform a self-contained function that has a clearly defined external interface. A well-designed component has high internal coherence and low external interface complexity. Both the function and the interface must be clearly defined, including the allowed range of operation and timing characteristics.
Data and Control Flow
The decomposition of the system determines the control and data flow between components. In a distributed system, control information and data is exchanged between components by sending messages. The component interfaces set the timing requirements for communication and synchronization.
Cohesion Criteria and Task Structuring
Components should have strong internal cohesion, that is, each component should perform a set of well-defined, self-contained functions that form a logical unit. The component can be implemented as a single-threaded process that executes the tasks sequentially or as a multithreaded process, where threads execute concurrently. The latter is to be preferred if the tasks to be performed are independent and concurrent in nature. Possible delays in one task do not impact execution of other tasks, which would be the case with single-threaded execution at some predefined ordering.