Main aim of the topic is how client application can continue to perform its scheduled tasks or execute function in case of the Tango Device server is not communicating due to some reason such as network is not accessible or Device-server machine is hang.
I am using CPP/PyTango 9.4.2 , Jtango 9.7.4 versions on Ubuntu 20.04/22.04 LTS platform
I am trying to run a client application which prints device-time (‘devtime’ attribute), and ‘state’ of the Device-server per second. Also receives expected “change-events” per 10 second from the device-server when the ‘counter’ attribute value changes by ten.
- Detailed report and test-code is at GitHub - jkodilkar/TANGO_Communication: Tango Device-Server and Client Communication testing and issues
The test is performed with four cases :
- Case-1 : Device Transparency - True, Device Timeout - Default ( 3 seconds)
- Case-2 : Device Transparency - False, Device Timeout - Default ( 3 seconds)
- Case-3 : Device Transparency - True, Device Timeout - 5 Milli-seconds ( Tuned when DS is disconnected)
- Case-4 : Device Transparency - False, Device Timeout - 5 Milli-seconds ( Tuned when DS is disconnected)
Queries or Issues :
-
In case of the ‘Transparency’ set True using the device proxy in the client program, the Client application hang for five to six minutes when the device-server is disconnected for more than 10 minutes. But in case of ‘Transparency’ set to ‘Fail’, client application don’t hang. In both the cases, Tango DS connection get establish automatically when the network is established. Hence, if exception handled correctly is it safe to have transparency set to ‘fail’ ?
-
In both the Transparency set to Fail or True, the Client Exception after trying to read the state
has interval of 6 to 7 seconds (with default timeout) or 4 to 3 seconds ( Timeout set 5 ms) which is more than the expected by ‘3 to 4’ seconds.
Is it possible to avoid this extra 3 to 4 seconds ? -
After re-connection, two events are received from the device-server. This is unexpected, is it resolved in recent Tango version ( probably recent Tango release 10.1 mentioned about resolving this in case of when the two clients are connected to device-server).
-
To avoid client application hang, which is better way ?
(a) Set transparency to ‘False’ value, and set device timeout to 5 Milli-second when the
device is not communicating, and restore default timeout when it is communicating.
OR
(b) Remove the device-proxy and try for fresh device-proxy to reconnect.
I am uploading the test-report here for your reference.
TangoDS_Comm.pdf (320.6 KB)
Thank you,
Jitendra