CSC/ECE 517 Fall 2010/ch6 6j ss: Difference between revisions
Line 1: | Line 1: | ||
== Service-Oriented Architecture | {| class="wikitable" style="width: 200px; height: 200px;" | ||
|'''Service-Oriented Architecture''' | |||
}| | |||
A few years ago, it was realized that eventually software capabilities are going to be delivered and consumed as services. Implementing them as tightly coupled systems was definitely an option, but, a service-based interface was required between the point of usage to the portal, device or another end-point. Thus, there was the need of a service-oriented architecture that would facilitate the management of delivery, acquisition, consumption etc in terms of services that are related. This hinted at changes in how software life cycle is managed —right from requirements specifications as services, designing these services, acquisition and outsourcing in the form of services, asset management of services, and so on. Thus, after moving from modules to objects, to components, now was the time to move to services. | A few years ago, it was realized that eventually software capabilities are going to be delivered and consumed as services. Implementing them as tightly coupled systems was definitely an option, but, a service-based interface was required between the point of usage to the portal, device or another end-point. Thus, there was the need of a service-oriented architecture that would facilitate the management of delivery, acquisition, consumption etc in terms of services that are related. This hinted at changes in how software life cycle is managed —right from requirements specifications as services, designing these services, acquisition and outsourcing in the form of services, asset management of services, and so on. Thus, after moving from modules to objects, to components, now was the time to move to services. |
Revision as of 00:04, 18 November 2010
Service-Oriented Architecture
}| A few years ago, it was realized that eventually software capabilities are going to be delivered and consumed as services. Implementing them as tightly coupled systems was definitely an option, but, a service-based interface was required between the point of usage to the portal, device or another end-point. Thus, there was the need of a service-oriented architecture that would facilitate the management of delivery, acquisition, consumption etc in terms of services that are related. This hinted at changes in how software life cycle is managed —right from requirements specifications as services, designing these services, acquisition and outsourcing in the form of services, asset management of services, and so on. Thus, after moving from modules to objects, to components, now was the time to move to services. This wiki chapter aims at providing an introduction to the vast and growing field of Service Oriented Architecture. The chapter also discusses the different design patterns[1] currently in practice for the field of Service-Oriented Architecture. The utilization of the concepts of coupling[2] and cohesion[3] in Service-Oriented Architecture are described. SOA is contrasted with a similar concept called Enterprise Architecture. IntroductionService-oriented architecture (SOA) is a collection or set of services communicating with each other. Two or more services can communicate either via a simple data passing system or could be coordinating on some activity. For these kind of communications to be possible between the services, some means to connect the various services is required. Service-oriented architectures were existing in the past and are not a new thing. Many people are familiar with the use of DCOM [4] or Object Request Brokers (ORBs) [5] which are based on the CORBA[6] specification.These are the first service-oriented architectures deployed for practical applications. The following section gives a brief description about the evolution of SOA: Evolution of SOAIn many respects, SOA is an evolution based on the component-based development (CBD). It, in fact, is a quantum leap in bringing business and information technology into closer alignment by supporting business processes. The SOA services are made visible to the consumer, but, the underlying components are kept transparent. The Internet and XML standardization efforts demanded a service definition and description published by a service provider (SP) that could be located and invoked by a service consumer (SC). The service description can be implemented by different service providers, each offering various choices of qualities of service (QoS). The invocation can be across Internet or intranet in a distributed object connotation and standards such as WSDL[7] and SOAP[8] have been created. The roles of SC and SP are illustrated in the following figure: TerminologiesServicesA service is a specific function (business function). For instance, analyzing an individual's credit history or processing a purchase order. It can either provide a single discrete function, such as converting one type of currency into another, or it can perform a set of related business functions, such as handling the various operations in an airline reservations system. Services performing a related set of business functions are said to be coarse grained. Multiple services work in a coordinated way. This aggregated service can be used for a more complex business requirement. ConnectionsWeb services is the most likely connection technology of SOAs. Web services essentially use XML to create a robust connection. A web service can be defined as a service that communicates with clients through a set of standard protocols and technologies. These are standardized and are implemented in platforms and products from various vendors, giving clients and services an opportunity to communicate in a consistent way across a wide spectrum of platforms and operating environments. The important concept is service. Web Services are the set of protocols by which Services are discovered, published and put to use in a technology neutral, standard form. Service Oriented ArchitectureOften is the case that one person's needs being met by capabilities offered by someone else. In the world of distributed computing, this scenario can be thought of one computer agent’s requirements being met by a computer agent belonging to a different owner. A one-to-one correlation is not not necessarily needed between these needs and capabilities. SOA is a view of architecture focusing on services as the action boundaries between the needs and capabilities in order to service discovery and re-purposing. Thus, Service Oriented Architecture (SOA) can be defined as a paradigm for organizing and utilizing distributed capabilities that may be in different ownership domains and implemented using various technology stacks. SOA is not only an architecture of services (seen from a technology perspective). It includes the policies, practices, and frameworks to ensure the right services are provided and consumed.
ExampleThis example depicts how an information system scenario could benefit from a migration to SOA. Consider an organization that has an application using three business processes using the same functionality.
This system can be made efficient if common tasks are shared across all three processes. This requires decoupling the functionality from each process or application and making a standalone authentication and user management application that could be accessed as a service. Thus, the service itself is being repurposed, and, applications and the company owning it can now have a central point for maintaining it. This shows a simple example of Service Oriented Architecture in practice. The following diagram depicts the same:
DiscussionBenefits of SOAThe following are the primary reasons which encourages an enterprise to take SOA approach:
It should be noted that SOA doesn't provide the bebefits mentioned below:
Challenges
SOA PrinciplesThere is a set of 10 principles for SOA. The first four are based on Don Box's four tenets. These principles are as listed below:
Design Patterns in SOADesign Patterns describe common problems with their solutions that can be applied repeatedly under a set of constraints. The collection of SOA design patterns forms a master pattern language applicable in various combination and sequences. Compound patterns comprising of multiple individual patterns is also possible. SOA has a huge number of design patterns which can be divided into the following categories:
A more elaborate list and description of these patterns is available at SOA website[10]. As it can be seen, the SOA design pattern catalog is very broad. These patterns provide design techniques ranging from adjusting minute validation logic in a service contract to design strategies and help structure pools of services across an entire enterprise. An SOA initiative requires attention to the various design details associated with every service delivered, while not loosing the big picture. Design patterns help maintaining this balance by helping overcome common obstacles that have historically inhibited or derailed SOA project plans. Working with SOA patternsHere are a few guidelines for utilizing the SOA design patterns to their maximum extent:
Coupling in SOACoupling specifies the degree of dependency between 2 or more modules. As we know, coupling can be classified as Loose Coupling and Tight Coupling. Loose coupling can be defined as the state in which the impact of change (change in consumers, providers, or cross-cutting policies) is minimized across dependencies. Loose coupling is important across units of deployment, whereas tight coupling is sufficient within a unit of deployment. The essence of SOA is building composite distributed systems efficiently. In order for the distributed components to be reusable, reliable, available, scalable and fault tolerant, an appropriate level of loose coupling is needed. The impact of any change or modification and failures should be minimum on the landscape of a system as a whole. Loose coupling provides this property by defining and describing interaction patterns between components and technologies involved. Loose coupling also brings the advantage of versionability in SOA. If A and B depend on each other, loose coupling is needed only when A may version independently from B. That is, if A and B are versioned together, loose coupling between them is unnecessary. Services in SOA require described interfaces. This provides a measure of loose coupling as the service dependency isn't a software to software dependency; rather it is N software to interface dependencies. This shows the importance of individual interface contracts. If an interface contract allows anything, then it has tight coupling between components. There is no one way to build useful distributed systems that are completely decoupled, rather a variety of choices have to be considered based on various aspects of the systems. A property of a system can become a trade-off compared to other properties. For example, an asynchronous service usually requires the client open up its address space for a "callback" which increases the coupling. Also, loosely couple Web Services wait for messages via queuing mechanism before taking action. A large number of such services would be required to exceed the system load. So, tight coupling them can be considered. New mechanisms to switch loosely coupled Web Services to tightly coupled Web Services to avoid system overloads of scarce resources are being considered. In summary, Loose coupling manifests itself in the SOA paradigm as follows:
Cohesion in SOACohesion is defined as the measure of the relationship between the functionality expressed aby a module and the module itself. It is contrasted with the concept of coupling. High cohesion correlates to loose coupling. Cohesion can be classified into various types. Below mentioned are the three "good" types of cohesion identified over the years:
The following are identified forms of "bad" cohesion:
In today's vernacular, low cohesion is termed as coarse-grained. "Buy a car" and "run credit history" are examples of two such coarse-grained services offered in an SOA. SOA's success requires adopting "course-grained" services that can be plug-n-played with other sources interchangeably. But it is very much possible that within coarse-grained services, such as buy a car, there may be smaller or finer-grained services like Check Inventory, Schedule Detailing, etc. that make up the larger service, buy a car. Thus SOA and high cohesion as a principle aren't incongruent with each other. High cohesion is rather the foundation of creating coarse-grained services which is the fundamental element of creating a successful SOA implementation.
Enterprise Architecture Vs SOAAn enterprise architecture (EA) is defined as a conceptual blueprint defining the structure and operation of an organization. The enterprise architecture determines how an organization can achieves its current and future objectives effectively. An enterprise architecture has the following four perspectives:
Such an EA offers the following benefits:
Both SOA and EA are used for the benefit of the organization. These two concepts are often confused. The following section discusses how these two concepts are similar, and how they differ. Similarities and Differences between SOA and EAThe different domains in SOA and EA architecture overlap. But the domains in SOA are a subset of that of EA. For instance, SOA models and develops services and the components that realize them, while the EA architecture deals with SOA-specific artifacts along with other components, packages, and systems for the whole enterprise. The following table shows the mapping between the architecture domains of SOA and EA:
The following are the similarities between SOA and EA:
While EA architecture domains focuses on the macro level, the SOA architecture domains work on a micro level. To be specific,
Role of SOA in EAAs we can see from the above section, though both SOA and EA serve the same purpose, SOA is not same as EA. Instead, SOA can play a role in most of the domains/perspectives of an EA. SOA is one of the best tools for the success of EA projects. SOA bridges EA with the solution architecture and implementation by using layered service components across business and application models, and technology implementation. SOA helps EA to overcome its challenges. Some of these challenges are as listed below:
Thus, for the smooth and efficient working of an EA, SOA should be an integral part of the EA. Service Oriented Enterprise, Service Oriented Applications/Systems and Service Oriented Infrastructure are a few examples of how SOA can be adopted in an EA. |