








































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A brief intro of service-oriented architecture.
Typology: Lecture notes
1 / 48
This page cannot be seen from the preview
Don't miss anything!









































1
Complexity is a fact of life in information technology (IT). Dealing with the complexity while building new applications, replacing existing applications, and keeping up with all the maintenance and enhancement requests represents a major challenge.
If all applications were to use a common programming interface and interoper- ability protocol, however, the job of IT would be much simpler, complexity would be reduced, and existing functionality could be more easily reused. After a common programming interface is in place, through which any application can be accessed, existing IT infrastructure can be more easily replaced and modernized.
This is the promise that service-oriented development brings to the IT world, and when deployed using a service-oriented architecture (SOA), services also
2 Introduction to SOA with Web Services
become the foundation for more easily creating a variety of new strategic solu- tions, including:
■ Rapid application integration. ■ Automated business processes. ■ Multi-channel access to applications, including fixed and mobile devices.
An SOA facilitates the composition of services across disparate pieces of soft- ware, whether old or new; departmental, enterprise-wide, or inter-enterprise; mainframe, mid-tier, PC, or mobile device, to streamline IT processes and eliminate barriers to IT environment improvements.
These composite application solutions are within reach because of the wide- spread adoption of Web services and the transformational power of an SOA. The Web Services Description Language (WSDL) has become a standard pro- gramming interface to access any application, and SOAP has become a stan- dard interoperability protocol to connect any application to any other. These two standards are a great beginning, and they are followed by many additional Web services specifications that define security, reliability, transactions, orches- tration, and metadata management to meet additional requirements for enter- prise features and qualities of service. Altogether, the Web services standards the best platform on which to build an SOA—the next-generation IT infrastructure.
Driven by the convergence of key technologies and the universal adoption of Web services, the service-oriented enterprise promises to significantly improve corporate agility, speed time-to-market for new products and services, reduce IT costs, and improve operational efficiency.
4 Introduction to SOA with Web Services
■ A deployment infrastructure on which new applications can quickly and easily be built. ■ A reusable library of services for common business and IT functions. ■ Business process management (BPM) —Methodologies and technologies for automating business operations that: ■ Explicitly describe business processes so that they are easier to under- stand, refine, and optimize. ■ Make it easier to quickly modify business processes as business requirements change. ■ Automate previously manual business processes and enforce business rules. ■ Provide real-time information and analysis on business processes for decision makers.
Individually, each of these technologies has had a profound effect on one or more aspects of business computing. When combined, they provide a compre- hensive platform for obtaining the benefits of service orientation and taking the next step in the evolution of IT systems.
Business Process Management
Service-Oriented Architecture
XML Web Services
Service-Oriented Enterprise
Figure 1-1 Trends converging to create the service-oriented enterprise.
Service-Oriented Development 5
Software vendors have widely adopted the paradigm of service-oriented devel- opment based on Web services. Service-oriented development is complemen- tary to the object-oriented, procedure-oriented, message-oriented, and database-oriented development approaches that preceded it.
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, along with the ability to focus on the data to be shared rather than the implementation underneath. ■ Loose technology coupling —The ability to model services independently of their execution environment and create messages that can be sent to any service. ■ Division of responsibility —The ability to more easily allow business peo- ple to concentrate on business issues, technical people to concentrate on technology issues, and for both groups to collaborate using the service contract.
Developing a service is different from developing an object because a service is defined by the messages it exchanges with other services, rather than a method signature. A service must be defined at a higher level of abstraction (some might say at the lowest common denominator) than an object because it’s possible to map a service definition to a procedure-oriented language such as COBOL or PL/I, or to a message queuing system such as JMS or MSMQ, as well as to an object-oriented system such as J2EE or the .NET Framework.
It’s also important to understand the granularity at which the service is to be defined. A service normally defines a coarse-grained interface that accepts more data in a single invocation than an object and consumes more computing resources than an object because of the need to map to an execution
Service-Oriented Development 7
One way to help accomplish this significant turnaround in the way we think about how to design, develop, and deploy applications using services may be to divide the responsibility within IT departments between those who:
■ Create the services —Dealing with the complexity of the underlying technology on which the service is being deployed and ensuring that the XML/Web services descriptions are what the service consumer needs and that they share the right data. ■ Consume the services —Assembling new composite applications and business process flows, ensuring that the shared data and process flows accurately reflect operational and strategic business requirements.
This potential division of responsibility more cleanly separates the technical issues from the business issues.
XML representation, provided through an XML Schema, of the data types and structures of a service allows the developer to think about the data being passed among services without necessarily having to consider the details of a given service implementation. This represents a change in the nature of the integration problem from having to figure out the implemen- tation of the service in order to talk to it. Whether the service’s execution environment is an object, message queue, or stored procedure doesn’t matter. The data is seen through the filter of a Web service, which includes a layer that maps the Web service to whatever execution environment is implementing the service.
Previously, the same individuals in the IT department were responsible for understanding both business and technical functions—and this remains a classic problem for IT, that is, getting the same person or persons to bridge business and technology domains. To gain the full benefit of Web services, continues
8 Introduction to SOA with Web Services
Service Abstraction A service is a location on the network that has a machine-readable description of the messages it receives and optionally returns. A service is therefore defined in terms of the message exchange patterns it supports. A schema for the data contained in the message is used as the main part of the contract (i.e., descrip- tion) established between a service requester and a service provider. Other items of metadata describe the network address for the service, the operations it supports, and its requirements for reliability, security, and transactionality.
Figure 1-2 illustrates the relationship among the parts of a service, including the description, the implementation, and the mapping layer between the two. The service implementation can be any execution environment for which Web services support is available. The service implementation is also called the exe- cutable agent. The executable agent is responsible for implementing the Web services processing model as defined in the various Web services specifications. The executable agent runs within the execution environment , which is typically a software system or programming language.
SOA, and BPM technologies, IT departments should consider the best orga- nization and skill set mix. It’s important when adopting a new architecture and a new technology to identify new roles and responsibilities. Among the important considerations is that technical staff must be able to reorient themselves from thinking about doing the entire job to doing a piece of the job that will be completed by someone else. A service needs to be devel- oped within a larger context than an object or a procedure because it is more likely to be reused. In fact, defining services for reuse is probably the most important part of service orientation. To obtain their highest value, ser- vices must be developed in the context of other services and used in com- bination with them to build applications. This change in thinking is likely to require someone in a departmental or corporate leadership position to help review designs and ensure that they are in line with these new IT goals.
10 Introduction to SOA with Web Services
This section introduces the major concepts and definitions for services and SOA.
What Are Services? Before we continue to discuss technology, let’s discuss the notion of services and processes from a business perspective. Most organizations (whether com- mercial or government) provide services to customers, clients, citizens, employ- ees, or partners. Let’s look at an example of service orientation in practice.
Service Requester
Newly Developed Service
Wrapped Legacy Application
Composite Service
Figure 1-3 Requesting different types of services.
Some software vendors still don’t separate the idea of a service from the idea of an execution environment, and they continue to sell Web services imple- mentations only as part of another, typically pre-existing product. This prac- tice can make it more difficult to obtain the benefits of services because the products have features that may not be required to execute Web services and that may create incompatibilities if the products make the services dependent upon them.
Service-Oriented Architecture 11
As illustrated in Figure 1-4, bank tellers provide services to bank customers. Different tellers may offer different services, and some tellers may be specifically trained to provide certain types of services to the customer. Typical services include:
■ Account management (opening and closing accounts). ■ Loans (application processing, inquiries about terms and conditions, accepting payments). ■ Withdrawals, deposits, and transfers. ■ Foreign currency exchange.
Several tellers may offer the same set of services to provide load balancing and high availability. What happens behind the counter does not matter to the cus- tomer, as long as the service is completed. Processing a complex transaction may require the customer to visit several tellers and therefore implement a business process flow.
Figure 1-4 Service analogy at the bank.
Behind the counter are the IT systems that automate the bank’s services. The services are provided to the customer via the tellers. The services implemented by the IT systems must match and support the services provided by the tellers.
Service-Oriented Architecture 13
such as providing ATM and Web access to banking services in addition to providing them in the branch office.
More complex applications can be composed from services, as we’ll see, such as processing a purchase order or an insurance claim. Deploying services in the context of an SOA makes it easier to compose services into simple as well as complex applications, which can also be exposed as services that can be ac- cessed by humans and IT systems alike.
What Is Service-Oriented Architecture? A service-oriented architecture is a style of design that guides all aspects of cre- ating and using business services throughout their lifecycle (from conception to retirement). An SOA is also a way to define and provision an IT infrastructure to allow different applications to exchange data and participate in business processes, regardless of the operating systems or programming languages under- lying those applications.
An SOA can be thought of as an approach to building IT systems in which business services (i.e., the services that an organization provides to clients, customers, citizens, partners, employees, and other organizations) are the key organizing principle used to align IT systems with the needs of the business. In contrast, earlier approaches to building IT systems tended to directly use specific implementation environments such as object orientation, procedure orientation, and message orientation to solve these business problems, resulting in systems that were often tied to the features and functions of a particular execution environment technology such as CICS, IMS, CORBA, J2EE, and COM/DCOM.
Businesses that successfully implement an SOA using Web services are likely to have a competitive advantage over those who do not because those who have services aligned with strategic IT business goals can react more quickly to changing business requirements than those who have IT systems continues
14 Introduction to SOA with Web Services
SOA is the best way to capitalize on the value of service-oriented development. Service orientation reduces project costs and improves project success rates by adapting technology more naturally to the people who need to use it, rather than focusing (as the previous generations of IT systems have) on the technol- ogy itself, which forces people to adapt to the technology. The major difference between service-oriented development and previous approaches is that service orientation lets you focus on the description of the business problem, whereas previous approaches require you to focus more on the use of a specific execu- tion environment technology. The way in which services are developed better aligns them with solving business problems than was the case with previous generations of technology.
The concept of SOA isn’t new—what is new is the ability to mix and match execution environments, clearly separating the service interface from the execu- tion technology, allowing IT departments to choose the best execution environ- ment for each job (whether it’s a new or existing application) and tying them together using a consistent architectural approach. Previous implementations of SOA were based on a single execution environment technology.
aligned to a particular execution environment. It’s easier to combine Web services, easier to change Web services compositions, and cheaper to change the Web services and XML data than it is to change execution envi- ronments. The advantages and benefits of SOA with Web services include a better return on investment for IT spending on projects, a faster time to re- sults for the projects, and an ability to more quickly respond to changing business and government requirements. Any business that can implement an IT infrastructure that allows it to change more rapidly has an advantage over a business that cannot do the same. Furthermore, the use of an SOA for integration, business process management, and multi-channel access should allow any enterprise to create a more strategic IT environment, one that more closely matches the operational characteristics of the business.
16 Introduction to SOA with Web Services
is by its very nature diverse, and SOA with Web services embraces this diversity and provides the ability to create IT systems that map better to busi- ness operations than anything previously. However, this will take a signifi- cant change in thinking, not just for IT departments, but also for the entire software industry. It’s equally hard to imagine that a single software vendor would be an expert in all aspects of software as it is to imagine that a single hardware vendor is an expert in all aspects of computing. Specialization is what the industry needs, along with the ability to create reusable assemblies of those components. In this vision of a future environment, software ven- dors are likely to become even more specialized, perhaps shipping assem- blies of services instead of complete products. In an SOA-enabled world, enterprises very likely will have to learn not only to think about services as distinct from execution environments, but also how to assemble applica- tions out of components from a variety of vendors.
The real value of SOA comes from the later stages of deployment, when new applications can be developed entirely, or almost entirely, by composing exist- ing services. When new applications can be assembled out of a collection of existing, reusable services, the best value for effort can be realized (that is, the lowest cost and fastest time to results and best ROI). But it takes some time to reach this point, and significant investment in service development may be required.
It’s easy to understand the benefit of reusing common business services such as customer name lookup, ZIP Code validation, or credit checking. In a pre- service oriented development environment, these functions might be performed by reusable code libraries or class libraries that are loaded or linked into new applications. In SOA-based applications, common functions such as these, as well as typical system functions such as security checks, transaction coordina- tion, and auditing are instead implemented using services. Using services not only reduces the amount of deployed code, but it also reduces the manage- ment, maintenance, and support burden by centralizing the deployed code and managing access to it. However, the performance implications of accessing services instead of using internal functions must be assessed because using a
Service-Oriented Architecture 17
service typically consumes more computing resources than reusable code li- braries.
The key to a successful SOA is determining the correct design and function of the services in the reusable service library, which should ultimately reflect the operational characteristics of the organization, such as how grants are applied for, how cash is managed overnight, or how containers are transferred from ships to trucks. The operational characteristics of the business are what need to be automated, and the successful SOA project will ensure that the reusable software services are properly aligned with the operational business processes. The successful alignment of business services and their implementation in soft- ware ensures that operational business processes can be changed quickly and easily as external environmental changes cause an organization to adapt and evolve.
People familiar with the CORBA standard often remark that Web services are simply CORBA implemented using XML and note the number of features Web services are missing compared to CORBA. Many CORBA deployments are SOAs, in fact, and the original goals of CORBA are very similar to the goals of Web services. Cynics say that CORBA didn’t succeed widely be- cause of vendor politics, and there’s some truth to that. However, CORBA also hurt itself in its early days by not defining a standard for interoperabil- ity. When asked about this, OMG presenters used to say, “It’s an exercise left up to the vendors and the customers to work out.” The implication, and sometimes the direct statement, was that interoperability didn’t matter if you had a standard interface. Web services actually started with SOAP, which is an interoperability standard. Many people still use SOAP without WSDL, which is perfectly possible, indicating another contrast between the two. In CORBA, it’s impossible to use the interoperability transport without the interface definition language (IDL)—in fact, everything is generated from the IDL. Many Web services toolkits also generate proxies and stubs from WSDL and also generate the SOAP messages. But this is an implementation choice,
continues
Service-Oriented Architecture 19
costs, especially when services can be used to solve tactical problems along the way. Part of adopting Web services and SOA therefore is to identify those projects that provide immediate value by solving an immediate problem (such as integrating J2EE and .NET Framework applications) and at the same time lay the foundation for a departmental or enterprise SOA.
Sometimes in the Web services literature, you will see a lot of discussion about things that Web services are not good for, such as developing and deploying mission-critical applications. It’s a mistake, however, to assume that they never will be good for this. Other times, you’ll see talk about iden- tifying the “golden copy” or “single reference” data item instance for a par- ticular data type, such as customer ID or customer name. This is indeed a problem that needs solving, but it also isn’t part of the job of the Web services. This means it needs to be solved at the SOA level rather than at the Web ser- vices level. These discussions often indicate unfamiliarity with Web services and the problems they are trying to solve. The same people who would never imagine that a single tool in a workshop could be used for every pur- pose often make the mistake of thinking that Web services must be good for everything that all other technologies that preceded them are good for. This represents thinking that each new technology wave somehow obsoletes the previous wave or takes over everything that came before. Web services are not just adding more technology to the problems of IT; they are proposing a different approach to solving some of the problems of IT, especially around integration, because of new capabilities offered by the technology. Web ser- vices are not really a replacement technology; they are not the same thing as a new programming language like Java or C#, which you could reason- ably assume must include all the major features of other successful pro- gramming languages. Web services are not really a new middleware system in the sense that J2EE, CORBA, and the .NET Framework are middleware systems. Web services are XML-based interface technologies; they are not executable; they do not have an execution environment—they depend upon other technologies for their execution environments. If you don’t
continues
20 Introduction to SOA with Web Services
The major advantages of implementing an SOA using Web services are that Web services are pervasive, simple, and platform-neutral.
As shown in Figure 1-6, the basic Web services architecture consists of specifi- cations (SOAP, WSDL, and UDDI) that support the interaction of a Web service requester with a Web service provider and the potential discovery of the Web service description. The provider typically publishes a WSDL description of its Web service, and the requester accesses the description using a UDDI or other type of registry, and requests the execution of the provider’s service by sending a SOAP message to it. The basic Web services standards are good for some SOA-based applications but are not adequate for many others.
It’s safe to say that the original vision of UDDI has not been realized. When UDDI was launched in late 2000, it was intended to become a public directory. Companies were supposed to register their Web services with UDDI, and other companies were to come along later and dynamically dis- cover the services they needed to access over the Internet. The assumption, which has not proven true, was that companies would be interested in dis- covering and requesting services from providers with whom they had no prior relationship. Also UDDI was developed before WSDL, so initially
rethink your approach to IT based on the features, functions, and capabili- ties of Web services, of course you’re not going to get the value out of them that you should. Using Web services successfully requires a change in think- ing about technology, not simply learning a new grammar for the same old way of building and deploying systems. Web services currently and will always require a mix of technologies. Therefore, Web services need to be understood in terms of what they add to the picture, not only in the context of what they replace.
continues