|
|
Antigone maintains an abstraction that separates the transport layer from the rest of the software. This modular approach allows differenet transports to be implemented without requiring modifications to other areas of the software.
Antigone currently supports three modes of transport. All modes use UDP, which maximizes transmission overhead but does not guarantee delivery ( UDP is termed unreliable ).
Symmetric mode uses IP multicast routing. In this mode every message need only be sent once and will be received by all members. This mode is generally the most bandwidth efficient way to run a group.
Valid multiast addresses range from 224.0.0.0 to 239.255.255.255.
Most current UNIX systems provide some support for multicast routing. In some cases, IP or kernel configuration is required. Before proceeding, verify that multicast support is enabled. See your system documentation for information relating to multicast.
Once multicast support has been enabled, you will need to add a route for multicasting. Valid multicast address range from 224.0.0.0 to 239.255.255.255. So, a route should contain, at the very least, the range of addresses you wish to use for multicasting. The following describes the commands used by two UNIX versions to enable multicast routing. See your local man page for specific route command arguments.
Linux:
% route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
SunOS:
% route add -net 224.0.0.0 -netmask 240.0.0.0 -interface hme0
This mode uses standard the standard point to point connection used in many standard utilities such as ssh. This mode is universally supported, but is less efficient because in a group of size N the message must be sent N-1 times. When specifying an address for this mode, either an IP address or a host name can be given (provided that the host name appears in the /etc/hosts file - see your system administrator for more information.)
The asymmetric mode implements a combination of the symmetric and pointtopoint modes. When a member wants to send a message, it is actually sent to the group leader (server), who then relays it to the group using symmetric multicast.
When using this mode, both a pointtopoint and symmetric address must be given.
The easiest and least error prone way to set up the transport is to do so in the local policy file, and passing a NULL as the transport argument when creating a group (AGroup class). It is not possible to use the group policy files for these parameters because clients can not access it until after they have established a connection (using the transport) with the group server.
Alternately, for dynamically controlling transport parameters from the program, it may be set up programmatically as described in Application Programming Guide.
This table lists all the attributes used in the local policy file to set up the transport.
Name | Description | Default
|
trans_mode | Type of transport to be used. Must be one of symmetric, pointtopoint, or asymmetric. See table below for more information on these mode. | symmetric
|
trans_mc | Multicast connection. This is specified in the format: "ip port", where ip must be a multicast address and port is an available port. | 224.1.1.27 9000
|
trans_p2p | Point to point connection. This is specified in the format: "ip port", where ip must be the name or ip of the host machine that is to be the server and port is an available port. Note that the default "localhost" will only work if all processes are running on the same host. This is generally configured in the /etc/hosts file as "127.0.0.1" | localhost 9002
|
trans_loopback | If true, messages sent by the server to the multicast connection will also be sent to the sender. If false, the sender will not receive it's own messages. | true
|
trans_interface | This attribute indicates which network hardware interface is to be used when using multicast. For point to point communications the operating system can determine which interface to use based on the IP address, but for multicast there may not be such association.
To specify this attribute, give a host name or IP address. The default for this parameter is to use any (single) available network connection. This attribute is only used when your system has more than one network interface card (such as a laptop with both a wireless card AND a hardwired connection) and and you are using symmetric or asymmetric mode. | ANY
|
This table gives the names and descriptions associate with each of the transport modes:
Mode | Connection Parameters Required
|
symmetric | trans_mc
|
pointtopoint | trans_p2p
|
asymmetric | trans_mc and trans_p2p
|
The following are examples of setting up the transport in the local policy file. The "simple" program uses this method for setting up the transport (it actually specifies nothing in simple.apd
, using all defaults).
For the purposes of this example "flock" is the name of a host. All lines preceded with a '%' are comments. Parameters may be specified in any order. Note that an explicit description of the transport being used will be put in the log, and will be of the form:
transport construct. server mode:symmetric ip:224.1.1.27 port:9000 loopback:true
Example 1: Use symmetric mode:
% comment : this is the default - nothing required.
Example 2: Use pointtopoint mode:
trans_mode := <pointtopoint>; trans_p2p := <flock>;
Example 3: Use pointtopoint mode specifying port:
trans_mode := <pointtopoint>; trans_p2p := <flock:1050>;
Example 4: Use asymmetric mode specifying everything:
trans_mode := <asymmetric>;
trans_mc := <224.1.1.24:1077>;
trans_p2p := <flock:1055>;
trans_loopback := <true>;