Service Abstraction
   HOME

TheInfoList



OR:

Service abstraction is a design principle that is applied within the
service-orientation Service-orientation is a design paradigm for computer software in the form of services. The principles of service-oriented design stress the separation of concerns in the software. Applying service-orientation results in units of software partiti ...
design paradigm A design is a plan or specification for the construction of an object or system or for the implementation of an activity or process or the result of that plan or specification in the form of a prototype, product, or process. The verb ''to design' ...
so that the information published in a service contract is limited to what is required to effectively utilize the service
or
medium Medium may refer to: Science and technology Aviation * Medium bomber, a class of war plane * Tecma Medium, a French hang glider design Communication * Media (communication), tools used to store and deliver information or data * Medium ...
should be made available to the service consumers other than the service contract that contains additional service related information.


Purpose

A service contract that contains details about what it encapsulates (e.g., the logic, implementation and the technology used to build the service) may end up being used in a particular manner by providing the service consumer more knowledge about the working of the service. In the case of service-orientation, more knowledge is not necessarily better. There is a chance that additional information could impede the reusability of the service as the service consumer designer may streamline his design based on this knowledge. However, doing so would affect the evolution of the service contract as now the service consumer is indirectly coupled to the service implementation, which may need to be replaced in the future. This increases the consumer-to-contract type of coupling, which is a positive type of coupling. However, having too much dependence can negatively impact the evolution of both the service provider and the service consumer.
Information hiding In computer science, information hiding is the principle of segregation of the ''design decisions'' in a computer program that are most likely to change, thus protecting other parts of the program from extensive modification if the design decisio ...
remains one of the key principles within object-oriented paradigm that promotes abstracting away the inner workings of a
software program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
. A classic example would be the use of
abstract class In programming languages, an abstract type is a type in a nominative type system that cannot be instantiated directly; a type that is not abstract – which ''can'' be instantiated – is called a ''concrete type''. Every instance of an abstra ...
es to hide the actual method logic. The same concept is applied by the service abstraction principle in order to hide the unnecessary details about the working of the service with a view to ease the evolution of the service.Dennis Wisnosk
Principles and Patterns at the U.S. Department of Defense
Online].Date accessed: 13 April 2010.


Application

The application of this design principle requires looking into four different types of abstractions that could be applied to a service.


Functional abstraction

This form of abstraction is dependent upon how much of the service logic is exposed as service capabilities. An example would be of a class whereby some of its methods are private while others are public. A class would only expose those methods as public that it deems to be important to its objects, any helper methods that are not relevant to the objects are kept hidden. A service contract which has not been subjected to this principle could be termed as a 'detailed contract' that reveals much of business rules and the validation logic. Once this principle has been applied to a fair degree, the contract could be termed as a ‘concise contract’. Further application of this design principle would result in a 'optimized contract' that maximizes the reuse potential of the service.


Technology information abstraction

Any information about the underlying technology used within the service would result in a low technology information abstraction as the service contract explicitly tells the service consumers how the service logic and its implementation are designed. This extra information might result in service consumers being designed in a way that specifically targets that particular implementation, thereby developing Service Loose Coupling#Consumer-to-implementation, consumer-to-implementation coupling.


Logic abstraction

The programmatic details about the service logic need to be abstractedKjell-Sverre Jerijærv
SOA Contract Maturity Model
Online].Date accessed: 13 April 2010.
as knowledge about how the service actually performs its functionality can result in service consumers that factor in this information and are consequently designed under these assumptions. This can seriously hamper service logic refactoring efforts and can be considered as an anti-pattern towards the application of the service refactoring design pattern.


Quality abstraction

Quality abstraction relates to the details provided within the service’s accompanying service level agreement. It is important to concentrate only on that kind of information that would actually help in determining the reliability and availability of the service, no other information should be included that exposes unnecessary details e.g. details about how does a service sit within the overall business process and which other services it uses for fulfilling its functionality. The level of access control applied to a service would decide how much of technology, logic and
quality of service Quality of service (QoS) is the description or measurement of the overall performance of a service, such as a telephony or computer network, or a cloud computing service, particularly the performance seen by the users of the network. To quantitat ...
abstractions are in place. An 'open access' would provide free access to everyone that is interested in finding out the design specifications of a service. In a 'controlled access', only authorized people are granted access and a 'no access' policy would totally deny any access to the design documents.


Considerations

Although information hiding is considered a healthy practice, however, too much of information hiding could be counter productive as it can limit the re-usability level of the service. This can also result in redundant services as service designers don’t have enough information about the capabilities of the service. For this, each service contract needs to be designed in a concise yet comprehensive manner so that the service’s capabilities can be effectively discovered and interpreted as dictated by the service discoverability principle. The kind of information exposed in the service contract can lead to some security related concerns as well. for example, a service that propagates the details about the
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases sp ...
in use as result of an internal error can fall a victim to an attack where the attacker makes use of the reported error details and attempts to connect to the database. This could be addressed by the application of the message screeningException Shielding
/ref>
design patterns ''Design Patterns: Elements of Reusable Object-Oriented Software'' (1994) is a software engineering book describing software design patterns. The book was written by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, with a foreword ...
.


References

{{Reflist


Further reading

* Mauro. et al
Service Oriented Device Integration - An Analysis of SOA Design Patterns.
nline pp. 1–10, 2010 43rd Hawaii International Conference on System Sciences, 2010. Date accessed: 8 April 2010. *
Thomas Erl Thomas Erl (born 1967) is a Canadian author, and public speaker known for major contributions to the field of service-oriented architecture. Author of eight books on Service Orientation, Erl defined eight widely accepted principles of service ...
br>Service-Orientation and Object-Orientation Part II:A Comparison of Design Principles
Online]. Date accessed: 13 April 2010. * Tost. et a
Guidelines for Using Web Service Contract Technologies
Online].Date accessed: 13 April 2010. * Pekka Alh
Application of New Automation Software Design and Integration Technologies in Teaching
Online]. Date accessed: 13 April 2010.


External links


SOA Concepts

SOA Terms Glossary
Service-oriented (business computing)