SOA starts with a simple idea – the concept of service. This makes it possible to introduce other ideas, such as service bus, service composition, and service virtualization, each of which can be applied to the architecture of an enterprise to deliver benefits. As an architect, it is your job to evaluate the needs of your enterprise, and the costs of the different potential solutions, to determine which of these ideas should be applied, and how they should be applied, in your SOA.
An architect should always probe into the information given, about both requirements and solutions, to reach a level of understanding that goes deeper than the buzzwords. For example, it is often said that “SOA delivers enterprise agility”. What does “agility” mean for your enterprise? Is it the ability to re-combine existing functions to meet changing customer requirements? Is it the ability to develop new functions rapidly? Is it the ability to scale operations to meet different levels of demand? Within the broad concept of SOA, there are three very different ideas that can help you meet these different agility requirements: service composition, model-driven development, and service virtualization. You can build all of these ideas into your SOA, but they each require different – and expensive – supporting infrastructure. You must choose your solution to fit the requirements.
This section will help you to match the features of SOA to the needs of your enterprise, so that you can determine the kind of SOA that is appropriate.
SOA Features, Benefits, and Infrastructure shows the main features and benefits of SOA, together with the infrastructure needed to support them.
SOA Features, Benefits, and Infrastructure
Feature |
Benefits |
Supporting Infrastructure |
Improved information flow Ability to expose internal functionality Organizational flexibility |
|
|
Lower software development and management costs |
Service repository |
|
Configuration flexibility |
Messaging program |
|
Business intelligence Performance measurement Security attack detection |
Activity monitor |
|
Application of management policy Application of security policy |
PDPs and PEPs |
|
Data translation |
Data translator |
|
Data confidentiality and integrity |
Encryption engine |
|
Simplification of software structure Ability to adapt quickly to different external environments Improved manageability and security |
Event processor |
|
Ability to develop new function combinations rapidly |
Composition engine |
|
Ability to optimize performance, functionality, and cost Easier introduction of system upgrades |
Service registry |
|
Ability to integrate existing assets |
|
|
Improved reliability Ability to scale operations to meet different demand levels |
|
|
Ability to develop new functions rapidly |
Model-implementation environment |
Service is the essential concept of SOA.
It is not originally a technical concept. The idea of a service was developed in the world of business. Look in any “Yellow Pages” directory, and you will find categories such as “courier services”, “garage services”, and “roofing services”. For each of these, some person or company (the service provider) is offering to do something – carry goods and messages, look after vehicles, install and repair building roofs – that will benefit other people or companies (the service consumers). The providers offer to contract with the consumers to do these things, so that the consumers know in advance what they will get for their money.
The idea has been adopted by technologists. They have established the concept of a software service. A software service is performed by a software program. It produces effects that have value to the people or organizations that are its consumers. It has a provider – a person or organization that takes responsibility for running the program to produce those effects. And there is an implicit or explicit contract between the provider and the consumers that the program will produce the effects that the consumers expect.
Software services can be provided over the Internet and the world-wide web. In some countries, for example, the government provides a service by which taxpayers can complete and submit their tax returns via the web. Here, the service has a human interface. Services provided over the web can also have software interfaces. For example, there are commercially-available web services that provide real-time stock quote information in a form where it can be analyzed by the consumers’ software. Software services can similarly be provided over enterprises’ internal networks, and a service performed by one program can be used by another program running on the same computer system. It is the organization of an enterprise’s software as software services that are provided internally in this way, and also externally, that is the essential characteristic of SOA.
The use of services provides major benefits:
The service concept also makes possible further features of SOA. These can provide additional benefits, as explained in the rest of this section.
Clear service descriptions are a starting point for service re-use, which can provide another major benefit of SOA:
You can have an SOA in which software services invoke each other directly; for example, by programming-language function calls. But, in many SOAs, the software services always invoke each other by exchanging messages, even where they are executing on the same processor. This might seem to be an additional overhead but, if the services are loosely-coupled (as they should be), then the number of message exchanges is relatively small, and the overhead is reasonably low.
Consistent use of messaging provides a key benefit:
Having a central mechanism by which all messages are exchanged facilitates monitoring, control, transformation, and security of messages.
Message monitoring can provide three key benefits:
Message control can provide:
Message transformation can provide:
Data conversion by specially-written software is expensive. The use of generic data translators can bring significant cost saving.
Message security can include:
Security is a complex area that is of crucial importance to enterprises. The ability to encrypt and apply integrity checking to messages in transit can be a valuable component of an overall security strategy.
As well as being invoked by their consumers, services can respond to events from other sources. For example, a financial information service might respond to stock-price changes, or a manufacturing production-control service might respond to production process events, such as changes in temperature of the materials being processed.
In many cases, action is taken when a pattern of events is recognized, rather in response to individual events. A financial information service might notify the user when a volume of trades is exceeded rather than in response to a single trade. A production-control service might take measurements from a number of sensors and take action when the average exceeds a limit. This aggregation of simple events to generate complex events is known as Complex Event Processing (CEP).
In SOA, CEP is often used, not only for external events, but also to detect patterns in the flow of messages between services. When used in this way, it becomes an extension of message monitoring.
CEP is often linked with business activity monitoring. For example, detection of a particular pattern in sales transaction messages could provide advance warning of difficulties for the production process. In some industries, such as banking, detection of particular patterns may indicate fraudulent activity, or assist with regulatory compliance.
CEP can also be used with performance measurement and security attack detection. For example, where a service contract specifies an average level of performance, CEP used in conjunction with performance measurement could generate contract exception events. CEP might also be used to generate security events for unusual message volumes or patterns.
CEP provides the following benefits:
Service composition is the putting together of a number of simple services to make a more complex one. For example, a “product sale” web service could be composed of simpler “product selection”, “shopping cart review”, “payment method selection”, “credit card payment”, and “invoice payment” services. Service composition provides a key benefit:
For example, if it is decided that the product sale service should cater for a new method of payment – “Internet cash” – this can be done by developing a new “Internet cash payment” service, and including it in the composition.
So far, this sounds to be little different from other software modularization techniques, from machine-code subroutines through to Java objects. Indeed, in an SOA that does not include messaging, service composition will be implemented by some such technique. But in many SOAs composition is implemented by services sending messages to invoke other services, and this technique gives much greater flexibility.
Two styles of composition are often distinguished:
When a program uses a software service, the identity of that service can be explicitly given in the program code. For example, where services are implemented as Java objects, their methods can be invoked by name by user programs. Where messaging is used, the destinations of the messages can be explicitly named at programming time. This is called hard-wiring of service connections.
Hard-wiring is a simple approach, but it has limitations. A different and much more flexible approach is service discovery. In this approach, the identity of the target service is not known at programming time, but is discovered at run time. The user program finds target services that meet its requirements, and chooses one of them.
The benefits of service discovery are:
The IT assets of an enterprise can often be considered as actors that perform services. A CPU performs an information processing service; a filestore performs an information storage service; and so on. This includes software as well as hardware assets. A database management system performs a database management service; an accounts package performs a financial information processing service.
An important feature of SOA is the recognition that these assets perform services, and the development of software façades that provide access to these assets and have interfaces that are in the same form as the interfaces to other software services of the enterprise. This is called asset wrapping. From a component-based software engineering point of view, the assets and the façade are components that are assembled to form a software service. The software services formed in this way can be used in service composition, have registry entries, and be dynamically discovered, in the same way as other services.
When an enterprise adopts an SOA, asset wrapping is typically applied to existing application software packages. This provides a significant benefit:
With the advent of SOA, some application vendors have begun to offer versions of their products in which the product capabilities are exposed as services. The acquisition of such a version is clearly a convenient way for an enterprise to achieve the “wrapping” of an application asset.
A façade can present to the consumer a virtual asset that does not correspond to the real underlying assets. This technique is called virtualization. Virtualization can be used to enable programs that were written to use one asset to be executed with a different asset. For example, there are so-called “hypervisors” that can provide different operating system environments to programs running on a single CPU. But in the context of SOA it is more commonly used to create virtual assets that are functionally similar to the underlying assets. This can deliver two benefits:
These benefits are particularly important when the principles of SOA are applied to enterprise infrastructure. While SOA is most commonly thought of as a way of architecting an enterprise’s application software, it can also be used at the infrastructure level, to create a Service-Oriented Infrastructure (SOI). Taken to the limit, this can provide a form of grid computing. The use of virtual assets that are made available over the Internet has become known as cloud computing.
Model-driven implementation refers to the automatic realization of a system or application from an abstract model. Where the model starts at a high level of architectural abstraction, it is usually referred to as Model-Driven Architecture (MDA).
SOA lends itself particularly well to model-driven implementation, because it is based on a high-level software module concept (the service) for which there are good definition and interface standards.
Model-driven implementation provides:
In SOA, model-driven implementation can be applied to service compositions as well as to software services.