Component Composition Strategies and Tactics
Component technologies have continuously evolved since the early 90s. With the advent of Spring and the development of the Dependency Injection pattern, they have taken a new turn and started providing advanced composition mechanisms.
Last week, Sanjay Patil, Standards Architect at SAP Labs, published an article on "IT Scenarios for Service Component Architecture" that described some of the composition strategies enabled by the Service Component Architecture.
Last month, a team from IBM compared the different component technologies and the degree to which they support composition. The article first defined some of the properties that promote composition mechanisms:
- Interface coupling
- Data (type systems and message formats)
- Version resiliency
- Transport independence
- Expected interaction patterns
- Ability to mediate
For Sanjay, the two most important factors are transport independence which translates into deployment flexibility, and dynamicity which is achieved in SCA with the use of policies.
The IBM article also explored the many factors that influence the granularity of the component, though it supports the current industry thinking that:
in general, loosely coupled components are coarse grained, while tightly coupled components are more likely to be fine grained
The article argues that:
SCA provides composition on two axes: composition by reference and composition by implementation
- SCA components can compose services by orchestrating the invocation pattern of those services through a single invocation programming model that's independent of where and how the services are deployed.
- SCA can also provide composition by implementation through the use of an assembly of finer-grained components as the implementation of a coarse-grained component.
Their analysis is shared by Sanjay who sees:
- A bottom-up composition scenario where an application [is composed] by assembling different existing implementation artifacts
- An heterogeneous composition scenario ... [where] SCA allows structuring the integration logic, and related functions (such as mapping, etc.) as first class components, whose relationship with other components is then captured as part of a well defined composite.
However, he also describes yet another scenario, a "top-down" scenario which:
...takes the opposite approach for creating the composites [...where] the goal of an Assembler is to analyze the high level business requirements and create composites on top of components that are yet to be implemented.
The IBM article concludes:
One of the strengths of SCA is its ability to combine with a wide variety of fine-grained component models that are used to implement coarse-grained service components. SCA brings value to each of them in terms of modeling the structure of solutions in the large, providing agility and flexibility, and removing the need to define complex configuration details within implementation code. It also has the virtue of being able to connect different component models used for different parts of an overall solution.
Ben Linders Oct 02, 2014