AE connection resilience via Java APIs

Discussion created by Michael_Lowry on Feb 28, 2017
Latest reply on Mar 2, 2017 by Michael_Coxson_5769
We have a couple of apps that use the Automation Engine Java Application Interface to interact with our Automation Engine servers. We are interested in learning how best to manage the connections between the apps and the AE so that these connections are resilient and fault-tolerant. Specifically, we would like to achieve the following:
  1. The app can get an up-to-date CP list from the AE server.
  2. The app maintains a pool of connections with all CPs on all AE nodes of the AE system.
  3. The app periodically checks the health of each connection, and is able to detect changes in the status of individual CP connections.
  4. Upon loss of connectivity with a CP, the app automatically attempts to reconnect at regular intervals.
  5. The app falls back gracefully to other CPs if some CPs are unavailable.
  6. Individual AE nodes can be switched to maintenance mode in the app; the app will not attempt to establish connections to CPs on these nodes.
Right now, we use the Connection class to establish connections. We have built some rudimentary resilience into our apps, but have not yet met all of the requirements listed above. Based on the description, we see that the new (in v11) class AEConnectionPool might be useful for implementing the requirements above. None of the code samples I have seen use this class though.

Has anyone else faced similar challenges? If so, how have you addressed them? Does anyone use the AEConnectionPool class? If so, how?