Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.1, EE 3.0.0
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      ICEpush, mobile network

      Description

      Different network environments have different bandwidth and latency characteristics. Recent testing has shown that the reconnect latency on a 3G network can vary from 1.5s - 6s. To account for this, the reconnect timeout should be adaptive.

        Issue Links

          Activity

          Hide
          Ted Goddard added a comment -

          Algorithm to maintain the running average reconnect time T.
          If the most recent reconnect request T1 is within 2 x T, set T1 = max(T1, 0.5s) T = (T1 + T)/2
          If the reconnect request does not arrive within 2 x T, leave T unchanged and switch to cloud push.

          Show
          Ted Goddard added a comment - Algorithm to maintain the running average reconnect time T. If the most recent reconnect request T1 is within 2 x T, set T1 = max(T1, 0.5s) T = (T1 + T)/2 If the reconnect request does not arrive within 2 x T, leave T unchanged and switch to cloud push.
          Hide
          Ted Goddard added a comment -

          Adaptive heartbeat should be verified at the same time as this feature.

          Show
          Ted Goddard added a comment - Adaptive heartbeat should be verified at the same time as this feature.
          Hide
          Ted Goddard added a comment -

          It should be possible for the recent logging code added to ThreadBlockingAdaptingServlet to share code with this feature.

          Show
          Ted Goddard added a comment - It should be possible for the recent logging code added to ThreadBlockingAdaptingServlet to share code with this feature.
          Hide
          Mircea Toma added a comment -

          Introduced mechanism for automatically adjusting the connection recreation timeout. The adjusting algorithm is based on the current response-request delay.
          Also when duplicate blocking requests are detected the timeout value is reverted to the previous one since these duplicate requests can extend excessively the calculated delay. The duplicate requests occur during page reload or navigating away from the page and then returning back before the server decides to sever the connection.

          Show
          Mircea Toma added a comment - Introduced mechanism for automatically adjusting the connection recreation timeout. The adjusting algorithm is based on the current response-request delay. Also when duplicate blocking requests are detected the timeout value is reverted to the previous one since these duplicate requests can extend excessively the calculated delay. The duplicate requests occur during page reload or navigating away from the page and then returning back before the server decides to sever the connection.
          Hide
          Mircea Toma added a comment -

          The adaptive heartbeat is working as expected. The only influence that the adaptive heartbeat has on the reconnect timeout adjusting is that the calculations are made at increasingly wider intervals, in the case of a idle application.

          Show
          Mircea Toma added a comment - The adaptive heartbeat is working as expected. The only influence that the adaptive heartbeat has on the reconnect timeout adjusting is that the calculations are made at increasingly wider intervals, in the case of a idle application.
          Hide
          Ted Goddard added a comment -

          Unfortunately, real world testing showed the adaptive timeout to be far to adaptive. It was not unusual to see fairly long strings of low latency values (which the algorithm quickly converged on) followed by a substantially higher latency. The algorithm has been modified as follows to never adjust up or down by too much, and to always give much more weight to the current value:

          responseDelay = Math.max(responseDelay,
          (connectionRecreationTimeout * 4) / 5);
          responseDelay = Math.min(responseDelay,
          (connectionRecreationTimeout * 3) / 2);
          responseDelay = Math.max(responseDelay, 500);

          connectionRecreationTimeout =
          (responseDelay + (connectionRecreationTimeout * 4)) / 5;

          Show
          Ted Goddard added a comment - Unfortunately, real world testing showed the adaptive timeout to be far to adaptive. It was not unusual to see fairly long strings of low latency values (which the algorithm quickly converged on) followed by a substantially higher latency. The algorithm has been modified as follows to never adjust up or down by too much, and to always give much more weight to the current value: responseDelay = Math.max(responseDelay, (connectionRecreationTimeout * 4) / 5); responseDelay = Math.min(responseDelay, (connectionRecreationTimeout * 3) / 2); responseDelay = Math.max(responseDelay, 500); connectionRecreationTimeout = (responseDelay + (connectionRecreationTimeout * 4)) / 5;

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: