Message exchange patterns
Every task automated by a Web Service can differ in both the nature of the application logic being executed and the role played by the service in the overall execution of the business task. Regardless of how complex a task is, almost all require the transmission of multiple messages. The challenge lies in coordinating these messages in a particular sequence so that the individual actions performed by the message are executed properly an in alignment with the overall business task.
Message exchange patterns (MEP) represent a set of templates that provide a group of already mapped out sequences for the exchange of messages. The most common example is a request and response pattern. Here the MEP states that upon successful delivery of a message from a service to another, the receiving service responds with a message back to the initial requestor.
The MEP currently in the second generation Web Services are divided into two categories: Primitive and Complex, in this post I will discuss the two most popular primitive MEPs:
Request-response
This is the most popular MEP in use among distributed application environments and the one pattern that defines synchronous communications (although this pattern also can be applied asynchronously).
The request-response MEP establishes a simple exchange in which a message is first transmitted from a source (service requestor) to a destination (service provider). Upon receiving the message, the destination (service provider) then responds with a message back to the source (service requestor).
Fire-and-forget
This simple asynchronous pattern is based on the unidirectional transmission of messages from a source to one or more destinations.
A number of variations of the fire-and-forget MEP exist, including:
- The single-destination pattern, where a source sends a message to one destination only.
- The multi-cast pattern, where a source sends message to a predefined set of destinations.
- The broadcast pattern, which is similar to the multi-cast pattern, except that the message is sent out to a boarder range of recipient destinations.
The fundamental characteristic of the fire-and-forget pattern is that a response to a transmitted message is not expected.
Comments
Hi, could you please clarify this for me?
akis On 16 June 2010 3:52:00Do .net web services support Notification or Solicit/Response Message Exchange Patterns as defined in WSDL1.1?
J2EE WS do not support them and I need to know if .net does
Thank you
Add Comment