|
Message Types for Data and Membership Messages/* Interface */ #define MAX_GROUP_NAME 32 The name of a group is limited to this constant number of characters. Thus a name like: "abracadabra_shalamazoom_woosh_and_whirl" is not legal since it is more then 32 characters. Group names can contain any upper or lower case character, any numerals, and most common filename symbols. The name cannot start with a number, and cannot contain the '#' symbol. #define UNRELIABLE_MESS 0x00000001 #define RELIABLE_MESS 0x00000002 #define FIFO_MESS 0x00000004 #define CAUSAL_MESS 0x00000008 #define AGREED_MESS 0x00000010 #define SAFE_MESS 0x00000020 #define REGULAR_MESS 0x0000003f The above define the different types of messages that can be sent by Spread. The first six define the ordering and reliabilty properties of the message.
The REGULAR_MESS is used to identify a data/application message, in contrast to a membership message. #define SELF_DISCARD 0x00000040 If the SELF_DISCARD flag is passed to SP_mulitcast(), then the message will not be delivered to the application connection which sent it. If the application has multiple connections open which have joined the same group then other connections will receive it. #define REG_MEMB_MESS 0x00001000 #define TRANSITION_MESS 0x00002000 #define CAUSED_BY_JOIN 0x00000100 #define CAUSED_BY_LEAVE 0x00000200 #define CAUSED_BY_DISCONNECT 0x00000400 #define CAUSED_BY_NETWORK 0x00000800 #define MEMBERSHIP_MESS 0x00003f00 The above defines specify the types of membership messages as opposed to data messages. The MEMBERSHIP_MESS can be used to select all membership messages. When a membership change occurs each application will receive two membership messages for each group whose membership changed. The first message will be a TRANSITION_MESS which acts as a signal indicating that all messages that arrive after this one and before the REG_MEMB_MESS are 'clean up' from the partition or join such as SAFE messages that need to be delivered before the new membership exists because they come from the old membership. Then the application will receive a REG_MEMB_MESS which will contain all the group membership information and will indicate that the new membership has been established. The types of membership messages an application can receive are:
|