Web Services
Web services are the latest distributed technology and, as we will see, the most suitable technology for realization of SOA. They have become the commonly used technology for interoperability and integration of applications and information systems. Web services provide the technological foundation for achieving interoperability between applications using different software platforms, operating systems, and programming languages. They are built on XML. While XML is the de facto standard for data-level integration, web services are becoming the de facto standard for service-level integration between and within enterprises.
From the technological perspective, web services are a distributed architecture. The distributed computing paradigm started with DCE (Distributed Computing Environment), RPC (Remote Procedure Call), and messaging systems, also called message‑oriented middleware (products such as MQ Series, MSMQ, etc.). Then distributed objects and ORBs (Object Request Brokers), such as CORBA (Common Object Request Broker Architecture), DCOM (Distributed Component Object Model), and RMI (Remote Method Invocation), emerged. Based on them component models, such as EJB (Enterprise Java Beans), COM+ (Component Object Model), .NET Enterprise Services, and CCM (CORBA Component Model) have been developed. RPC, ORBs, and component models share similar communication model, which is based on synchronous operation invocation. Messaging systems are based on the asynchronous communication model.
How Web Services Differ from their Predecessors
Web services are similar to their predecessors, but also differ from them in several aspects. Web services are the first distributed technology to be supported by all major software vendors. Therefore they are the first technology that fulfills the promise of universal interoperability between applications running on disparate platforms. The fundamental specifications that web services are based on are SOAP (Simple Object Access Protocol), WSDL (Web Services Description Language), and UDDI (Universal Description, Discovery, and Integration). SOAP, WSDL, and UDDI are XML based, making web services protocol messages and descriptions human readable.
From the architectural perspective, web services introduce several important changes compared to earlier distributed architectures:
- Web services support loose coupling through operations that exchange data only. This differs from component and distributed object models, where behavior can also be exchanged.
- Operations in web services are based on the exchange of XML‑formatted payloads. They are a collection of input, output, and fault messages. The combination of messages defines the type of operation (one-way, request/response, solicit response, or notification). This differs from previous distributed technologies. For more information, please refer to WSDL and XML Schema specifications.
- Web services provide support for asynchronous as well as synchronous interactions.
- Web services introduce the notion of endpoints and intermediaries. This allows new approaches to message processing.
- Web services are stateless. They do not follow the object paradigm.
- Web services utilize standard Internet protocols such as HTTP (Hyper Text Transfer Protocol), SMTP (Simple Mail Transfer Protocol), FTP (File Transfer Protocol), and MIME (Multipurpose Internet Mail Extensions). So, connectivity through standard Internet connections, even those secured with firewalls, is less problematic.
Web Services Technology Stack
In addition to several advantages, web services also have a couple of disadvantages. One of them is performance, which is not as good as that of distributed architectures that use binary protocols for communication. The other is that plain web services do not offer infrastructure and quality‑of-service (QoS) features, such as security, transactions, and others, which have been provided by component models for several years. Web services fill this important gap by introducing additional specifications:
- WS-Security: Addresses authentication and message-level security, and enables secure communication with web services.
- WS-Coordination: Defines a coordination framework for web services and is the foundation for WS-AtomicTransaction and WS-BusinessActivity.
- Transactions specifications (WS-AtomicTransaction and WS-BusinessActivity): Specify support for distributed transactions with web services. AtomicTransaction specifies short duration, ACID transactions, and BusinessActivity specifies longer running business transactions, also called compensating transactions.
- WS-Reliable Messaging: Provides support for reliable communication and message delivery between web services over various transport protocols.
- WS-Addressing: Specifies message coordination and routing.
- WS-Inspection: Provides support for dynamic introspection of web service descriptions.
- WS-Policy: Specifies how policies are declared and exchanged between collaborating web services.
- WS-Eventing: Defines an event model for asynchronous notification of interested parties for web services.
These specifications constitute the web services technology stack, which is described in detail in Chapter 2, and is required (at least partially) for serious use of web services in enterprise applications.
Because of their flexibility, interoperability, and other features, web services are regarded as the most appropriate technology for exposing the functionalities of applications as services and are therefore the most appropriate technology for realization of SOA. Because of their wide support by all major software vendors, web services provide the possibility to use the same technology to expose services implemented in a variety of different applications ranging from mainframe-based legacy applications to the modern multi-tier applications.