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

          Ted Goddard created issue -
          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.
          Ted Goddard made changes -
          Field Original Value New Value
          Assignee Mircea Toma [ mircea.toma ]
          Ted Goddard made changes -
          Salesforce Case []
          Fix Version/s EE 3.0.0 [ 10322 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28210 Wed Mar 07 13:32:20 MST 2012 mircea.toma PUSH-164 Introduced mechanism for automatically adjusting the connection recreation timeout. The adjusting algorithm is based on the current response-request delay.
          Files Changed
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/BlockingConnectionServer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28211 Wed Mar 07 13:37:41 MST 2012 mircea.toma PUSH-164 Update library.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/lib/icepush.jar
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28212 Wed Mar 07 13:38:02 MST 2012 mircea.toma PUSH-164 Update library.
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/lib/icepush.jar
          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.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          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.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28236 Thu Mar 08 14:37:58 MST 2012 ted.goddard updated to icepush.jar revision 28235 (PUSH-164)
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/lib/icepush.jar
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28258 Fri Mar 09 15:14:35 MST 2012 ted.goddard modified adaptive reconnect algorithm with more inertia (PUSH-164)
          Files Changed
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/BlockingConnectionServer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28261 Fri Mar 09 15:38:45 MST 2012 ted.goddard updated to icepush.jar revision 28258 (PUSH-164)
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/lib/icepush.jar
          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;
          Ted Goddard made changes -
          Salesforce Case []
          Security Private [ 10001 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28278 Mon Mar 12 11:04:42 MDT 2012 ted.goddard using FINE logging for anticipated cloud push (PUSH-164)
          Files Changed
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/BlockingConnectionServer.java
          Ted Goddard made changes -
          Salesforce Case []
          Security Private [ 10001 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 3.0.1 [ 10311 ]
          Ted Goddard made changes -
          Link This issue blocks MOBI-177 [ MOBI-177 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: