ArticleslgStudy

computer science

Messaging pattern

Messaging pattern is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Messaging pattern rather than just read about it. In short: In software architecture, a messaging pattern is an architectural pattern which describes how two different parts of an application, or different systems connect and communicate with each other. There are many aspects to the concept of messaging which can be divided in the following categories: hardware device messaging (telecommunications, computer networking, IoT, etc.) and software data exchange (the different da…

Key takeaways

  • Messaging pattern belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Messaging pattern to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Messaging pattern from memory before moving on to harder problems.

Reference excerpt

In software architecture, a messaging pattern is an architectural pattern which describes how two different parts of an application, or different systems connect and communicate with each other. There are many aspects to the concept of messaging which can be divided in the following categories: hardware device messaging (telecommunications, computer networking, IoT, etc.) and software data exchange (the different data exchange formats and software capabilities of such data exchange). Despite the difference in the context, both categories exhibit common traits for data exchange.

General concepts of the messaging pattern In telecommunications, a message exchange pattern (MEP) describes the pattern of messages required by a communications protocol to establish or use a communication channel. The communications protocol is the format used to represent the message which all communicating parties agree on (or are capable to process). The communication channel is the infrastructure that enables messages to "travel" between the communicating parties. The message exchange patterns describe the message flow between parties in the communication process, there are two major message exchange patterns — a request–response pattern, and a one-way pattern. For example, when viewing content on the Internet (the channel), a web browser (a communicating party) would use the HTTP (the communication protocol) to request a web page from the server (another communicating party), and then render the returned data into its visual form. This is how the request–response messaging pattern operates. Alternatively, in computer networking, we have the UDP network protocol. It is used with the one-way messaging pattern, where the sending party is not interested whether the message arrives to any receiving party, nor it expects any of the receiving parties to produce an "answering" message.

Device communication This section is about data exchange between hardware devices. In order for the devices to be able to read and exchange data, they would use a hardware-specific protocol (such as the radio signal) which is generated by a hardware device acting as a sending party (the radio tower), and can be interpreted by another hardware device which is the receiving party (your kitchen radio for instance). With the example of the radio, we have a one-way communication pattern, and the message exchange protocol is the radio signal itself. Device communication may also refer to how the hardware devices in a message exchange system enable the message exchange. For example, when browsing the Internet, a number of different devices work in tandem to deliver the message through the internet traffic—routers, switches and network adapters, which on a hardware level send and receive signals in the form of TCP or UDP packages. Each such package could by itself be referred to as a message if we narrow our view to a pair of hardware devices communicating to one another, while in the general sense of the internet communication, a number of sequentially arranged packages together form a meaningful message, such as an image, or a web page.

Software communication Unlike device communications, where the form of the message data is limited to protocols supported by the type and capabilities of the devices involved (for example in computer networking we have the TCP and UDP protocols, a walkie-talkie would sending radio waves in specific frequency, and a beacon would be flashing Morse code sequences that a person could read), a software can establish more complex and robust data exchange formats. Those formats would be translated by the sending party in a form deliverable by the underlying hardware, and then decoded by the receiving party from the hardware-specific format to a form conforming to the original protocol established by the communicating software systems. This higher-level data exchange allows transferring information in a more-human readable form, and also enables usage of software encryption and decryption techniques to make messaging secure. Additionally, the software message exchange enables more variations of the message exchange pattern which are no-longer limited to the simple request-reply and one-way approaches. And last, but not least, software communication systems are capable of providing various channels for data exchange which can be used to optimize the message delivery, or to establish complex rules for selection and filtering which help deciding which parties to receive certain messages. This enables the possibility for software-orchestrated message routing. As result to the later, the concepts of a topic (where all receiving parties in a targeted group would be delivered a copy of the message) and a queue (where only one party in a targeted group would receive the message) have emerged. As mentioned before, software messaging allows more options and freedom in the data exchange protocols. This, however, would not be very useful unless the communicating parties agree on the details of the protocol involved, and so a number of standardized software messaging protocols exist. This standardization allows different software systems, usually created and maintained by separate organizations, and which could be operating on different hardware devices (servers, computers, smart devices or IoT controllers), to participate in realtime data exchange. Below are listed some of the most popular software messaging protocols, which are still in use today. Each of them provides extended meanings to the messaging concept described in the previous section.

SOAP The term message exchange pattern has an extended meaning within the Simple Object Access protocol (SOAP). SOAP MEP types include:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Messaging pattern

Start with the simplest possible case. Write down what Messaging pattern claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Messaging pattern before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Messaging pattern ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Messaging pattern

In research
Messaging pattern appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Messaging pattern in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Messaging pattern is common in secondary-school and first-year university syllabi. It links to neighbouring topics Distributed computing architecture, Inter-process communication, Message-oriented middleware, so understanding it makes those chapters shorter.
In everyday life
Look for Messaging pattern outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Messaging pattern” →

How to study Messaging pattern in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Messaging pattern means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Messaging pattern out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Messaging pattern in simple terms?

In software architecture, a messaging pattern is an architectural pattern which describes how two different parts of an application, or different systems connect and communicate with each other. There are many aspects to the concept of messaging which can be divided in the following categories: har…

Why does Messaging pattern matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Messaging pattern?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Messaging pattern.

Tags

  • Distributed computing architecture
  • Inter-process communication
  • Message-oriented middleware
  • Network protocols

Keep exploring