Service composability principle
Service composability is a design principle, applied within the service-orientation design paradigm, which encourages the design of services that can be reused in multiple solutions that are themselves made up of composed services. The ability of the service to be recomposed is ideally independent of the size and complexity of the service composition.
This principle is directly responsible for the agility promised by SOA as it promotes composing new solutions by reusing existing services.
The concept of developing software out of independently existing components encourages the concept of composition. This is the underlying concept within object-orientation where the end product is composed of several interlinked objects that have the ability to become part of multiple software solutions, no matter how complex the solution is. The same composition concept is inherited by service-orientation, whereby a business process is automated by combining multiple services. However, within service-orientation there is even greater focus on building services that can be composed and recomposed within multiple solutions in order to provide the agility promised by the SOA. As a result of this emphasis, some guidelines are required in order to develop services that can be effectively aggregated into multiple solutions.
The service composability principle provides design considerations that help towards designing composable services with a view to encourage service reuse as much as possible. The guidelines provides by this principle prepare the service so that it is ready to participate in service compositions without requiring any further design changes.
The application of the service composability principle requires designing services so that they can be used in a service composition either as a service that controls other services, i.e. a controller service, or as a service that provides functionality to other services in the composition without further composing other services, i.e. a composition member.
In order for the service to provide this dual functionality, the service contract needs to be designed in a manner so that it presents functionality based on varying levels of input and output data. In case if it is required to participate as a composition member, then usually the input parameters to the service would be more fine grained as compared to the situation when it is required to participate as a composition controller. A heavily reused service needs to be as stateless as possible (service statelessness principle) so that it can provide optimum performance when composed within multiple service compositions.
The effectiveness of this principle depends upon the extent to which rest of the design principles have been applied successfully. The application of the standardized service contract principle enables the services to be interoperable with other and helps to keep the composition design rather simpler by avoiding the need to perform runtime data model transformation. By applying the service loose coupling principle, a service could be recomposed with the confidence that it would not create any form of negative coupling with the other service in the composition. The application of the service autonomy and the service statelessness principles increase the reliability and availability of the service so that it be reused in multiple service compositions with increased confidence.
In order for the service to be an efficient service controller as well as a service member, the underlying technology architecture needs to provide a runtime environment that is scalable and can support the statelessness required by the service. Similarly as the service compositions increase in size, the storage and retrieval of the context data, related to the runtime interaction of the services, may need to be delegated to the runtime environment instead of the services managing this context data in order to make the service composition more efficient.
As more and more service compositions are built, there is a tendency of getting dependent on a service that is highly reused. This requires careful analysis during the design of the service compositions and considering alternate standby services for critical functionality. On the other hand, it may become difficult to evolve a service that is now become a part of multiple service compositions. This could be addressed by the application of the Concurrent Contracts design pattern that advocates maintaining multiple concurrent contracts for a service. This way the service can evolve while providing backward compatibility.
Some of the factors that determine the composability potential of a service include:
- Ability to provide functionality at different levels within a business process.
- Message Exchange pattern
- Whether the service supports transactions and rollback/compensation features.
- Support for exception handling.
- The availability of meta-data about service capabilities and behavior.
- Service Composition
- Michael Poulin.Evolution of principles of Service Orientation: Service Statelessness, part 7[Online].Date accessed: 21 April 2010.
- Service Contract
- IBM Red Books Power Systems and SOA Synergy[Online].Date accessed: 21 April 2010.
- coupling types
- Concurrent Contracts Pattern
- Reddy. et al.Evaluating legacy assets in the context of migration to SOA[Online].pp 58.Date accessed: 21 April 2010.
- Kjell-Sverre Jerijærvi.SOA Contract Maturity Model[Online].Date accessed: 21 April 2010.
- Mauro. et al. Service Oriented Device Integration - An Analysis of SOA Design Patterns. [Online], pp. 1–10, 2010 43rd Hawaii International Conference on System Sciences, 2010. Date accessed: 8 April 2010.
- Dino Esposito.The HTML Message Pattern[Online].Date accessed: 21 April 2010.
- Service-orientation Principles
- Anne Thomas Manes.The SOA Manifesto[Online].Date accessed: 21 April 2010.
- Wojciech Cellary, Sergiusz Strykowski.E-Government Based on Cloud Computing and Service-Oriented Architecture[Online].Date accessed: 22 April 2010.