Chapter 4 - Understanding SOA
Chapter 4 - Understanding SOA
4. Understanding SOA
Introduction to SOA
4.1 The Four Characteristics of SOA
4.2 The Four Common Types of SOA
4.3 The End Result of Service-Orientation and SOA
4.4 SOA Project and Lifecycle Stages
The focus of this chapter is to establish the link between service-orientation and
technology architecture, establish distinct SOA characteristics and types, and
raise key project delivery considerations.
Note
Several of the upcoming sections make reference to clouds and
cloud computing in general. If you are new to cloud computing, you
can find introductory content at www.whatiscloud.com and cloud
computing patterns at www.cloudpatterns.org. More comprehensive
coverage is provided in the Cloud Computing: Concepts,
Technology & Architecture and Cloud Computing Design Patterns
titles that are part of the Prentice Hall Service Technology Series
from Thomas Erl.
Introduction to SOA
Let’s briefly recap some of the topics covered in Chapter 3 to clearly establish
how they relate to each other and how they specifically lead to a definition of
SOA:
• There is a set of strategic goals associated with service-oriented
computing.
• These goals represent a specific target state.
• Service-orientation is the paradigm that provides a proven method for
achieving this target state.
• When we apply service-orientation to the design of software, we build
units of logic called “services.”
• Service-oriented solutions are comprised of one or more services.
We have established that a solution is considered service-oriented after service-
orientation has been applied to a meaningful extent. A mere understanding of the
design paradigm, however, is insufficient. To apply service-orientation
consistently and successfully requires a technology architecture customized to
accommodate its design preferences, initially when services are first delivered
and especially when collections of services are accumulated and assembled into
complex compositions.
In other words:
• To build successful service-oriented solutions, we need a distributed
technology architecture with specific characteristics.
• These characteristics distinguish the technology architecture as being
service-oriented. This is SOA.
Service-orientation is fundamentally about attaining the specific target state we
established toward the end of Chapter 3. It asks that we take extra design
considerations into account with everything we build so that all the moving parts
of a given service-oriented solution support the realization of this state and foster
its growth and evolution. These design considerations carry over into the
supporting technology architecture, which must have a distinct set of
characteristics that enable the target state and inherently accommodate ongoing
change within that target environment.
Note
As we explore each of these characteristics individually, keep in
mind that in real-world implementations the extent to which these
characteristics can be attained will likely vary.
Business-Driven
Technology architectures are commonly designed in support of solutions
delivered to fulfill tactical (short-term) business requirements. Because the
overarching, strategic (long-term) business goals of the organization aren’t taken
into consideration when the architecture is defined, this approach can result in a
technical environment that, over time, becomes out of alignment with the
organization’s business direction and requirements.
This gradual separation of business and technology results in a technology
architecture with diminishing potential to fulfill business requirements and one
that is increasingly difficult to adapt to changing business needs (Figure 4.1).
Figure 4.1 A technology architecture (A) is often delivered in alignment with
the current state of a business but can be incapable of changing in alignment
with how the business evolves. As business and technology architectures
become increasingly out of sync, business requirement fulfillment decreases,
often to the point that a whole new technology architecture (B) is needed,
which effectively resets this cycle.
When a technology architecture is business-driven, the overarching business
vision, goals, and requirements are positioned as the basis for and the primary
influence of the architectural model. This maximizes the potential alignment of
technology and business and allows for a technology architecture that can evolve
in tandem with the organization as a whole (Figure 4.2). The result is a continual
increase in the value and lifespan of the architecture.
Figure 4.2 By defining a strategic, business-centric scope to the technology
architecture, it can be kept in constant sync with how the business evolves
over time.
Vendor-Neutral
Designing a service-oriented technology architecture around one particular
vendor platform can lead to an implementation that inadvertently inherits
proprietary characteristics. This can end up inhibiting the future evolution of an
inventory architecture in response to technology innovations that become
available from other vendors.
An inhibitive technology architecture is unable to evolve and expand in response
to changing automation requirements, which can result in the architecture having
a limited lifespan after which it needs to be replaced to remain effective (Figure
4.3).
Figure 4.3 Vendor-centric technology architectures are often bound to
corresponding vendor platform roadmaps. This can reduce opportunities to
leverage technology innovations provided by other vendor platforms and can
result in the need to eventually replace the architecture entirely with a new
vendor implementation (which starts the cycle over again).
It is in the best interest of an organization to base the design of a service-oriented
architecture on a model that is in alignment with the primary SOA vendor
platforms, yet neutral to all of them. A vendor-neutral architectural model can be
derived from a vendor-neutral design paradigm used to build the solution logic
the architecture will be responsible for supporting (Figure 4.4). The service-
orientation paradigm provides such an approach, in that it is derived from and
applicable to real-world technology platforms while remaining neutral to them.
Figure 4.4 If the architectural model is designed to be and remain neutral to
vendor platforms, it maintains the freedom to diversify its implementation by
leveraging multiple vendor technology innovations. This increases the
longevity of the architecture as it is allowed to augment and evolve in
response to changing requirements.
Note
Just because an architecture is classified as vendor-neutral doesn’t
mean it is also aligned with current vendor technology. Some
models produced by independent efforts are out of synch with the
manner in which mainstream SOA technology exists today and is
expected to evolve in the future and can therefore be just as
inhibitive as vendor-specific models.
Enterprise-Centric
The fact that service-oriented solutions are based on a distributed architecture
doesn’t mean that there still isn’t the constant danger of creating new silos within
an enterprise when building poorly designed services, as illustrated in Figure 4.5.
SOA Patterns
As established in the Service Encapsulation [359] pattern, an
enterprise resource essentially embodies the fundamental
characteristics of service logic.
Composition-Centric
More so than in previous distributed computing paradigms, service-orientation
places an emphasis on designing software programs as not just reusable
resources, but as flexible resources that can be plugged into different aggregate
structures for a variety of service-oriented solutions.
To accomplish this, services must be composable. As advocated by the Service
Composability (302) principle, this means that services must be capable of being
pulled into a variety of composition designs, regardless of whether or not they
are initially required to participate in a composition when they are first delivered
(Figure 4.7).
Figure 4.7 Services within the same service inventory are composed into
different configurations. The highlighted service is reused by multiple
compositions to automate different business processes.
To support native composability, the underlying technology architecture must be
prepared to enable a range of simple and complex composition designs.
Architectural extensions (and related infrastructure extensions) pertaining to
scalability, reliability, and runtime data exchange processing and integrity are
essential to support this key characteristic.
Design Priorities
A valuable perspective of how service-orientation relates to SOA and of how the
formalization of this relationship results in a set of design priorities was provided
by the publication of the “SOA Manifesto.” Have a look at the following
excerpt:
Service orientation is a paradigm that frames what you do. Service-
oriented architecture (SOA) is a type of architecture that results from
applying service orientation.
We have been applying service orientation to help organizations
consistently deliver sustainable business value, with increased agility
and cost effectiveness, in line with changing business needs.
Through our work we have come to prioritize:
Business value over technical strategy
Strategic goals over project-specific benefits
Intrinsic interoperability over custom integration
Shared services over specific-purpose implementations
Flexibility over optimization
Evolutionary refinement over pursuit of initial perfection
That is, while we value the items on the right, we value the items on
the left more.
It is evident how these design priorities are directly supported by the service-
orientation design paradigm and the service-oriented architectural model. This is
further explored in the “Annotated SOA Manifesto” that was published at
www.soa-manifesto.com and is also provided in Appendix D of this book.
SOA Patterns
Architecture types are closely related to SOA patterns. Note how
each pattern profile table in Appendix C contains a field dedicated
to showing related architectures.
Service Architecture
A technology architecture limited to the physical design of a software program
designed as a service is referred to as the service architecture. This form of
technology architecture is comparable in scope to a component architecture,
except that it will typically rely on a greater amount of infrastructure extensions
to support its need for increased reliability, performance, scalability, behavioral
predictability, and especially its need for increased autonomy. The scope of a
service architecture will also tend to be larger because a service can, among
other things, encompass multiple components (Figure 4.9).
Figure 4.9 An example of a high-level service architecture view for the
Accounts service, depicting the parts of the surrounding infrastructure utilized
to fulfill the functional requirements of all capabilities. Additional views can
be created to show only those architectural elements related to the processing
of specific capabilities. Further detail, such as data flow and security
requirements, would normally also be included.
Whereas it was not always that common to document a separate architecture for
a component in traditional distributed applications, the importance of producing
services that need to exist as independent and highly self-sufficient and self-
contained software programs requires that each be individually designed.
Service architecture specifications are typically owned by service custodians
and, in support of the Service Abstraction (294) design principle, their contents
are often protected and hidden from other project team members (Figure 4.10).
Figure 4.10 The custodian of the Accounts service intentionally limits access
to architecture documentation. As a result, service consumer designers are
only privy to published service contract documents.
The application of design standards and other service-orientation design
principles further affects the depth and detail to which a service’s technology
architecture may need to be defined (Figure 4.11). For example, implementation
considerations raised by the Service Autonomy (297) and Service Statelessness
(298) principles can require a service architecture to extend deeply into its
surrounding infrastructure by defining exactly what physical environment it is
deployed within, what resources it needs to access, what other parts of the
enterprise may be accessing those same resources, and what extensions from the
infrastructure it can use to defer or store data it is responsible for processing.
Note
Many organizations use standard service profile documents to
collect and maintain information about a service throughout its
lifespan. Chapter 15 of SOA: Principles of Service Design explains
the service profile document and provides a sample template.
SOA Patterns
Service agents can be custom-developed or may be provided by the
underlying runtime environment, as per the Service Agent [357]
pattern.
Within a service architecture the specific agent programs may be identified along
with runtime information as to how message contents are processed or even
altered by agent involvement. Service agents may themselves also have
architecture specifications that can be referenced by the service architecture
(Figure 4.13).
Figure 4.13 A variety of service agents are part of the Accounts service
architecture. Some perform general processing of all data whereas others are
specific to input or output data flow.
A key aspect of any service architecture is the fact that the functionality offered
by a service resides within one or more individual capabilities. This often
requires the architecture definition itself to be taken to the capability level.
Each service capability encapsulates its own piece of logic. Some of this logic
may be custom-developed for the service, whereas other capabilities may need to
access one or more legacy resources. Therefore, individual capabilities end up
with their own, individual designs that may need to be so detailed that they are
documented as separate “capability architectures.” However, all relate back to
the parent service architecture.
Note
Standard composition terminology defines two basic roles that
services can assume within a composition. The service responsible
for composing others takes on the role of composition controller,
whereas composed services are referred to as composition members.
SOA Patterns
Even though compositions are comprised of services, it is actually
the service capabilities that are individually invoked and that
execute a specific subset of service functionality to carry out the
composition logic. This is why design patterns, such as Capability
Composition [328] and Capability Recomposition [329] make
specific reference to the composed capability (as opposed to the
composed service).
SOA Patterns
The scope and boundary of a service inventory architecture can
vary, as per the Enterprise Inventory [340] and Domain Inventory
[338] patterns.
SOA Patterns
When the term “SOA” or “SOA implementation” is used, it is most
commonly associated with the scope of a service inventory. In fact,
with the exception of some design patterns that address cross-
inventory exchanges, most SOA patterns are expected to be applied
within the boundary of an inventory.
SOA Patterns
The Inventory Endpoint [346] pattern can play a key role when
designing service inventory environments with external
communication requirements.
Note
This section is focused on technology architecture. However, it is
worth pointing out that a “complete” service-oriented enterprise
architecture would encompass both the technology and business
architecture of an enterprise (much like traditional enterprise
architecture).
Furthermore, additional types of service-oriented architecture can
exist, especially when spanning beyond a private enterprise
environment. Examples can include interbusiness service
architecture, service-oriented community architecture and various
hybrid architectures that encompass IT resources from external
cloud computing environments.
Note
For those of you interested in how each of the strategic goals
specifically influences the four types of service-oriented
architecture, Chapter 23 in SOA Design Patterns documents the
individual impacts.
Note
This section provides a good transition to Chapter 5, which explores
service definition as a foundational part of the service-oriented
analysis project stage, and Chapters 6 to 9, which further delve into
the service-oriented analysis stage and then cover considerations
pertaining to the service-oriented design project stage.
Note
A top-down strategy needs to be applied to an extent to
meaningfully carry out the service-oriented analysis and service-
oriented design stages covered in Chapters 6 to 9. The scope of this
effort is determined by the scope of the planned service inventory,
as per the Balanced Scope pillar covered in Chapter 3.
Figure 4.26 The service inventory analysis cycle. The highlighted step refers
to the service inventory blueprint that represents the primary deliverable of
this stage.
As individual service candidates are identified, they are assigned appropriate
functional contexts in relation to each other. This ensures that services (within
the service inventory boundary) are normalized so that they don’t functionally
overlap. As a result, service reuse is maximized and the separation of concerns is
cleanly carried out. A primary deliverable produced during this stage is the
service inventory blueprint.
The scope of the initiative and the size of the target service inventory tend to
determine the amount of upfront effort required to create a complete service
inventory blueprint. More upfront analysis results in a better defined conceptual
blueprint, which is intended to lead to the creation of a better quality inventory
of services. Less upfront analysis leads to partial or less well-defined service
inventory blueprints.
Here are brief descriptions of the primary analysis cycle steps:
• Define Enterprise Business Models – Business models and specifications
(such as business process definitions, business entity models, logical data
models, etc.) are identified, defined, and, if necessary, brought up-to-date
and further refined. These models are used as the primary business analysis
input.
• Define Technology Architecture – Based on what we learn of business
automation and service encapsulation requirements, we are able to define
preliminary technology architecture characteristics and constraints. This
provides a preview of the service inventory environment, which can raise
practical considerations that may impact how we define service candidates.
• Define Service Inventory Blueprint – After an initial definition that
establishes the scope and structure of the planned service inventory, this
blueprint acts as the master specification wherein modeled service
candidates are documented.
• Perform Service-Oriented Analysis – Each iteration of the service
inventory lifecycle executes a service-oriented analysis process.
The service inventory blueprint is incrementally defined as a result of repeated
iterations of steps that include the service-oriented analysis.
Note
The scope of the service inventory analysis stage and the resulting
service inventory blueprint directly relates to the Balanced Scope
consideration explained in the The Four Pillars of Service-
Orientation section in Chapter 3, as well as the possible application
of the Domain Inventory [338] pattern.
Note
Chapters 6 and 7 provide service modeling processes for Web
services and REST services, respectively.
Figure 4.28 A look at how the collaboration between business analysts and
technology architects changes with SOA projects. While the depicted
collaborative relationship between business analysts and architects may not be
unique to an SOA project, the nature and scope of the analysis process are.
Service Development
After all design specifications have been completed, the actual programming of
the service can begin. Because the service architecture will already have been
well-defined as a result of the previous stages and the involvement of custom
design standards, service developers will generally have clear direction as to
how to build the various parts of the service architecture.
Service Testing
Services need to undergo the same types of testing and quality assurance cycles
as traditional custom-developed applications. However, new requirements
introduce the need for additional testing methods and effort. For example, to
support the realization of the Service Composability (302) principle, newly
delivered services need to be tested individually and as part of service
compositions. Agnostic services that provide reusable logic especially require
rigorous testing to ensure that they are ready for repeated usage (both
concurrently as part of the same service compositions and by different service
compositions).
The following are examples of common Service Testing considerations:
• What types of service consumers could potentially access a service?
• Will the service need to be deployed in a cloud environment?
• What types of exception conditions and security threats could a service be
potentially subjected to?
• Are there any security considerations specific to public clouds that need to
be taken into account?
• How well do service contract documents communicate the functional
scope and capabilities of a service?
• Are there SLA guarantees that need to be tested and verified?
• How easily can the service be composed and recomposed?
• Can the service be moved between on-premise and cloud environments?
• How easily can the service be discovered?
• Is compliance with any industry standards or profiles (such as WS-I
profiles) required?
• If cloud deployed, are there proprietary characteristics being imposed by
the cloud provider that are not compatible with on-premise service
characteristics?
• How effective are the validation rules within the service contract and
within the service logic?
• Have all possible service activities and service compositions been mapped
out?
• For service compositions that span on-premise and cloud environments, is
the performance and behavior consistent and reliable?
Because services are positioned as IT assets with runtime usage requirements
comparable to commercial software products, similar quality assurance
processes are generally required.
Service Discovery
To ensure that reusable services are consistently reused, project teams carry out a
separate and explicitly defined service discovery process. The primary goal of
this process is to identify one or more existing agnostic services (such as utility
or entity services) within a given service inventory that can fulfill generic
requirements for whatever business process the project team is tasked with
automating.
The primary mechanism involved in performing service discovery is a service
registry that contains relevant metadata about available and upcoming services,
as well as pointers to the corresponding service contract documents (which can
include SLAs). The communications quality of the metadata and service contract
documents play a significant role in how successfully this process can be carried
out. This is why the Service Discoverability (300) principle is dedicated solely to
ensuring that information published about services is highly interpretable and
discoverable.