Chapter 2: Services


Overview

In this chapter we continue our SOA overview with a focus on services. A service includes the following aspects:

  • a service implementation

  • elementary access details

  • a contract

A service implementation is the core business logic, which might be written in Java, COBOL, Enterprise Generation Language (EGL), or any other programming language.

Elementary access details include the location, which is an address where the service implementation resides, and the binding, which identifies the transport protocol (such as HTTP or Java Message Service) that formats a message at the start of transmission and unformats it at the end of transmission. Formatting occurs when the invocation message originates at the requester; in that case, unformatting occurs when the message arrives at the service location. Formatting also occurs if the service issues a response; in that case, unformatting occurs when the response arrives at the requester.

A contract describes the service's intended behavior and is independent of the implementation details. The contract includes two elements: a service interface and a Quality of Service.

The service interface provides a description of the data that can pass between a requester and a service, along with details on each operation the service provides. The interface includes information on the messages and answers the questions, "What is the format of a message (for example, two strings followed by an integer)?" and "What are the restrictions on content?" The interface also includes details on the message exchange patterns, which indicate how the requester and service interact. "Does the service always respond to the requester?" "Can the service do a task without reporting back?"

Some aspects of the service's behavior are implicit in the service interface. For example, a service might provide a stock quote but return an error message if the submitted stock symbol is invalid.

An interface is an aspect not only of a service but also of a high-level design for the service. The interface precedes the implementation in most cases, and the service implementation (or sometimes the service as a whole) is said to implement the interface.

The service's Quality of Service (QoS) is a description of interaction rules that go beyond those implied by either the elementary access details or the service interface. For example, the service might require that the invocation message include authorization details that prove the user's right to use the service. You'll learn more about QoS later in the chapter.

One note about the service contract: Rather than "contract," we could have used the phrase "proposed contract" because a requester and service may undertake a negotiation, possibly at run time, to determine certain details of the interaction. We expect this kind of negotiation to become more prevalent as time goes by. For further details, see the description of the WS-Agreement specification in Appendix A.

Last, the terms "service" and "service implementation" are often used interchangeably. The second term is most appropriate when the focus is on the details of the business logic.




SOA for the Business Developer. Concepts, BPEL, and SCA
SOA for the Business Developer: Concepts, BPEL, and SCA (Business Developers series)
ISBN: 1583470654
EAN: 2147483647
Year: 2004
Pages: 157
Authors: Ben Margolis

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net