Previous | Table of Contents | Next |
23.3.11.1 Infrastructure-Controlled Membership Style
1. The application obtains a reference to the Replication Manager by invoking resolve_initial_references() and narrowing the result.
2. To create a replicated object (object group), the application invokes the create_object() operation of the GenericFactory interface inherited by the Replication Manager, supplying the type_id and the_criteria. The create_object() operation returns (at Step 11) the object group reference and the object group identifier as the factory_creation_id, which is recorded by the application to permit it to subsequently request the GenericFactory to delete the object group.
3. The Replication Manager obtains the fault tolerance properties for the object group from the Property Manager of the type defined by the type_id parameter. If additional fault tolerance properties are defined in an entry named org.omg.ft.FTProperties of the_criteria parameter, those properties override the properties obtained from the Property Manager.
4. Using the InitialNumberReplicas property and the Factories property (a sequence of factory, location at which the factory is to create the object and criteria that the factory is to use in creating the object), the Replication Manager decides the locations at which to create the members of the object group.
5. For each member, the Replication Manager invokes the create_object() operation of the GenericFactory interface of the requisite factory provided by the application for the location of the member, passing in as parameters the type_id and the_criteria obtained from the Factories property, as shown in Figure 23-5 on page 23-63. The operation returns the reference of the member and its factory_creation_id, which is unique within the context of the factory. The factory and the Replication Manager record this information to allow the Replication Manager to invoke the delete_object() operation of the GenericFactory interface of the same local factory to delete the member subsequently.
6. The Replication Manager determines the identifier of the object group, and constructs the TAG_FT_GROUP component containing the fault tolerance domain identifier, the object group identifier and the object group version that allow the object group to be addressed. The Replication Manager then constructs the object group reference.
8. The Replication Manager records the object group reference for the object group against the object group identifier.
10. For the COLD_PASSIVE or WARM_PASSIVE Replication Styles, the Replication Manager determines the primary member of the group and includes the TAG_FT_PRIMARY component in the profile for that member.
11. The Replication Manager returns to the application the object group reference for the object group, as constructed in Step 7, and the object_group_id as the out parameter, factory_creation_id, of the create_object() operation.
7. For each gateway:
a. The Replication Manager constructs a TAG_INTERNET_IOP profile for the gateway containing its host and port, and a TAG_FT_GROUP component that allows the object group to be addressed. b. The Replication Manager then augments the object group reference with the gateway profile.
9. For each member:
a. The Replication Manager adds the member to the object group. b. Depending on the Replication Style, the Replication Manager activates the member. c. The Replication Manager checks the Replication Style, Fault Monitoring Style, Fault Monitoring Granularity to determine whether to initiate fault monitoring of the member. d. The Replication Manager registers itself, or a fault consumer object that it has created, with the Fault Notifier to receive notifications of faults for the member.
Applicationcreate_object()ReferenceReplication ManagerGeneric Factory![]() Property Managercreate_object()Invoked byReplicationManager onFactory ObjectsFaultNotifier |
|||||
G1 | |||||
Object Group | Gateway | ||||
G1 | G2 | S | |||
G2 | |||||
Gateway | |||||
Host | Host | ||||
H2 | H3 | ||||
Object Replica | Object Replica | ||||
![]() |
![]() |
||||
S1 |
![]() |
S2 |
![]() |
||
Factory | Fault Monitor | Factory | Fault Monitor | ||
ORB | ORB |
Figure 23-5 The Creation of an Object Group with the Infrastructure-Controlled MembershipStyle.
23.3.11.2 Application-Controlled Membership Style
1. The application obtains a reference to the Replication Manager by invoking resolve_initial_references().
2. The application obtains the fault tolerance properties from the Property Manager, including the InitialNumberReplicas.
3. To create a replicated object (object group), the application invokes the create_object() operation of the GenericFactory interface inherited by the Replication Manager, supplying the type_id and the_criteria , as shown in Figure 23-5.
4. The Replication Manager determines the identifier of the object group, and constructs the TAG_FT_GROUP component containing the fault tolerance domain identifier, the object group identifier and the object group version. The Replication Manager then constructs the object group reference, containing the TAG_MULTIPLE_COMPONENTS profile with the TAG_FT_GROUP component in it.
5. The Replication Manager returns to the application, as the reply to create_object(), the object group reference and the object group identifer as the factory_creation_id, which allows the application to delete the object group subsequently.
6. For each member:
a. If the application has already created the object that is to become the member, the application invokes the add_member() operation of the ObjectGroupManager interface, citing the object group reference, location and member reference. b. If instead the application wants the infrastructure to create the member, the application invokes the create_member() operation of the ObjectGroupManager interface, citing the object group reference, location, type_id and the_criteria , as shown in Figure 23-6 on page 23-65.
The Replication Manager obtains the object reference for the factory, the_location, and the_criteria from the Factories property.
The Replication Manager takes the_criteria passed to it by create_member(), appends the property with the name org.omg.ft.ObjectLocation
and the_location value passed to it by create_member(), and appends the_criteria from the Factories property for the particular
location. It then invokes the create_object() operation of the GenericFactory interface of the factory provided by the application
to create a member at that location, passing in the type_id and the_criteria.
The factory returns the object reference and the factory_creation_id for the new member, and records this identification information.
The Replication Manager records the factory_creation_id, which allows it subsequently to invoke the delete_object() operation
of the GenericFactory interface of the local factory to delete the member.
c. The Replication Manager constructs a new object group reference, taking the new member into account. The new object group reference may be the same as the existing object group reference.
d. The Replication Manager checks the FaultMonitoringStyle, FaultMonitoringGranularity, and FaultMonitoringInterval properties and initiates monitoring of the new member.
e. The Replication Manager registers itself, or a fault consumer object that it has created, with the Fault Notifier to receive fault reports about the new member.
f. The Replication Manager returns the new object group reference to the application in case (a) as the return value of add_member() and in case (b) as the return value of create_member().
7. For the COLD_PASSIVE or WARM_PASSIVE Replication Managers, the application determines which of the members is to be the
primary and invokes the set_primary_member() operation of the ObjectGroupManager interface. The Replication Manager puts the
TAG_FT_PRIMARY component in the appropriate profile of the object group reference and returns the object group reference to
the application as the return value of set_primary_member().
Application
Application requeststhe creation of a memberat location Host H3
create_ member()
Replication Manager Generic Factory
Object Group
PropertyManager![]() FaultNotifier |
Object |
Reference |
|||
Group Manager | S1 | S2 | S | ||
create_ object() Invoked by | Host H2 | Host H3 | |||
Replication | |||||
Manager on | |||||
Factory Object | Object Replica | Object Replica | |||
S1 | S2 | ||||
Fault Monitor | Factory | ||||
ORB |
Figure 23-6 The Creation of a Member of an Object Group with the Application-Controlled Membership Style.
23.3.11.3 Unreplicated Object Creation and Deletion
Creation
1. The application obtains a reference to the local factory.
2. The application invokes the create_object() operation of the GenericFactory interface of the local factory, supplying the type_id and the_criteria.
3. The factory creates the object and returns the object reference and the factory_creation_id to the application, as the result of create_object(). The factory_creation_id is unique within the context of the factory. The application and the factory record this identification information, which they can use subsequently to delete the object.
Deletion
1. The application invokes the delete_object() operation of the GenericFactory interface of the local factory, supplying the factory_creation_id.
2. The factory associates the factory_creation_id with the recorded information and deletes the object.