The global group function makes it possible to group the nodes
in a system into partitions, each partition having its own global
name space, refer to
The main advantage of dividing systems to global groups is that the background load decreases while the number of nodes to be updated is reduced when manipulating globally registered names.
The Kernel configuration parameter
{global_groups, [GroupTuple :: group_tuple()]}
For the processes and nodes to run smoothly using the global group functionality, the following criteria must be met:
An instance of the global group server,
All involved nodes must agree on the global group definition, or the behavior of the system is undefined.
All nodes in the system should belong to exactly one global group.
In the following description, a group node is a node belonging to the same global group as the local node.
A
A node started with the command line flag
A global group defined with
A registered name.
Returns a tuple containing the name of the global group
the local node belongs to, and the list of all other known
group names. Returns
Returns a list containing information about the global groups. Each element of the list is a tuple. The order of the tuples is not defined.
If the local node is part of a global group,
The name (atom) of the group that the local node belongs to.
A list of node names (atoms), the group nodes.
A list of node names, the group nodes currently synchronized with the local node.
A list of node names, the group nodes with which the local node has failed to synchronize.
A list of node names, the group nodes to which there are currently no connections.
A list of pids, specifying the processes which have
subscribed to
Depending on
A process which has subscribed will receive the messages
Returns the names of all group nodes, regardless of their current status.
Returns a list of all names which are globally registered on the specified node or in the specified global group.
Searches for
If
Synchronizes the group nodes, that is, the global name servers on the group nodes. Also check the names globally registered in the current global group and unregisters them on any known node not part of the group.
If synchronization is not possible, an error report is sent
to the error logger (see also
Failure:
Searches for
If
In the situation where a node has lost its connections to other nodes in its global group, but has connections to nodes in other global groups, a request from another global group may produce an incorrect or misleading result. For example, the isolated node may not have accurate information about registered names in its global group.
Note also that the
Distribution of applications is highly dependent of the global group definitions. It is not recommended that an application is distributed over several global groups of the obvious reason that the registered names may be moved to another global group at failover/takeover. There is nothing preventing doing this, but the application code must in such case handle the situation.