Almost all networks have an upper bound on the size of data that can be transmitted at a time. This size is known as the maximum transfer unit (MTU) of a network. A message whose size is grater that the MTU has to be fragmented into multiples of the MTU, and then each fragment has to be sent separately. Each fragment is sent in a packet that has some control information in addition to the message data. Each packet is known as a datagram. Messages smaller that the MTU of the network can be sent in a single packet and are known as single-datagram messages. On the other hand, messages larger than the MTU of the network have to be fragmented and sent in multiple packets. Such messages are known as multi datagram message bear a sequential relationship to one another. The disassembling of a multi datagram message into multiple packets on the sender side and the reassembling of the packets on the receiver side if usually the responsibility of the message-passing system.

A message data should be meaningful to the receiving process. This implies that, ideally, the structure of program objects should be preserved while they are being transmitted from the address space of the sending process to the address space of the receiving process. This obviously is not possible in a heterogeneous system in which the sending and receiving processes are on computers of different architectures. However, even in homogenous systems, it is very difficult to achieve this goal mainly because of two reasons.

An absolute pointer value loses its meaning when transferred from one process address space to another. Therefore, such program objects that use absolute pointer values cannot be transferred in their original form, and some other form of representation must be used to transfer them. For example, to transmit a tree object, each element of the tree must be copied in a leaf record and properly aligned in some fixed order in a buffer before it can be sent to another process. The leaf records themselves have no meaning in the address space of the receiving process, but the tree can be regenerated easily from them, To facilitate such regeneration, object-type information must be passed between the sender and receiver, indicating not only that a tree object is being passed but also the order in which the leaf records are aligned. This process of flattening and shaping of tree objects also extends to other structured program objects, such as linked lists. 

Different program objects occupy varying amount of storage space. To be meaningful, a message must normally contain several types of program objects, such as long integers, short integers, variable-length character strings, and so on. In this case, to make the message meaningful to the receiver, there must be some way for the receiver to identify which program object is stored where in the message buffer and how much space each program object occupies. 

Due to the problems mentioned above in transferring program objects in their original form, they are first converted to a stream from that is suitable for transmission and placed into a message buffer. This conversion process takes place on the sender side and is known as encoding of a message data. The encoded message, when received by the receiver, must be converted back from the stream form to the original program objects before it can be used. The process of  reconstruction of program objects from message data on the receiver side is known as decoding of the message data.

Almost all networks have an upper bound on the size of data that can be transmitted at a time. This size is known as the maximum transfer unit (MTU) of a network. A message whose size is grater that the MTU has to be fragmented into multiples of the MTU, and then each fragment has to be sent separately. Each fragment is sent in a packet that has some control information in addition to the message data. Each packet is known as a datagram. Messages smaller that the MTU of the network can be sent in a single packet and are known as single-datagram messages. On the other hand, messages larger than the MTU of the network have to be fragmented and sent in multiple packets. Such messages are known as multi datagram message bear a sequential relationship to one another. The disassembling of a multi datagram message into multiple packets on the sender side and the reassembling of the packets on the receiver side if usually the responsibility of the message-passing system.


