Messaging System

wahyu eko hadi saputro
3 min readJul 6, 2020

--

A. On this time the article is talking about Messaging. Messaging can be described as exchanging data between sender and receiver. Actually in daily life so many kind of messaging like chatting, talking, texting ect. In every messaging, it involves sender, receiver, massages and channel. Ok the article will limit the writing only about messaging that related to distributed system. Distributed system is identical to distributed application, and distributed application can be achieved by making microservices application. Therefore, exchanging data between service or application in distributed system is called massaging or integration.

Messaging process

Sender : sender is source or sender of message
Receiver : receiver is destination / receiver of messages
Channel : channel is pathway of message
Message : message is content of messaging / communication.

A.1.1 Message

Message structure

The message itself is simply some sort of data structure such as a string, a byte array, a record, or an object. It can be interpreted simply as data, as the description of a command to be invoked on the receiver, or as the description of an event that occurred in the sender. A message actually contains two parts, a header and a body. The header contains meta-information about the message who sent it, where it’s going, etc. This information is used by the messaging system and is mostly (but not always) ignored by the applications using the messages. The body contains the data being transmitted and is ignored by the messaging system. In conversation, when an application developer who is using messaging talks about a message, he’s usually referring to the data in the body of the message. (Addison Wesley — Enterprise Integration Patterns)

A.1.2 Channel

Channel is a pathway that connect between sender and receiver to convey message. We can say that whatapp is a channel because whatapp will deliver message from sender to receiver. Even though if we break down the whatapp system, there is many complex system under the hood. For general handphone where whatapp is installed, will send message to whatapp server, then what app server will send message to destination. On this case whatapp server can act as receiver and sender.

A.1.3 Sender and Receiver

Sender is the source of the message or the person / system that originates the message and sends it to the receiver. Receiver is the person or system that gets the message and tries to understand what the sender actually wants to convey and then responds accordingly.

A.2.1 Massaging Challenges

All massaging systems have to deal with a few fundamental challenges:

• Networks are unreliable. Massaging systems have to transport data from one computer to another across networks. Compared to a process running on a single computer, distributed computing has to be prepared to deal with a much larger set of possible problems. Often times, two systems to be integrated are separated by continents and data between them has to travel through phone-lines, LAN segments, routers, switches, public networks, and satellite links. Each of these steps can cause delays or interruptions.

• Networks are slow. Sending data across a network is multiple orders of magnitude slower than making a local method call. Designing a widely distributed system the same way you would approach a single application could have disastrous performance implications.

• Any two applications are different. Massaging systems need to transmit information between systems that use different programming languages, operating platforms, and data formats. A messaging systems needs to be able to interface with all these different technologies.

• Change is inevitable. Applications change over time. A messaging system has to keep pace with changes in the applications it connects. Massaging systems can easily get caught in an avalanche effect of changes — if one system changes, all other systems may be affected. An integration solution needs to minimize the dependencies from one system to another by using loose coupling between applications. data formats. An integration solution needs to be able to interface with all these different technologies.

(Addison Wesley — Enterprise Integration Patterns)

--

--

No responses yet