Host-Aware Replication

With host-aware replication, you group seeders based upon their member names.

To organize seeders into groups, use member names of the form:

<group_name>.<member_name>

ActiveSpaces groups all seeders with the same group_name together and their data will is replicated on seeders outside of that group.

Note: You can group any seeder in this way. You can set implement host-aware replication for ActiveSpaces applications run as seeders as well as as-agents that you start as seeders.

You can set up host aware replication in several ways:

By using the TIBCO ActiveSpaces API functions in your application to set up a MemberDef that specifies a member name using the host-aware replication naming convention.

See Using the ActiveSpaces API Set to Implement Host-Aware Replication

By using the as-admin utility.

By starting as-agents that run as seeders and using the as-agent -name parameter to set up member names that use the host-aware replication naming convention.

For more information on setting up host-aware replication using as-agent, refer to the TIBCO ActiveSpaces Administration Guide.

Using the ActiveSpaces API Set to Implement Host-Aware Replication

The following examples show how to set the member name in the MemberDef object for each of the API sets:

Java API

MemberDef memberDef = MemberDef.Create();
memberDef.setMemberName = “mymachinename.seeder_n”;

C API

tibasMemberDef memberDef;
tibasMemberDef_Create(&memberDef);
tibasMemberDef_SetMemberName(memberDef, “mymachinename.seeder_n”);

.NET API

MemberDef memberDef = MemberDef.Create();
memberDef.MemberName = “mymachinename.seeder_n”;
Note: If using the ActiveSpaces examples, the member name is specified on the command line using the -member_name command line parameter.

The type of replication for a space can be set or queried using the SpaceDef object’s setSyncReplicated and isSyncReplicated methods, respectively. Those methods take and return a boolean and the default value is false, that is, asynchronous replication.

Attention: The APIs that helps you disable host-aware replication is deprecated from 2.1.6.