This action might not be possible to undo. Are you sure you want to continue?
Subject Incharge Pratidnya S. Hegde Patil
Service-Oriented Architecture (SOA): Concepts, Technology, and Design by Thomas Erl
Service Oriented Architecture (SOA) For Dummies, 2nd Edition by Judith Hurwitz, Robin Bloor, Marcia Kaufman, Fern Halper Service-Oriented Architecture: A Field Guide to Integrating XML and Web Services (The Prentice Hall Service-Oriented Computing Series from Thomas Erl) by Thomas Erl SOA Using Java Web Services by Mark D. Hansen
A CD Player Example
Take a CD for instance. If you want to play it, you put your CD into a CD player and the player plays it for you. The CD player offers a CD playing service. Which is nice because you can replace one CD player with another. You can play the same CD on a portable player or on your expensive stereo. They both offer the same CD playing service, but the quality of service is different.
Put Another Way
How would you rather pay the bill for your paper delivery? The paperboy comes to the door, demands $2 for that week's paper. Do you... 1) Tell the paper boy where your wallet is, turn around to let the paperboy get your wallet out of your back pocket, he pulls $2 out of your wallet, closes it, puts it back in your pocket. OR 2) Give him $2. -Source, IEEE
What Does that Mean?
SOA is built on loose-coupling. How do you do that? Tell objects what to do, don't ask them for their state! Clients want the $2--the paper boy doesn't care if it's in your cookie jar or your wallet or in a check or quarters or a $2 bill or 2 singles Systems are the same--objects are microcosms of systems! Queries must be free of side effects: Either Command OR Query--not both! Decoupling is a Good Thing! 5
Focus on the Business– Process and Services
Business process layer
Services interface layer
orchestration service layer business service layer application service layer
Source: Service-Oriented Architecture, Thomas Erl
Foreign currency exchange. deposits. The services implemented by the IT systems must match and support the services provided by the tellers. 7 Several tellers may offer the same set of services to provide load balancing and high availability. Behind the counter are the IT systems that automate the bank’s services. Typical services include: Account management (opening and closing accounts). What happens behind the counter does not matter to the customer. 8 4 . and transfers. and some tellers may be specifically trained to provide certain types of services to the customer. Processing a complex transaction may require the customer to visit several tellers and therefore implement a business process flow. The services are provided to the customer via the tellers. as long as the service is completed. accepting payments). inquiries about terms and conditions. Different tellers may offer different services.What are Services? Bank tellers provide services to bank customers. Loans (application processing. Withdrawals.
ATMs. or Web users from their PCs. tellers on the office network. it’s the service that’s important. The implementation environments for the services don’t matter. and over the Web. The same service can be accessed from customers at the ATM. The services are designed and deployed to match the services that customers need. Two or more services can easily be combined to create another service. 9 10 5 .A consistent approach to defining services on the IT systems that align with business functions and processes makes it easier for the IT systems to support the goals of the business and adapt more easily to providing the same service through humans.
” 12 6 . or application logic. as shared. or consumers. “SOA is a conceptual business architecture where business functionality.Services (SO of SOA) The enterprise architecture perspective should be focused on the business needs in order to make sure IT serves the business and not vice versa. and are invoked by messages. 11 Business View . Deploying services in the context of an SOA makes it easier to compose services into simple as well as complex applications. is made available to SOA users. which can also be exposed as services that can be accessed by humans and IT systems alike. reusable services on an IT network. “Services” in an SOA are modules of business or application functionality with exposed interfaces.Conclusion of the bank example The definition of software services aligns with the business services that a bank offers to ensure smooth business operations and to help realize strategic goals such as providing ATM and Web access to banking services in addition to providing them in the branch office.
Services expose their capabilities through message interfaces. SOA definitions mention the basic communication pattern for SOA is request/reply but many definitions also talk about asynchronous communications as well.Architecture (A of SOA) SOA is commonly thought of as an architecture or an architecture style that builds on loosely coupled. interoperable and composable components or software agents called services. The goal of SOA is to increase the alignment between business and IT and achieve business agility – the ability to respond to changes quickly and efficiency. 14 7 . Followed by defining services to represent these “areas”. Services have well-defined interfaces based standard protocols (usually web-services but most definitions mention that it is not the only possible implementation) as well as QoS attributes (or policies) on how these interfaces can be used by Service Consumers.In a NutShell From the business point of view SOA is : About analyzing the business to identify business areas and business processes. 13 Technical View . The services can then be choreographed or orchestrated to realize the business processes.
Thus. Whereas in SOA business services (i. employees. Whereas service orientation lets you focus on the description of the business problem and services are developed better which aligns them with solving business problems. They're also built without making any assumptions of who will use or consume these services.e. and other organizations) are the key organizing principle used to align IT systems with the needs of the business. partners. These services have well-defined interfaces that encapsulate the key rules for accessing the services. Loose coupling promotes flexibility in changing the service implementation without impacting the service consumers. the services that an organization provides to clients. J2EE. resulting in systems that were often tied to the features and functions of a particular execution environment technology such as CICS. IMS.Loose coupling manifests itself in the SOA paradigm as follows: It helps to have an abstraction layer between the service producers and service consumers. In the SOA approach. Previous approaches require you to focus more on the use of a specific execution environment technology. functionality is organized as a set of modular. CORBA. and message orientation to solve these business problems. reusable shared services. customers. 15 Earlier Approaches vs SOA Earlier approaches to building IT systems tended to directly use specific implementation environments such as object orientation. procedure orientation. 16 8 . they are loosely coupled to the consumer of these services.. and COM/DCOM. citizens.
as represented by the description. these functions might be performed by reusable code libraries or class libraries that are loaded or linked into new applications. In SOA-based applications. When new applications can be assembled out of a collection of existing. Whereas in SOA due to separating the service interface from the execution technology. ZIP Code validation. maintenance. 17 Earlier Approaches vs SOA The real value of SOA comes from the later stages of deployment. and auditing are instead implemented using services. common functions such as these. allows IT departments to choose the best execution environment for each job (whether it’s a new or existing application) and tying them together using a consistent architectural approach. reusable services. as well as typical system functions such as security checks. but it also reduces the management. the lowest cost and fastest time to results and best ROI). when new applications can be developed entirely. the best value for effort can be realized (that is. Using services not only reduces the amount of deployed code. more so than the capabilities of any individual product or software technology chosen to execute the description. transaction coordination. In a pre service oriented development environment. or credit checking. 18 9 . It’s easy to understand the benefit of reusing common business services such as customer name lookup. and support burden by centralizing the deployed code and managing access to it. or almost entirely. by composing existing services. Separating the service description from its technology implementation in SOA means that businesses can think about and plan IT investments around the realization of operational business considerations.Earlier Approaches vs SOA Previous implementations of SOA were based on a single execution environment technology.
Each service expose processes and behavior through contracts. which are composed of messages at discoverable addresses called endpoints.Service-Oriented Systems Require a Different Development Approach 19 Defined (SOA) Service Oriented Architecture as an architectural style for building systems based on interacting coarse grained autonomous components called services. The Service’s behavior is governed by policies which are set externally to the service itself. 20 10 .
and manifest self healing properties. Autonomy means the services should be self-sufficient. Service should satisfy autonomy.SOA Components 21 Service The central pillar of SOA is the service.” Characteristics : A Service should provide a high cohesion and distinct function. A Service should implement at least all the functionality promised by the contracts it exposes. 22 11 . “A facility supplying some public demand. at least to some extent. Services should be coarse grained pieces of logic.
Characteristics : The contract can be unilateral. A specific contract can be exposed at a specific endpoint. 24 12 . 23 Endpoint The Endpoint is an address. that is. A contract might also be multilateral or bilateral. a specific place where the service can be found and consumed. The contract can be considered the interface of the Service akin to interfaces of object in object oriented languages. meaning a closed set of messages the service chooses to provide. between a predefined group of parties.Contract The collection of all the messages supported by the Service is collectively known as the service's contract. a URI.
26 13 . Policy represents the conditions for the semantic specification availability for service consumers. Id etc. Ex : http GET messages (part of the REST style) .g. 25 Policy Policy separates dynamic specification from static/semantic specification. Has a header and body.Message Unit of communication in SOA. correlated messages pattern) or handle security better (see Firewall pattern).SOAP messages. auditing. authentication. The Policy specify dynamic properties like security (encryption.) . The existence of the header allows for infrastructure components to route reply messages (e. SLA etc. JMS messages and even SMTP messages are all valid message forms. The unique aspects of policy are that it can be updated in run-time and that it is externalized from the business logic.
Service Consumer A service consumer is any software that interacts with a service by exchanging messages with the service. composable components. 28 14 . Consumers can be either client applications or other “neighboring” services their only requirement is that they bind to an SOA contract. 27 Emphasis on Interface SOA has a total of four different components that deal with the interface : messages which are the parts of the interface. contract which is the collection of the messages. endpoint where the contract is delivered and policy which governs the behavior of the endpoint. The focus on interfaces is what gives SOA the ability to create loose coupling. reuse and achieve the various design goals.
message-based document exchanges. Service interface definitions are first-class artifacts. deploying and managing systems. but not exclusively. and invocation of services. An SOA infrastructure enables discovery. 29 Services 30 15 . Protocols are predominantly. Service consumers are built using functionality from available services.SOA Service-oriented architecture is a way of designing. composition. in which Services provide reusable business functionality. developing.
Services and Cost Efficiency 31 Services and Agility 32 16 .
Services and Adaptability 33 Services and Legacy Leverage 34 17 .
Service Composition Applications/service consumers are built by integrating functionality provided by services. 36 18 . Service Invocation Services are invoked and service code is executed.Components of a Service Oriented System 35 Three Basic Operations to Support ServiceOriented Systems Service Discovery Services repositories are queried for services with desired characteristics.
38 19 .Motivation for Service Oriented Architecture (SOA) Rapidly-changing business environment Ubiquity of the Internet & WWW has led to emergence of platform-independent. or services. Application-to-application messaging is used in the information exchange. Other business units can use these services in order to implement their business processes. There is an increase trend for sharing resource/data both within companies and among companies in a flexible/standardized manner. the complete value chain within the company is divided into small modular functional units. web-based technologies as the standard building blocks for enterprise integration. automated discovery and use. and an optional service directory. Companies and their sub-units should be able to easily provide services. In a service oriented approach. A service oriented architecture focuses on how services are described and organized to support the dynamic. service. 37 SOA Architecture A basic SOA architecture is composed of a service provider.
searches the service directory for one that meets the necessary criteria. in need of a certain service.SOA Architecture First the service provider creates a service and decides to expose it and publish it. Publishing is done by posting the service information on the service directory. 39 SOA Architecture • Service provider: Provider of services whose invocation contract and location are published • Service consumer: Consumer of services matching his or her business need found in a service directory • Service directory: Directory for publishing and listing available services for consumers 40 20 . On the other side. Upon finding one and using the information available on the service directory. the service requester is able to directly contact the service provider in the correct way to fulfill the business need. a service requester.
e. 42 21 .Requirements of SOA Interoperability between different systems and programming languages. and the application consuming the service can be on a different platform or language. What's key to these services is their loosely coupled nature. the service interface is independent of the implementation. Application developers or system integrators can build applications by composing one or more services without knowing the service’s underlying implementations.. (Use standards.Net or J2EE. i. platform independent) Clear and unambiguous description language Retrieval of the service Security 41 What is SOA? Service-oriented architecture (SOA) is an evolution of distributed computing based on the request/reply design paradigm for synchronous and asynchronous applications. For example. a service can be implemented either in . An application's business logic or individual functions are modularized and presented as services for consumer/client applications.
reliable messaging. Applications can look up the services in the registry and invoke the service. Each SOA service has a quality of service (QoS) associated with it. Communication among consumers and providers or services typically happens in heterogeneous environments.NET CRM JAVA KMS System (Platform) 43 Characteristics SOA services have self-describing interfaces in platform-independent XML documents. and Integration (UDDI) is the standard used for service registry. with little or no knowledge about the provider. Enterprise Portal etc Application Frontend Business Process L J K A B C D E F G H I Services Software Component . and policies regarding who can 44 invoke services. such as authentication and authorization. SOA services communicate with messages formally defined via XML Schema (also called XSD). Some of the key QoS elements are security requirements. Universal Description. SOA services are maintained in the enterprise by a registry that acts as a directory listing.What is SOA? Conceptual view of SOA Web Client. Web Services Description Language (WSDL) is the standard used to describe the services. Messages between services can be viewed as key business documents processed in an enterprise. 22 . Rich Client. Definition.
Provides the option to make the services consumable across different channels. and application infrastructure. support new channels of interactions with customers.Why SOA? The reality in IT enterprises is that infrastructure is heterogeneous across operating systems. leverage existing investments in applications and application infrastructure to address newer business requirements. system software. Enterprises should quickly respond to business changes with agility. and exposes the existing enterprise and legacy applications as services. partners. so starting from scratch to build new infrastructure isn't an option. thereby safeguarding existing IT infrastructure investments. Some existing applications are used to run current business processes. applications. and suppliers. 46 23 . and feature an architecture that supports entire business. 45 Why SOA? SOA with its loosely coupled nature allows enterprises to plug in new services or upgrade existing services in a granular fashion to address the new business requirements.
To implement SOA. better addresses the regulatory requirements like Sarbanes Oxley (SOX). the architecture offers enterprises the flexibility of having agile business processes. A typical SOA infrastructure To run and manage SOA applications. enterprises need an SOA infrastructure that is part of the SOA platform. In addition. This service architecture can provide a business rules engine that allows business rules to be incorporated in a service or across services. These messages are typically transformed and routed by a service bus to an appropriate service implementation. enterprises need a service architecture Several service consumers can invoke services by sending messages. billing. An SOA infrastructure must support all the relevant standards and required runtime containers. and logging. 48 24 . and changes individual 47 services without affecting other services. The service architecture also provides a service management infrastructure that manages services and activities like auditing.
bring a mature and proven infrastructure for scalability. alternative technologies accomplish other types of bindings for a service. used for interacting with the UDDI registries in a standard manner. provided by the Web services Interoperability Organization. SOA is not by any means limited to these platforms. and invoke the service using SOAP. A consumer can search for a service in the UDDI registry.Net platforms are the dominant development platforms for SOA applications. Platforms such as J2EE not only provide the framework for developers to naturally participate in the SOA. UDDI WSDL. WSDL is used to describe the service. get the WSDL for the service that has the description. and SOAP are the fundamental pieces of the SOA infrastructure. UDDI. while simultaneously interoperating with services across other platforms such as . used for mapping XML documents to Java classes. but also. as a transport layer to send messages between service consumer and service provider.Net Though the J2EE and . availability. Service providers can use the Basic Profile test suites to test a service's interoperability across different platforms and technologies. to register and look up the services.4 facilitate the development and deployment of Web services that are portable across standard J2EE containers. 49 J2EE and .Net. reliability. Newer specifications such as Java API for XML Binding (JAXB). used for invoking remote services in J2EE 1. and SOAP. 50 25 . UDDI. and Java API for XML-based Remote Procedure Call (XML-RPC).SOAP. While SOAP is the default mechanism for Web services. WSDL. Java API for XML Registry (JAXR). is turning into another core piece required for service testing and interoperability. by their inherent nature. and performance to the SOA world. WS-I Basic Profile WS-I Basic Profile.
and acknowledgment become important in mission-critical systems using service architecture. such as Security Assertion Markup Language (SAML). Integrating applications means that the process requirements. must be standardized. duplicate message elimination. a service provider may require a Kerberos security token for accessing the service. 51 Policy Service providers sometimes require service consumers to communicate with certain policies. As mentioned previously. a management infrastructure that lets the system administrators manage the services running in a heterogeneous environment becomes important. A policy may consist of multiple assertions. Web Services Security is an ongoing OASIS effort. The attractive thing about this specification is it leverages existing security standards. guaranteed message delivery. data transformation. several documents are exchanged between service consumers and service providers. and transactions. which are OASIS efforts as well. Other QoS attributes such as coordination between partners and transactions involving multiple services are being addressed in the WS-Coordination and WS-Transaction specifications. SOAP. Both these standards are now part of OASIS. applications.Quality of services Existing mission-critical systems in enterprises address advanced requirements such as security. Delivery of messages with characteristics like once-and-only-once delivery. Security The Web Services Security specification addresses message security. As an example. WSBPEL is now part of OASIS. Orchestration As enterprises embark on service architecture. atmost-once delivery. Management As the number of services and business processes exposed as services grow in the enterprise. basic Web services specifications like WSDL. Sections below discuss some of the QoS artifacts and related standards. 52 26 . WS-Policy standardizes how policies are to be communicated between service consumers and service providers. WSReliability and WS-ReliableMessaging are two standards that address the issues of reliable messaging. These requirements are defined as policy assertions. and components. services can be used to integrate silos of data. such as asynchronous communication. This specification focuses on credential exchange. and compensation. As enterprises start adopting service architecture as a vehicle for developing and deploying applications. Reliability In a typical SOA environment. Web Services for Distributed Management (WSDM) will specify that any service implemented according to WSDM will be manageable by a WSDM-compliant management solution. these requirements are also known as quality of services. respectively. and UDDI aren't going to fulfill these advanced requirements. Numerous specifications related to QoS are being worked out in standards bodies like the World Wide Web Consortium (W3C) and the Organization for the Advancement of Structured Information Standards (OASIS). and allows the usage of these standards to secure Web services messages. message integrity. and message confidentiality. parallel processing. where business processes are created using a set of discrete services. BPEL4WS or WSBPEL (Web Services Business Process Execution Language) is an OASIS specification that addresses service orchestration. reliability.
The benefit of implementing SOA with Web services is that you achieve a platform-neutral approach to accessing services and better interoperability as more and more vendors support more and more Web services specifications. In an April 2003 Gartner report. 53 Role of Web Services in SOA Enforce standards and. which speeds the implementation of SOA. Yefim V. Natis makes the distinction as follows: “Web services are about technology specifications. making SOA relatively easy to adopt. Are cross-platform and cross-language. Web services is one of the ways you can implement SOA. “Web services WSDL is an SOA-suitable interface definition standard: this is where Web services and SOA fundamentally connect.SOA is not Web Services There seems to be general confusion about the relationship between SOA and Web services. SOA is an architectural pattern. thus. Are widely supported.” Notably. Web Service is one of the ways to implement SOA.” Fundamentally. 54 27 . while Web services are services implemented using a set of standards. promote compatibility and portability. Provide faster tooling support. whereas SOA is a software design principle. Are message-oriented.
Finally. SOA enables changes to applications while keeping clients or service consumers isolated from evolutionary changes that happen in the service implementation. SOA enables upgrading individual services or services consumers. Division of responsibility—The ability to more easily allow business people to concentrate on business issues.Benefits of SOA Service-oriented development provides the following benefits: Reuse—The ability to create services that are reusable in multiple applications. Efficiency—The ability to quickly and easily create new services and new applications using a combination of new and old services. 55 Benefits of SOA While the SOA concept is fundamentally not new. Loose technology coupling—The ability to model services independently of their execution environment and create messages that can be sent to any service. SOA differs from existing distributed technologies in that most vendors accept it and have an application or platform suite that enables SOA. with a ubiquitous set of standards. SOA provides enterprises better flexibility in building applications and business processes in an agile manner by leveraging existing 56 application infrastructure to compose new services. SOA. brings better reusability of existing assets or investments in the enterprise and lets you create applications that can be built on top of new and existing applications. along with the ability to focus on the data to be shared rather than the implementation underneath. it is not necessary to completely rewrite an application or keep an existing system that no longer addresses the new business requirements. 28 . and for both groups to collaborate using the service contract. technical people to concentrate on technology issues.
At the base of its roles. it represents the backbone and infrastructure capable of connecting service providers and service consumers.Role of ESB in SOA An ESB plays an important role in an SOA. 57 Role of ESB in SOA Provides an integration infrastructure consistent with the principles of SOA: Enforces the use of explicit implementationindependent interfaces to define services with loose coupling Uses communication protocols that stress location transparency and interoperability Promotes the definition of services that encapsulate reusable business functionalities Provides the means to manage the service infrastructure 58 29 .
Role of ESB in SOA Operates in the distributed. heterogeneous environment because it: Supports synchronous and asynchronous communication Uses standard interfaces and standard protocols Centralizes control and distributes processing Supports mediation to formulate the request/response as needed between different parties without the need of change in any Applies security and QoS to the SOA project 59 30 .
This action might not be possible to undo. Are you sure you want to continue?