Tuesday 3 May 2011

Common Principles of Service-Orientation

The common set of principles mostly associated with service-orientation are listed below:
  • Reusability 
  • Formal Contract 
  • Loose Coupling
  • Abstracting the  underlying logic 
  • Service Composability
  • Autonomous Services
  • Stateless Services
  • Services must be discoverable

1. Reusability:
        Regardless of whether immediate reuse opportunities exist, services are designed to support the potential reusability feature.
        Service-orientation encourages reuse in all services, regardless if immediate requirements for the reuse exist. This reduces the development effort in future requirements.  Also this principle facilitates all forms of reuse, including inter-application interoperability, composition, and the creation of cross-cutting or utility services.

2. Formal Contract:
         In order for services to interact, they need not share anything but a collection of published metadata that describes each service and defines the terms the terms of information exchange.
         Service contracts provide a formal definition of:
  • the service endpoint 
  • each service operation
  • every input and output message supported by each operation
  • rules and characteristics of the service and its operations

3. Loose Coupling:
         Dependencies between the underlying logic of a service and its consumers are limited to conformance of the service contract.
         Loose coupling is a condition wherein a service acquires knowledge of another service while still remaining independent of that service.  Loose coupling is achieved through the use of service contracts that allow service to interact within predefined parameters

4. Abstracting the  underlying logic:
        The only part of a service that is visible to the outside world is what is exposed via the service contract.  Underlying logic, beyond what is expressed in the service contract metadata, is invisible to the outside world.
          This principle allows services to act as black boxes, hiding their details from the outside world.  The scope of logic represented by a service significantly influences the design of its operations and its position within a process. 

5. Composability:
          Services may compose others, allowing logic to be represented at different levels of granularity. This promotes reusability and the creation of service abstraction layers.
          This principle ensures that services are designed so that they can participate as effective members of other service compositions if ever required.

6. Autonomous Services:
          The logic governed by a service resides within an explicit boundary. The service has control within this boundary, and is not dependent on other services for it to execute its governance.
          This principle eliminates dependencies on other services.

7. Stateless Services:
          Services should be designed to maximize statelessness even if that means deferring state management elsewhere.
         Services should minimize the amount of state information they manage and the duration for which they hold it. 

8. Services must be discoverable:
           Services should allow their descriptions to be discovered and understood by humans and service requestors that may be able to make use of their logic.
           Service discovery helps avoid the accidental creation of redundant services of services that implement redundant logic.

  Out of the 8 common principles autonomy, loose coupling, abstraction, and the need for a formal contract can be considered the core principles that form the baseline foundation for SOA.



No comments:

Post a Comment