Handle FTA instantiation failure

Details

Description

With the current setup we cannot handle FTA instantiation failure. For e.g. Lets say the HFTA could not be initialized, then it never announces itself and hence the java process can never identify that we are in an error state.

Note : The above issue occurred on my MAC because of too many GSTool processes in memory, which were occupying all of the available shared memory. Hence a new FTA could not be instantiated

Proposed solution:

Option I

Always register the FTA. Since an external process is responsible for making all the calls to the discover server, it can register for the FTA.

Option II (less preferred)

Add an additional call to share the number of pings to expect. The discovery server will expect the number of expected pings to be shared at a new REST end-point. The java program can then check if the correct number of processes have registered to detect a failure state. (Assumption : At runtime, we can evaluate the number of FTAs and GSEXITs expected to run.)

The drawback with this approach is that it will rely on a timeout to check the number of processes registered. On a slow machine a small timeout may fail, while on fast machines a big timeout would mean that it takes longer to detect failure.