Message Exchange Pattern
Encyclopedia
In software architecture
, a messaging pattern is a network-oriented architectural pattern which describes how two different parts of a message passing
system connect and communicate with each other.
In telecommunications, a message exchange pattern (MEP) describes the pattern
of messages
required by a communications protocol
to establish or use a communication channel. There are two major message exchange patterns — a request-response
pattern, and a one-way pattern. For example, the HTTP
is a request-response pattern protocol, and the UDP
has a one-way pattern.
protocol. SOAP MEP types include:
message queueing library provides a so-called sockets (a kind of generalization over the traditional IP
and Unix sockets
) which require to indicate a messaging pattern to be used, and are particularly optimized for that kind of patterns. The basic ØMQ patterns are:
Each pattern defines a particular network topology. Request-reply defines so-called "service bus", publish-subscribe defines "data distribution tree", push-pull defines "parallelised pipeline". All the patterns are deliberately designed in such a way as to be infinitely scalable and thus usable on Internet scale.
Software architecture
The software architecture of a system is the set of structures needed to reason about the system, which comprise software elements, relations among them, and properties of both...
, a messaging pattern is a network-oriented architectural pattern which describes how two different parts of a message passing
Message passing
Message passing in computer science is a form of communication used in parallel computing, object-oriented programming, and interprocess communication. In this model, processes or objects can send and receive messages to other processes...
system connect and communicate with each other.
In telecommunications, a message exchange pattern (MEP) describes the pattern
Pattern
A pattern, from the French patron, is a type of theme of recurring events or objects, sometimes referred to as elements of a set of objects.These elements repeat in a predictable manner...
of messages
Message passing
Message passing in computer science is a form of communication used in parallel computing, object-oriented programming, and interprocess communication. In this model, processes or objects can send and receive messages to other processes...
required by a communications protocol
Communications protocol
A communications protocol is a system of digital message formats and rules for exchanging those messages in or between computing systems and in telecommunications...
to establish or use a communication channel. There are two major message exchange patterns — a request-response
Request-response
Request-response or request-reply is one of the basic methods computers use to talk to each other. When using request-response, the first computer requests some data and the second computer responds to the request. Usually there is a series of such interchanges until the complete message is sent. ...
pattern, and a one-way pattern. For example, the HTTP
Hypertext Transfer Protocol
The Hypertext Transfer Protocol is a networking protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web....
is a request-response pattern protocol, and the UDP
User Datagram Protocol
The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol network without requiring...
has a one-way pattern.
SOAP
The term "Message Exchange Pattern" has a specific meaning within the SOAPSOAP
SOAP, originally defined as Simple Object Access Protocol, is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks...
protocol. SOAP MEP types include:
- In-Only: This is equivalent to one-way. A standard one-way messaging exchange where the consumer sends a message to the provider that provides only a status response.
- Robust In-Only: This pattern is for reliable one-way message exchanges. The consumer initiates with a message to which the provider responds with status. If the response is a status, the exchange is complete, but if the response is a fault, the consumer must respond with a status.
- In-Out: This is equivalent to request-response. A standard two-way message exchange where the consumer initiates with a message, the provider responds with a message or fault and the consumer responds with a status.
- In Optional-Out: A standard two-way message exchange where the provider's response is optional.
- Out-Only: The reverse of In-Only. It primarily supports event notification. It cannot trigger a fault message.
- Robust Out-Only: similar to the out-only pattern, except it can trigger a fault message. The outbound message initiates the transmission.
- Out-In: The reverse of In-Out. The provider transmits the request and initiates the exchange.
- Out-Optional-In: The reverse of In-Optional-Out. The service produces an outbound message. The incoming message is optional ("Optional-in").
ØMQ
The ØMQØMQ
ØMQ is a high-performance asynchronous messaging library aimed at use in scalable distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ØMQ system can run without a dedicated message broker...
message queueing library provides a so-called sockets (a kind of generalization over the traditional IP
Internet socket
In computer networking, an Internet socket or network socket is an endpoint of a bidirectional inter-process communication flow across an Internet Protocol-based computer network, such as the Internet....
and Unix sockets
Unix domain socket
A Unix domain socket or IPC socket is a data communications endpoint for exchanging data between processes executing within the same host operating system. While similar in functionality to...
) which require to indicate a messaging pattern to be used, and are particularly optimized for that kind of patterns. The basic ØMQ patterns are:
- Request-replyRequest-responseRequest-response or request-reply is one of the basic methods computers use to talk to each other. When using request-response, the first computer requests some data and the second computer responds to the request. Usually there is a series of such interchanges until the complete message is sent. ...
connects a set of clients to a set of services. This is a remote procedure callRemote procedure callIn computer science, a remote procedure call is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space without the programmer explicitly coding the details for this remote interaction...
and task distribution pattern. - Publish-subscribePublish/subscribePublish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Published messages are characterized into classes, without knowledge of what, if any, subscribers there may be...
connects a set of publishers to a set of subscribers. This is a data distribution pattern. - Push-pull connects nodes in a fan-out / fan-in pattern that can have multiple steps, and loops. This is a parallel task distribution and collection pattern.
- Exclusive pair connects two sockets in an exclusive pair. This is a low-level pattern for specific, advanced use cases.
Each pattern defines a particular network topology. Request-reply defines so-called "service bus", publish-subscribe defines "data distribution tree", push-pull defines "parallelised pipeline". All the patterns are deliberately designed in such a way as to be infinitely scalable and thus usable on Internet scale.
See also
- Push technologyPush technologyPush technology, or server push, describes a style of Internet-based communication where the request for a given transaction is initiated by the publisher or central server...
- Distributed data flowDistributed data flowDistributed data flow refers to a set of events in a distributed application or protocol that satisfies the following informal properties:* Asynchronous, non-blocking, and one-way...
- Enterprise Integration PatternsEnterprise Integration PatternsEnterprise Integration Patterns is a book by Gregor Hohpe and Bobby Woolf and describes a number of design patterns for the use of enterprise application integration and message-oriented middleware....
- Java Business IntegrationJava Business IntegrationJava Business Integration is a specification developed under the Java Community Process for an approach to implementing a service-oriented architecture . The JCP reference is JSR 208 for JBI 1.0 and JSR 312 for JBI 2.0....