ICEpush
  1. ICEpush
  2. PUSH-205

Optimization for mobile connection limitations

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: EE-3.2.0.GA, 3.3
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      ICEpush, ICEmobile
    • Assignee Priority:
      P1

      Description

      In the mediacast application we observe GET requests for dynamically updated images stuck behind the blocking request. This behaviour occurs on iOS and potentially other browsers and may be due to connection limits of the mobile devices.

        Issue Links

          Activity

          Ted Goddard created issue -
          Ted Goddard made changes -
          Field Original Value New Value
          Assignee Ted Goddard [ ted.goddard ]
          Hide
          Ted Goddard added a comment -

          Testing with Safari mobile vs Safari desktop definitely shows fewer connections being used by the mobile browser (typically 2 vs 6). However, this is not strict, as during the initial page load, several connections are used by Safari mobile. Perhaps the mobile browser takes the strategy of using several connections to load the page and then backs off to fewer connections. Safari desktop has no such back-off strategy.

          Show
          Ted Goddard added a comment - Testing with Safari mobile vs Safari desktop definitely shows fewer connections being used by the mobile browser (typically 2 vs 6). However, this is not strict, as during the initial page load, several connections are used by Safari mobile. Perhaps the mobile browser takes the strategy of using several connections to load the page and then backs off to fewer connections. Safari desktop has no such back-off strategy.
          Ted Goddard made changes -
          Attachment slow-image.pcap [ 15096 ]
          Hide
          Ted Goddard added a comment -

          The attached wireshark capture illustrates the problem:

          24 - 27 seconds image is uploaded and response is received (port 55905)
          40 seconds noop response received for listen.icepush (port 55898)
          40 seconds GET for new image on listen.icepush socket (port 55898)

          Ideally, the browser would have used port 55905 for fetching the image, but since it did not, a substantial delay was introduced.

          Show
          Ted Goddard added a comment - The attached wireshark capture illustrates the problem: 24 - 27 seconds image is uploaded and response is received (port 55905) 40 seconds noop response received for listen.icepush (port 55898) 40 seconds GET for new image on listen.icepush socket (port 55898) Ideally, the browser would have used port 55905 for fetching the image, but since it did not, a substantial delay was introduced.
          Ted Goddard made changes -
          Assignee Ted Goddard [ ted.goddard ] Jack Van Ooststroom [ jack.van.ooststroom ]
          Hide
          Ted Goddard added a comment -

          Note that this appears to be a specific problem for iOS, android does not appear to be affected.

          Show
          Ted Goddard added a comment - Note that this appears to be a specific problem for iOS, android does not appear to be affected.
          Ted Goddard made changes -
          Link This issue blocks MOBI-382 [ MOBI-382 ]
          Ken Fyten made changes -
          Assignee Priority P1 [ 10010 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #33000 Wed Jan 09 07:37:14 MST 2013 jack.van.ooststroom Partial Fix for JIRA PUSH-205 : Optimization for mobile connection limitations
          Files Changed
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/PushGroupManager.java
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/LocalPushGroupManager.java
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/NoopPushGroupManager.java
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/PushContext.java
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/BlockingConnectionServer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #33005 Wed Jan 09 09:42:11 MST 2013 mircea.toma PUSH-205 Modified BlockingConnectionServer to send 'back-off' XML message instead of X-Connection-Backoff header since this is a command in itself not data sent along with every response. Implemented back-off functionality in bridge.
          Files Changed
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/javascript/application.js
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/BlockingConnectionServer.java
          Hide
          Jack Van Ooststroom added a comment -

          Sending icepush-ee/core/src/main/java/org/icepush/BlockingConnectionServer.java
          Sending icepush-ee/core/src/main/java/org/icepush/LocalPushGroupManager.java
          Sending icepush-ee/core/src/main/java/org/icepush/NoopPushGroupManager.java
          Sending icepush-ee/core/src/main/java/org/icepush/PushContext.java
          Sending icepush-ee/core/src/main/java/org/icepush/PushGroupManager.java
          Transmitting file data .....
          Committed revision 33000.

          Sending icepush-ee/eps/src/main/java/com/icesoft/push/DynamicPushGroupManager.java
          Sending icepush-ee/eps/src/main/java/com/icesoft/push/RemotePushGroupManager.java
          Sending icepush-ee/eps/src/main/java/com/icesoft/push/messaging/MessagePayload.java
          Sending icepush-ee/eps/src/main/java/com/icesoft/push/messaging/PushMessageService.java
          Transmitting file data ....
          Committed revision 33254.

          Show
          Jack Van Ooststroom added a comment - Sending icepush-ee/core/src/main/java/org/icepush/BlockingConnectionServer.java Sending icepush-ee/core/src/main/java/org/icepush/LocalPushGroupManager.java Sending icepush-ee/core/src/main/java/org/icepush/NoopPushGroupManager.java Sending icepush-ee/core/src/main/java/org/icepush/PushContext.java Sending icepush-ee/core/src/main/java/org/icepush/PushGroupManager.java Transmitting file data ..... Committed revision 33000. Sending icepush-ee/eps/src/main/java/com/icesoft/push/DynamicPushGroupManager.java Sending icepush-ee/eps/src/main/java/com/icesoft/push/RemotePushGroupManager.java Sending icepush-ee/eps/src/main/java/com/icesoft/push/messaging/MessagePayload.java Sending icepush-ee/eps/src/main/java/com/icesoft/push/messaging/PushMessageService.java Transmitting file data .... Committed revision 33254.
          Hide
          Jack Van Ooststroom added a comment - - edited

          Upon invoking the PushContext.backOff(String browserID, long delay) method a <noop /> response is send to the JavaScript bridge containing a new X-Connection-Backoff HTTP extension header containing the delay in milliseconds. The JavaScript bridge should use this value to wait for the specified milliseconds before sending the following listen.icepush request.

          Show
          Jack Van Ooststroom added a comment - - edited Upon invoking the PushContext.backOff(String browserID, long delay) method a <noop /> response is send to the JavaScript bridge containing a new X-Connection-Backoff HTTP extension header containing the delay in milliseconds. The JavaScript bridge should use this value to wait for the specified milliseconds before sending the following listen.icepush request.
          Hide
          Mircea Toma added a comment - - edited

          Modified BlockingConnectionServer to send 'back-off' XML message instead of X-Connection-Backoff header since this is a command in itself not data sent along with every response, also the client side implementation is much clearer and simpler. Implemented back-off functionality in bridge which pauses and then resumes connection after the specified delay.

          Show
          Mircea Toma added a comment - - edited Modified BlockingConnectionServer to send 'back-off' XML message instead of X-Connection-Backoff header since this is a command in itself not data sent along with every response, also the client side implementation is much clearer and simpler. Implemented back-off functionality in bridge which pauses and then resumes connection after the specified delay.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #33016 Wed Jan 09 18:07:10 MST 2013 ted.goddard make use of pushContext.backOff to improve page updates on iOS which required icepush.jar from trunk revision 33015 and icefaces.jar from trunk revision 33014 (PUSH-205)
          Files Changed
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/component/src/org/icemobile/impl
          Commit graph MODIFY /icemobile/trunk/icemobile/lib/icepush.jar
          Commit graph MODIFY /icemobile/trunk/icemobile/lib/icefaces.jar
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/component/src/org/icemobile/impl/application/PushBackOffPhaseListener.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/icefaces.ace/META-INCLUDE/faces-config.xml
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/component/src/org/icemobile/impl/application
          Hide
          Ted Goddard added a comment -

          A PushBackOffPhaseListener has been added to ICEmobile which delays ICEpush listen for 300ms after each JSF render. Initial testing shows responsive page updates in mediacast.

          Show
          Ted Goddard added a comment - A PushBackOffPhaseListener has been added to ICEmobile which delays ICEpush listen for 300ms after each JSF render. Initial testing shows responsive page updates in mediacast.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #33028 Thu Jan 10 14:17:36 MST 2013 ted.goddard make use of pushContext.backOff to improve page updates on iOS which required icepush.jar from trunk revision 33015 and icefaces.jar from trunk revision 33014 (PUSH-205)
          Files Changed
          Commit graph MODIFY /icemobile/branches/icemobile-1.2.0-191212/icemobile/jsf/components/component/resources/icefaces.ace/META-INCLUDE/faces-config.xml
          Commit graph ADD /icemobile/branches/icemobile-1.2.0-191212/icemobile/jsf/components/component/src/org/icemobile/impl
          Commit graph ADD /icemobile/branches/icemobile-1.2.0-191212/icemobile/jsf/components/component/src/org/icemobile/impl/application/PushBackOffPhaseListener.java
          Commit graph ADD /icemobile/branches/icemobile-1.2.0-191212/icemobile/jsf/components/component/src/org/icemobile/impl/application
          Hide
          Ted Goddard added a comment -

          <back-off/> is not being sent under all expected conditions: it seems that if the client was recently notified, there is no <back-off/> response sent even though PushContext.backOff() is invoked.

          Show
          Ted Goddard added a comment - <back-off/> is not being sent under all expected conditions: it seems that if the client was recently notified, there is no <back-off/> response sent even though PushContext.backOff() is invoked.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #33052 Mon Jan 14 11:05:09 MST 2013 jack.van.ooststroom Fixed JIRA PUSH-205 : Optimization for mobile connection limitations; Ensured that backOff is always send.
          Files Changed
          Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/BlockingConnectionServer.java
          Hide
          Jack Van Ooststroom added a comment -

          The BlockingConnectionServer now has a private respondIfBackOffRequested() method which is invoked upon backOff(...) method invocation and whenever an incoming listen.icepush request comes in. Upon backOff(...) invocation it stores the requested delay and tries to send a respond, which if successful removes the requested delay and if unsuccessful leaves the requested delay as is. Upon an incoming listen.icepush it will always invoke the respondIfBackOffRequested() method and if there's a pending requested delay, it tries to send a respond.

          Marking this one as FIXED.

          Show
          Jack Van Ooststroom added a comment - The BlockingConnectionServer now has a private respondIfBackOffRequested() method which is invoked upon backOff(...) method invocation and whenever an incoming listen.icepush request comes in. Upon backOff(...) invocation it stores the requested delay and tries to send a respond, which if successful removes the requested delay and if unsuccessful leaves the requested delay as is. Upon an incoming listen.icepush it will always invoke the respondIfBackOffRequested() method and if there's a pending requested delay, it tries to send a respond. Marking this one as FIXED.
          Jack Van Ooststroom made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s 3.3 [ 10374 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Jack Van Ooststroom
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: