Skip to main content

5. The MPM: A Possible Architecture

The heart of the internet message system is the MPM which is responsible for routing and delivering messages. Each network must have at least one MPM. These MPMs are logically connected together, and internet mail is always transferred along logical channels between them. The MPMs interface with existing local message systems.

Since the local message system may be very different from the internet system, special programs may be necessary to convert incoming internet messages to the local format. Likewise, messages outgoing to other networks may be converted to the internet format and sent via the MPMs.

5.1. Interfaces​

User Interface​

It is assumed that the interface between the MPM and the UIP provides for passing data structures which represent the document portion of the message. In addition, this interface must pass the delivery address information (which becomes the information in the mailbox field of the command). It is assumed that the information is passed between the UIP and the MPM via shared files, but this is not the only possible mechanism. These two processes may be more strongly coupled (e.g., by sharing memory), or less strongly coupled (e.g., by communicating via logical channels).

When a UIP passes a document and a destination address to the MPM, the MPM assigns a transaction-number and forms a message to send. The MPM must record the relationship between the transaction-number, the document, and the UIP, so that it can inform the UIP about the outcome of the delivery attempt for that document when the acknowledgment message is received at some later time.

Assuming a file passing mode of communication between the UIP and the MPM the sending and receiving of mail might involve the following interactions:

A user has an interactive session with a UIP to compose a document to send to a destination (or list of destinations). When the user indicates to the UIP that the document is to be sent, the UIP places the information into a file for the MPM. The UIP may then turn to the next request of the user.

The MPM finds the file and extracts the the information. It creates a message, assigning a transaction-number and forming a deliver command. The MPM records the UIP associated with this message. The MPM sends the message toward the destination.

When the MPM receives a deliver message from another MPM addressed to a user in its domain, it extracts the document and puts it into a file for the UIP associated with the destination user. The MPM also sends an acknowledge message to the originating MPM.

When the MPM receives an acknowledgment for a message it sent, the MPM creates a notification for the associated UIP and places it in a file for that UIP.

The format of these files is up to each UIP/MPM interface pair. One reasonable choice is to use the same data structures used in the MPM-MPM communication.

Communication Interface​

It is assumed here that the MPMs use an underlying communication system, and TCP [3] has been taken as the model. In particular, the MPM is assumed to be listening for a TCP connection on a TCP port, i.e., it is a server process. The port is either given explicitly in the mpm-identifier or takes the default vaule 45 (55 octal) [4]. Again, this is not intended to limit the implementation choices; other forms of interprocess communication are allowed, and other types of physical interconnection are permitted. One might even use dial telephone calls to interconnect MPMs (using suitable protocols to provide reliable communication) [12,19,20,21].

5.2. The MPM Organization​

Messages in the internet mail system are transmitted in lists called message-bags (or simply bags), each bag containing one or more messages. Each MPM is expected to implement functions which will allow it to deliver local messages it receives and to forward non-local ones to other MPMs presumably closer to the message's destination.

Loosely, each MPM can be separated into six components:

1--Acceptor​

Receives incoming message-bags, from other MPMs, from UIPs, or from conversion programs.

2--Message-Bag Processor​

Splits a bag into these three portions:

  • a. Local Host Messages
  • b. Local Net Messages
  • c. Foreign Net Messages

3--Local Host Delivery​

Delivers local host messages, may call on conversion program.

4--Local Net Delivery​

Delivers local net messages, may call on conversion program.

5--Foreign Net Router​

Forms message-bags for transmission to other MPMs and determines the first step in the route.

6--Foreign Net Sender​

Activates transmission channels to other MPMs and sends message-bags to foreign MPMs.

If the local net message system uses the protocol of the MPMs, then there need be no distinction between local net and foreign net delivery procedures.

All of these components can be thought of as independent. The function of the Acceptor is to await incoming message-bags and to insert them into the Bag-Input Queue.

The Bag-Input queue is read by the message-bag Processor which will separate and deliver suitable portions of the message-bags it retrieves from the queue to one of three queues:

  • a. Local Host Queue
  • b. Local Net Queue
  • c. Foreign Net Queue

When an MPM has a message to send to another MPM, it must add its own handling-stamp to the trace field of the command. The trace then becomes a record of the route the message has taken. An MPM should examine the trace field to see if the message is in a routing loop. All commands require the return of the trace as a trail in the matching reply command.

All of these queues have as elements complete message-bags created by selecting messages from the input message-bags.

The Local Host queue serves as input to the Local Host Delivery process. This component is responsible for delivering messages to its local host. It may call on a conversion program to reformat the messages into a form the local protocol will accept. This will probably involve such things as copying shared information.

The Local Net queue serves as input to the Local Net Delivery process. This component is responsible for delivering messages to other hosts on its local net. It must be capable of handling whatever error conditions the local net might return, and should include the ability to retransmit. It may call on a conversion program to reformat the messages into a form the local protocol will accept. This will probably involve such things as copying shared information.

The other two processes are more closely coupled. The Foreign Net Router takes its input bags from the Foreign Net Queue. From the internal information it contains, it determines which of the MPMs to which it is connected should receive the bag.

It then places the bag along with the routing information into the Send Mail Queue. The Foreign Net Sender retrieves it from that queue and transmits it across a channel to the intended foreign MPM. The Sender aggregates messages to the same next MPM into a bag.

The Foreign Net Router should be capable of receiving external input to its routing information table. This may come from the Foreign Net Sender in the case of a channel going down, requiring a decision to either postpone delivery or to determine a new route. The Router is responsible for maintaining sufficient information to determine where to send any incoming message-bag.

Forwarding​

An MPM may have available information on the correct mailboxes of users which are not at its location. This information, called a forwarding data base, may be used to return the correct address in response to a probe command, or to actually forward a deliver command (if allowed by the type of service).

Because such forwarding may cause the route of a message to pass through an MPM already on the trace of this message, only the portion of the trace back to the most recent forward action should be used for loop detection by a relay relaying MPM, and only the forward action entries in the trace should be checked by a forwarding MPM.

Implementation Recommendations​

Transaction numbers can be assigned sequentially, with wrap around when the highest value is reached. This should ensure that no message with a particular transaction number from this source is in the network when another instance of this transaction number is chosen.

The processing to separate shared elements when the routes of the shared elements diverge while still preserving the sharing possible appears to be an O(N*M**2) operation where N is the number of distinct objects in a message which may be shared across message boundaries and M is the number of messages in the bag.

Also note that share-tags may be copied into separate message bags which are not referenced. These could be removed with another pass over the message bag.