Home > Articles

Understanding Service-Orientation

  • Print
  • + Share This

Thomas Erl provides detailed coverage of the service-orientation design paradigm, including its underlying design philosophy and design principles, as well as a comparison to traditional silo-based design approaches. He concludes with coverage of typical critical success factors for adopting service-orientation within organizations.

This chapter is from the book

This chapter is dedicated to describing the service-orientation design paradigm, its principles, and how it compares to other design approaches.

3.1 Introduction to Service-Orientation

In the everyday world around us services are and have been commonplace for as long as civilized history has existed. Any person carrying out a distinct task in support of others is providing a service. Any group of individuals collectively performing a task in support of a larger task is also demonstrating the delivery of a service (Figure 3.1).

Figure 3.1

Figure 3.1 Three individuals, each capable of providing a distinct service.

Similarly, an organization that carries out tasks associated with its purpose or business is also providing a service. As long as the task or function being provided is well defined and can be relatively isolated from other associated tasks, it can be distinctly classified as a service (Figure 3.2).

Figure 3.2

Figure 3.2 A company that employs these three people can compose their capabilities to carry out its business.

Certain baseline requirements exist to enable a group of individual service providers to collaborate in order to collectively provide a larger service. Figure 3.2, for example, displays a group of employees who each provide a service for ABC Delivery. Even though each individual contributes a distinct service, for the company to function effectively, its staff also needs to have fundamental, common characteristics, such as availability, reliability, and the ability to communicate using the same language. With all of these things in place, these individuals can be composed into a productive working team. Establishing these types of baseline requirements within and across business automation solutions is a key goal of service-orientation.

Services in Business Automation

From a general perspective, a service is a software program that makes its functionality available via a published API that is part of a service contract. Figure 3.3 shows the symbol used to depict a service (without providing any detail regarding its service contract).

Figure 3.3

Figure 3.3 The symbol used to represent an abstract service.

Different implementation technologies can be used to program and build services. The two common implementation mediums covered in this book are SOAP-based Web services (or just Web services) and RESTful services (or just REST services). Figure 3.4 shows the standard symbols used to represent service contracts in this book.

Figure 3.4

Figure 3.4 The chorded circle symbol used to display an Invoice service contract (left), and a variation of this symbol used specifically for REST service contracts (right).

Services Are Collections of Capabilities

When discussing services, it is important to remember that a single service can offer an API that provides a collection of capabilities. They are grouped together because they relate to a functional context established by the service. The functional context of the service illustrated in Figure 3.5, for example, is that of “shipment.” This particular service provides a set of capabilities associated with the processing of shipments.

Figure 3.5

Figure 3.5 Much like a human, an automated service can provide multiple capabilities.

A service is therefore essentially a container of related capabilities. It is comprised of a body of logic designed to carry out these capabilities and a service contract that expresses which of its capabilities are made available for public invocation. When we make reference to service capabilities in this book, we are specifically focused on those that are defined as part of the service contract API.

A service consumer is the runtime role assumed by a software program when it accesses and invokes a service—or, more specifically, when it sends a message to a service capability expressed in the service contract. Upon receiving the request, the service begins executing logic encompassed by the invoked capability and it may or may not return a corresponding response message to the service consumer. A service consumer can be any software program capable of invoking a service via its API. A service itself may act as the consumer of another service.

Service-Orientation as a Design Paradigm

A design paradigm is an approach to designing solution logic. When building distributed solution logic, design approaches revolve around a software engineering theory known as the “separation of concerns.” In a nutshell, this theory states that a larger problem is more effectively solved when decomposed into a set of smaller problems or concerns. This gives us the option of partitioning solution logic into capabilities, each designed to solve an individual concern. Related capabilities can be grouped into units of solution logic.

Different design paradigms exist for distributed solution logic. What distinguishes service-orientation is the manner in which it carries out the separation of concerns and how it shapes the individual units of solution logic with specific characteristics and in support of a specific target state.

Fundamentally, service-orientation shapes suitable units of solution logic as enterprise resources that can be designed to solve immediate concerns while still remaining agnostic to the greater problem. This provides the constant opportunity to reutilize the capabilities within those units to solve other problems as well.

Applying service-orientation to a meaningful extent results in solution logic that can be safely classified as “service-oriented” and units that qualify as “services.” (Chapter 5 explores in detail how the separation of concerns is carried out with service-orientation.)

Services, as part of service-oriented solutions, exist as physically independent software programs with distinct design characteristics. Each service is assigned its own distinct functional context and is comprised of a set of capabilities related to this context. A service composition is a coordinated aggregate of services. As explained later in the Effects of Service-Orientation on the Enterprise section, a composition of services (Figure 3.6) is comparable to a traditional application in that its functional scope is usually associated with the automation of a parent business process.

Figure 3.6

Figure 3.6 This symbol, comprised of three connected spheres, represents a service composition. Other, more detailed representations are based on the use of chorded circle symbols that illustrate which service capabilities are actually being composed.

A service inventory is an independently standardized and governed collection of complementary services within a boundary that represents an enterprise or a meaningful segment of an enterprise. Figure 3.7 establishes the symbol used to represent a service inventory in this book.

Figure 3.7

Figure 3.7 The service inventory symbol is comprised of spheres within a container.

An IT enterprise can contain or may even be comprised of a single service inventory. Alternatively, an enterprise environment can contain multiple service inventories. When an organization has multiple service inventories, this term is further qualified as domain service inventory.

The application of service-orientation throughout a service inventory is of paramount importance to establish a high degree of native interservice interoperability. This supports the repeated creation of effective service compositions (Figure 3.8).

Figure 3.8

Figure 3.8 Services (top) are delivered into a service inventory (right) from which service compositions (bottom) are drawn.

Here’s a brief recap of the elements of service-orientation that have been covered so far:

  • Service-oriented solution logic is implemented as services and service compositions designed in accordance with service-orientation.

  • A service composition is comprised of services that have been assembled to provide the functionality required to automate a specific business task or process.

  • Because service-orientation shapes many services as enterprise resources, one service may be invoked by multiple consumer programs, each of which can involve that same service in a different service composition.

  • A collection of standardized services can form the basis of a service inventory that can be independently governed within its own physical deployment environment.

  • Multiple business processes can be automated by the creation of service compositions that draw from a pool of existing agnostic services that reside within a service inventory.

As explored in Chapter 4, service-oriented architecture is a form of technology architecture optimized in support of services, service compositions, and service inventories.

Service-Orientation Design Principles

The preceding sections have described the service-orientation paradigm at a very high level. But how exactly is this paradigm applied? It is primarily applied at the service level (Figure 3.9) via the application of the following eight design principles:

  • Standardized Service Contract (291)Services within the same service inventory are in compliance with the same contract design standards.

  • Services express their purpose and capabilities via a service contract. This is perhaps the most fundamental principle in that it essentially dictates the need for service-oriented solution logic to be partitioned and distributed in a standardized manner. It also places a great deal of emphasis on the design of service contracts to ensure that the manner in which services express functionality and define data types is kept in relative alignment.

  • Service Loose Coupling (293)Service contracts impose low consumer coupling requirements and are themselves decoupled from their surrounding environment.

  • Coupling refers to a measure of dependency between two things. This principle establishes a specific type of relationship within and outside of service boundaries, with a constant emphasis on reducing (“loosening”) dependencies between a service contract, its implementation, and service consumers. Service Loose Coupling (293) promotes the independent design and evolution of service logic while still guaranteeing baseline interoperability.

  • Service Abstraction (294)Service contracts only contain essential information and information about services is limited to what is published in service contracts.

  • Abstraction ties into many aspects of service-orientation. On a fundamental level, this principle emphasizes the need to hide as much of the underlying details of a service as possible. Doing so directly enables the previously described loosely coupled relationship. Service Abstraction (294) also plays a significant role in the positioning and design of service compositions.

  • Service Reusability (295)Services contain and express agnostic logic and can be positioned as reusable enterprise resources.

  • Whenever we build a service, we look for ways to make its underlying capabilities useful for more than just one purpose. Reuse is greatly emphasized with service-orientation—so much so, that it becomes a core part of the design process and it also forms the basis for key service models (as explained in Chapter 5).

  • Service Autonomy (297)Services exercise a high level of control over their underlying runtime execution environment.

  • For services to carry out their capabilities consistently and reliably, their underlying solution logic needs to have a significant degree of control over its environment and resources. Service Autonomy (297) supports the extent to which other design principles can be effectively realized in real-world production environments.

  • Service Statelessness (298)Services minimize resource consumption by deferring the management of state information when necessary.

  • The management of excessive state information can compromise the availability of a service as well as the predictability of its behavior. Services are therefore ideally designed to remain stateful only when required. Like Service Autonomy (297), this is another principle that focuses less on the contract and more on the design of the underlying logic.

  • Service Discoverability (300)Services are supplemented with communicative metadata by which they can be effectively discovered and interpreted.

  • For services to be positioned as IT assets with repeatable ROI, they need to be easily identified and understood when opportunities for reuse present themselves. The service design therefore needs to take the “communications quality” of service contracts and capabilities into account, regardless of whether a discovery mechanism such as a service registry is an immediate part of the environment.

  • Service Composability (302)Services are effective composition participants, regardless of the size and complexity of the composition.

  • As the sophistication of service-oriented solutions grows, so does the complexity of underlying service composition configurations. The ability to effectively compose services is a critical requirement for achieving some of the fundamental goals of service-oriented computing. Complex service compositions place demands on service design. Services are expected to be capable of participating as effective composition members, regardless of whether they need to be immediately enlisted in a composition.

Figure 3.9

Figure 3.9 How service-orientation design principles collectively shape service design.

  • + Share This
  • 🔖 Save To Your Account