There are several packet processors that process packets passing through the messaging system. There are four points where a processor can be placed to perform operations on a message in a form similar to packet filtering. At each location, packets can be held from further passage, modified or other packets generated in reply.
In addition to message filtering, each processor is given an interface to inject new messages into the system using send and sendDirect. Send injects messages into the outgoing queue and they are treated as regular messages originating locally. SendDirect allows preformatted and routed responses to be sent directly to the transport layer. This is for items such as acknowledgements and routing messages.
The output from each processor is the list of messages for the next step and a timestamp indicate when the queue should be ‘pushed’ later. Pushing is a way for time based activities to get a chance to run when no messages are currently active. The push is implemented by calling the processor method with a blank list of messages.
Routers are a special type of processor that are called to determine which transports to route packets out.
The Acknowledgement processor is split into two pieces. The reply piece and the requirement pieces. The reply piece scans incoming messages for an acknowledgement request flag and sends an ack in reply.
The requirement piece scans outgoing messages for an ack request flags, stores a copy of the message and waits for an acknowledgment for the message. If an acknowledgement is not received, the message is retransmitted. The timer for retransmit starts at 0.5 seconds and then doubles on each retransmit until 8 seconds. After that, the message transmission is considered failed.
The Name and ID processor makes sure that outgoing messages have the correct source address and a unique message id. For incoming messages, it drops duplicate ID messages.
The sequence processor takes care of source based ordered delivery of packets. The source of the message encodes an incrementing counter value into the outgoing messages. The destination of the message, upon seeing counter values, will make sure the messages are delivered in linear order. The destination is responsible for ordering the packets and may not see all packets coming from the source. Multiple couters are kept in storage, one for each combination of source and destination list (could have multiple hosts or groups). Without this requirement, it is not gauranteed that the destination will capture all packets in an ordered list and it cannot deliver N until it receives N-1.
The timestamp processor provides another form of delivery ordering using the current time. Outgoing packets requesting timestamp delivery have the requested timestamp encoded into the message. Incoming packets with an encoded timestamp are held until the time requested and then delivered to the application.
The group router processor absorbs incoming messages for the dock GroupRoute It also injects the same message types back into the message system when negotiating information about group membership. This information is used by the GroupRouter in the actual messaging router process.
The node router processor absorbs incoming messages for the dock NodeRoute It responds to NodeRequest messages with a NodeResponse. Incoming NodeReponse messages indicate the path to the responding node. This information is used by the NodeRouter in the actual messaging router process.