S3FC project page S3FC home page

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Postal System

This documents the S3FC Postal System and all its components. The postal system allows an application programmer to send text messages between a number of named nodes.

Components

The postal system consists of the following components: A number of message boxes, connected to a number of post offices that are in turn all connected to the same post office switch, constitutes a single postal system.

Overall operation

The following rules describe the operation of a postal system:

Message

[ s3_message ]

Attributes:

Operations:

Message box

[ s3_message_box ]

Attributes:

Operations:

Post Office

[ s3_post_office ]

Attributes:

Operations:

Messages that in the rx_queue are retrieved and routed. The following rules determine the fate of the message: The post office connects to the post office switch using TCP/IP. It therefore requires knowledge of the IP address and listening port of the post office switch.

Post Office Switch

[ s3_post_office_switch ]

Attributes:

Operations:

The switch accepts network connections from any number of Post Office instances. All post offices at any moment connected to a switch comprise the postal system at that moment. The switch receives packets containing messages from the connected post office instances and distributes them over the postal system. If a client connection is lost, that connection is removed from all client connection_lists in the map. If this leaves a list empty, the destination is removed from the map. Messages are routed acco rding to the following rules: As the post office switch and the post office never share a process space, control messages (messages with the type set to CONTROL are used to implement the add_dst and remove_dst operations. The message body has the following format:

   operation type destination
 
operation indicates the operation and is one of the following strings: type indicates the destination type and is one of the folllowing: destination indicates the destination address and contains the name of the message box instance that is registering the name or the name of the group that is being subscribed to.

A response control message is sent (with the from and to addresses exchanged) on the same connection that the message was received. It either contains the string failure or success, indicating whether the request failed or succeeded.


Send comments to: s3fc@stonethree.com SourceForge Logo