This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Governance Basics

About Service-Oriented Architecture (SOA)

In the modern day, information technology (IT) systems of the enterprise are continuously challenged with demands to serve ever changing requirements. In order to get more out of existing investments, rather than developing new applications to serve such demands, IT companies are moving towards the service-oriented paradigm. In the service oriented architecture, a service is a well-defined and self-contained function, one that would not depend on the context or state of other services. Developing services and deploying them using a Service-Oriented Architecture (SOA) is the best way to utilize existing IT systems to meet new challenges. SOA represents a new generation of distributed computing architecture.

According to the OASIS SOA Reference Model definition, "SOA is a paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains. It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effects consistent with measurable preconditions and expectations".

In simple terms, Service-oriented Architecture is a collection of services. Services in a SOA can communicate with each other. This communication could take the shape of either simple data processing, or, it could even involve two or more services coordinating some activity. The combination of services, both internal and external to an organization, makes up a service-oriented architecture.

SOA is mostly popular because it promises interoperability between heterogeneous applications and technologies with least hassle in application integration. A service's loose coupling to host applications gives it the ability to share data across enterprises more easily. Using SOA's increase reusability, overall costs could be minimized with increased response times to ITs change requests. This results in rapid involvement of IT systems, for both old and new.

However, as the organization matures, they tend to face the following challenges with SOA:

  • Number of new services increases
  • Number of dependencies among services increases
  • Number of service users (both internal and external to the organization) increases
  • Users develop interest in different versions of the same service
  • Users sign up for different service level agreements. For example, John's request will go through high performance servers, while Jennifer's requests go through regular servers.

If not properly handled, and organization's SOA could transform into a complex unmanageable mesh. To avoid this situation, an organization should (but not limited to) perform the following  throughout the entire lifecycle of services:

  • Properly manage services creation, adhering to rules laid down by an organization
  • Increase reuse of services, by "socializing" existing services
  • Properly analyze dependencies of a given service, before changing it
  • Provide service versioning and allow users to consume different versions of a given service
  • Properly validate services for standard compliance
  • Properly test services to assure quality of services
  • Document both technical and business aspects of services to help consumers and providers
  • Properly define who accesses what services
  • Measure service behavior at runtime (for example, how many times this service is called, by how many consumers, etc..)

In other words, SOA should properly "steer" its enterprise IT system. This process is called "SOA Governance". Governance is derived from the Latin term for steering.

SOA Governance

It is hard to find a concrete definition for SOA Governance, as the term heavily depends on a multitude of factors. People tend to define SOA Governance differently.

In simple terms, SOA governance is a set of processes, responsibilities and tools that reinforces good behavior and help avoid bad behaviors. It is all about control. If you design a service for a specific purpose and for a set of consumers, you will want to have assurance that it will only be used for that purpose and by that set of consumers. You also want the service to be available, performing as it was intended for, and secured. Transactions must have integrity, at least to the degree that you originally specified. Most Importantly, you need to make sure defined processes and responsibilities are followed properly. For this you need to adapt proper measurement techniques (to measure effectiveness on the actions taken) in your SOA.

SOA Governance can be divided to two distinct phases:

  • Namely design-time governance
  • Run-time governance

Design-time governance spans over the entire service development cycle. For example, let's say a requirement analyst is gathering information to create a new service. Design-time governance makes the analyst's job easier by providing all related information on the requirement. Furthermore, it avoids service duplication, providing enough information on existing services and promoting service reuse. Upon properly defining service level agreements, the service will be properly tested and documented.

Runtime governance comes into play, soon after the service is deployed. It monitors operational aspects of a service (service performance bottle necks, who is accessing more, etc.). Unlike design-time governance, most runtime governance functions are automated. Reports generated in this phase are important feedback, for the next service design and development iteration.

To enable governance, software industry responded with two different categories of tools:

  • Registries 
  • Repositories

Registries and Repositories

A registry is a tool that keeps a list of services with their locations. On the other hand a repository functions as a tool that keeps information on how the services are used, how they interact, who is using the services and why they are used. These tools are considered as key enablers of SOA Governance. Usually these two technologies come together as an "Integrated" Registry-Repository, thus avoiding the need of duplicated data entry and the need to synchronize information. Additionally, it decreases the risk of inconsistencies that may exist between a registry and repository.

In a registry-repository, you can publish information on services that you already use, planning to use and those services that you need to be aware of. Information related to both internal and external services (to you/your organization) can be stored in this way.

Service reuse is the heart of SOA. Before implementing a new service, you can search in the registry-repository for existing implementations. This helps you to use an existing service either as it is or by developing a new service associating the existing service. Furthermore, registry-repositories help you discover associations among services. This helps you to get a better idea of any impacts on changing a particular service.

In SOA Governance, it is important to enforce organizational and domain specific business rules (policies) to validate artifacts before they are published on a registry-repository. Usually most of these policies can be described in (machine-readable) documents such as XML documents. Registry-repository can read such documents to interpret rules found in them to validate against artifacts as needed. Such validations can easily go beyond simple syntax validations. For example, there can be a policy enforced so that WSDL artifacts must only be using "Document/Literal" style for communication. Validation usually improves overall quality of artifacts stored in a registry-repository.

Typically, artifacts in a registry-repository undergoes lifecycle states of create, test, deploy and deprecate. A registry-repository performs the following functions:

  • Enforces policies during transitions of the states of create, test, deploy and deprecate.
  • Defines "who can access what?" of services. Access to certain services may differ depending on the user, user group or state of the service lifecycle.
  • Sends notifications to relevant users once a change to a service artifact has been made.

As more and more services are introduces and reused, it is necessary to keep track of dependencies of each service in an organization. SOA registry-repository makes life easier by in this context, keeping inter-service dependency information as relationships among service information artifacts. For example, such relationships includes but not limited to Contains, Implements, Uses, Depends, etc. A registry-repository should allow defining custom relationships to cater organization-specific requirements.

Service artifacts evolve over time due to reasons such as fulfilling new requirements, yielding to different versions of the same service. A registry-repository should provide versioning capabilities that can enable automatic version control of artifacts stored. Additionally, a registry-repository also should keep older versions of artifacts to allow users migrate smoothly from one version to another.

A SOA registry-repository also need to seamlessly integrate its services with those in other SOA deployments. In other words, a registry-repository should federate with other SOA registries-repositories using open standards, and possibly appear as a single virtual registry-repository.

To implement SOA Governance in service run-time, a SOA registry-repository should provide a software development toolkit (SDK) to develop custom registry client applications and services. In this case the registry-repository acts as a source of operational and configuration data during runtime.

In summary, a registry-repository should provide the following features:

  • Record information on services
  • Search for an existing service for reuse
  • Discover associations and dependencies of a service
  • Enforce policies throughout the service lifecycle
  • User access control
  • Automatic version control
  • An SDK for registry-repository extensibility

Â