How to make TIBCO Adapter instance run in Fault Tolerance mode via the Hawk Rulebase.

How to make TIBCO Adapter instance run in Fault Tolerance mode via the Hawk Rulebase.

book

Article ID: KB0085801

calendar_today

Updated On:

Products Versions
TIBCO Hawk -
Not Applicable -

Description

Resolution:
Description:
============
Some TIBCO Adapters, such as Adapter for Database, do support Fault Tolerance (FT). But most TIBCO Adapters do not. This article tells how to make TIBCO Adapter instances (which do not support Fault Tolerance) run in Fault Tolerance mode through Hawk Rulebase.


Resolution:
==========
This can be done by way of Hawk rulebases. Note this is just a workaround, full FT may not achieved.

Attached is a set of rulebases (Filename:hrb.zip) that will help you run two Adapter instances deployed on different machines in Fault tolerant mode. Note that the attached rulebases are basic and written for TIBCO BusinessWorks (BW) engines. These can be modified for Adapters by just changing the microagent name. Add other validations based on your requirements. The function of each rulebase and its relation with other rulebases are explained below.  

The following four rulebases should be loaded in each of the two machines hosting the Adapter instances. You will be using the HawkEvent microagent’s onAlert method in these rulebases so you need to have the TIBCO Hawk Event Service running.

Rulebases:

1). "Controller" rulebase does two actions as soon as it receives the alerts generated when the Adapter running on the same machine shuts down. This rulebase is always active.

   a).  It unloads the "alertstopped" rulebase. This "alertstopped" rulebase is active only when an engine is running on that machine. The purpose of the "alertstopped" rulebase is to send an alert (STOPPED-A) of an Adapter shutting down to "Controller" rulebase.

   b). Sends an alert (STOPPED) to the other machine to start the Adapter on it.

2). "ControllerA" rulebase receives and reacts to (STOPPED) alert from the other machine and starts the Adapter on the current machine. It is always active.

3). The "alertStarted" rulebase waits for the engine startup and is always active. It sends out the engine startup alert and loads the "alertstopped" rulebase as soon as it sees an engine running on its machine. The "alertStarted" rulebase activates the "alertstopped" rulebase.

4). The "alertstopped" rulebase is active only when an engine is running on that machine. The purpose of the "alertstopped" rulebase is to send an alert (STOPPED-A) indicating a shut down of the Adapter to the "Controller" rulebase.


Attachments:
===========
Hrb.zip -- demo rulebase files contained. 8 rulebases (4 on each machine).

Issue/Introduction

How to make TIBCO Adapter instance run in Fault Tolerance mode via the Hawk Rulebase.

Attachments

How to make TIBCO Adapter instance run in Fault Tolerance mode via the Hawk Rulebase. get_app