29.01.2013 Views

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Message exchange patterns<br />

Some transport protocols are better adapted to some message exchange<br />

patterns than others. For example, when using SOAP/HTTP, a response is<br />

implicitly returned for each request. An asynchronous transport such as<br />

SOAP/JMS is probably more proficient at handling a publish-subscribe message<br />

exchange pattern.<br />

The remainder of this section discusses some of the common message<br />

exchange patterns in the context of Web services and considerations for their<br />

use. The message exchange patterns are as follows:<br />

► One-way<br />

► Asynchronous two-way<br />

► Request-response<br />

► Workflow-oriented<br />

► Publish-subscribe<br />

► Composite<br />

One-way<br />

In this simple message exchange pattern, messages are pushed in one direction<br />

only. The source does not care whether the destination accepts the message<br />

(with or without error conditions). The service provider (service producer)<br />

implements a Web service to which the requestor (or consumer) can send<br />

messages (Figure 11-3). This is a candidate to use messaging instead of a Web<br />

service, depending on your interoperability and reliability requirements.<br />

An example of a one-way message exchange pattern is a resource monitoring<br />

component. Whenever a resource changes in an application (the source), the<br />

new value is sent to a monitoring application (the destination).<br />

Service<br />

Consumer<br />

(source)<br />

Figure 11-3 One-way message exchange pattern<br />

Asynchronous two-way<br />

In this message exchange pattern (Figure 11-4 on page 367), the service<br />

requestor expects a response, but the messages are asynchronous in nature (for<br />

example, where the response might not be available for many hours). Both sides<br />

must implement a Web service to receive messages. In general, the Web service<br />

366 <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> <strong>V7.0</strong>: <strong>Concepts</strong>, Planning, and Design<br />

Service<br />

Producer<br />

(destination)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!