Organizing Peers into Logical Member Groups
In a peer-to-peer configuration, you can organize members into logical member groups and use those groups to associate specific data or assign tasks to a pre-defined set of members.
You can use logical member groups to deploy JAR applications across multiple members or to execute functions across a member group.
To add a peer to a member group, you can configure the following:
Add the member group names to the
gemfire.properties
file for the member. For example:#gemfire.properties groups=Portfolios,ManagementGroup1
A member can belong to more than one member group. If specifying multiple member groups for a member, use a comma-separated list. Alternatively, if you are using the
gfsh
command interface to start up the member, provide the group name or group names as a parameter.For example, to start up a server and associate it with member groups, you could type:
gfsh>start server --name=server1 \ --group=Portfolios,ManagementGroup1
For example, to start up a locator and associate it with member groups, you could type:
gfsh>start locator --name=locator1 \ --group=ManagementGroup1
Then you can use the member group names to perform tasks such as deploy applications or execute functions.
For example, to deploy an application across a member group, you could type the following in
gfsh
:gfsh>deploy --jar=group1_functions.jar --group=ManagementGroup1