Previous | Table of Contents | Next |
23.4.7.1 The Fault Detector as a Fault Notification Supplier
1. The Replication Manager wishes to monitor an object O1 with reference O1_ref. The object belongs to the fault tolerance domain “acme.com? and object group “1? and location “object_location.? Based on the PULL FaultMonitoringStyle and the location of the object, the Replication Manager chooses a pull-based Fault Detector and informs it to start monitoring the object with the value of the FaultMonitoringInterval given as a property.
2. The pull-based Fault Detector periodically invokes is_alive() on O1_ref.
3. If Object O1 fails to respond to the is_alive() messages of the Fault Detector, the Fault Detector may declare the object to have crashed. It then takes the following actions:
• It creates a StructuredEvent data structure with the following data.
Location object_location;object_location.length(1);object_location[0].id = "myhost.acme.com";object_location[0].kind = "hostname";CosNotification::StructuredEvent fault_event;fault_event.header.fixed_header.event_type.domain_name = "FT_CORBA";fault_event.header.fixed_header.event_type.type_name = "ObjectCrashFault";fault_event.filterable_data.length(4);fault_event.filterable_data[0].name = "FTDomainId";fault_event.filterable_data[0].value <<= "acme.com";fault_event.filterable_data[1].name = "Location";fault_event.filterable_data[1].value <<= object_location;fault_event.filterable_data[2].name = “TypeId?;fault_event.filterable_data[2].value <<= object_type;fault_event.filterable_data[3].name = "ObjectGroupId";fault_event.filterable_data[3].value <<= 1;
• It invokes push_structured_event(fault_event) on the Fault Notifier.
23.4.7.2 The Replication Manager as a Fault Notification Consumer
1. The Replication Manager wishes to be notified when object O1 crashes.
2. The Replication Manager invokes connect_structured_fault_consumer() with a push consumer reference as an in parameter. The Fault Notifier returns a consumer identifier to the Replication Manager.
3. The Replication Manager creates a sequence of event types and their corresponding constraint expressions, as follows:
CosNotification::EventTypeSeq event_types; event_types.length(1); event_types[0].domain_name = "FT_CORBA"; event_types[0].type_name
= "ObjectCrashFault";
const CORBA::string constraint_expr;
constraint_expr = "$FTDomainId == ‘acme.com’ and $ObjectGroupId == 1 and $Location[0].id ==‘myhost.acme.com’";
4. The Replication Manager invokes replace_constraint(consumer_id, event_types, constraint_expr) on the filter object returned in Step 2. The above constraints allow the Replication Manager to register for ObjectCrashFault of a member of object group 1 occurring on host “myhost.acme.com?.
5. When the Replication Manager is no longer interested in fault reports for O1, it invokes replace_constraints() on the filter object with suitable constraint values.
6. If the Replication Manager does not wish to receive any more notifications, it disconnects from the Fault Notifier by invoking disconnect_consumer(c_id) on it.