ICEfaces
  1. ICEfaces
  2. ICE-2776

Delay in asynchronous updates on Glassfish with grizzly async configured

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7Beta1
    • Fix Version/s: 1.7RC1, 1.7
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      glassfish-installer-v2ur1-b09d-windows

      Description

      1)Grizzly async push works fine(clocks ticking on auction monitor) when user has only one window open.
      2)When two users login to chat and one user tries to interact with the other by sending messages or putting bid amounts, a visible delay is seen (clocks stop ticking for few seconds) on the second users window.

        Issue Links

          Activity

          Hide
          Ted Goddard added a comment -

          This appears to be caused by the change from bridge/src/connection.js (revision 15520).
          Perhaps our Grizzly integration is returning an empty response when not expected by the JS bridge.

          Show
          Ted Goddard added a comment - This appears to be caused by the change from bridge/src/connection.js (revision 15520). Perhaps our Grizzly integration is returning an empty response when not expected by the JS bridge.
          Hide
          Ted Goddard added a comment -

          Making the following change appears to resolve the problem:

          — ../bridge/src/connection.js (revision 15866)
          +++ ../bridge/src/connection.js (working copy)
          @@ -49,7 +49,7 @@
          }

          This.Receive = function(response)

          { - return response.isOkAndComplete() && response.content() != ''; + return response.isOkAndComplete(); }

          This.Ok = function(response) {

          Show
          Ted Goddard added a comment - Making the following change appears to resolve the problem: — ../bridge/src/connection.js (revision 15866) +++ ../bridge/src/connection.js (working copy) @@ -49,7 +49,7 @@ } This.Receive = function(response) { - return response.isOkAndComplete() && response.content() != ''; + return response.isOkAndComplete(); } This.Ok = function(response) {
          Hide
          Ted Goddard added a comment -

          Is the test for an empty response necessary for the Portlet fix?

          Show
          Ted Goddard added a comment - Is the test for an empty response necessary for the Portlet fix?
          Hide
          Mircea Toma added a comment -

          I think Firefox would go into a infinite loop trying to create a blocking connection. This can happen when a session expires and the server responds with empty requests.

          Show
          Mircea Toma added a comment - I think Firefox would go into a infinite loop trying to create a blocking connection. This can happen when a session expires and the server responds with empty requests.
          Hide
          Ted Goddard added a comment -

          Can the server respond with an error during session expiry?

          Show
          Ted Goddard added a comment - Can the server respond with an error during session expiry?
          Hide
          Mircea Toma added a comment -

          Changes made after ICE-2606 fixes have made the test for empty request useless.

          Show
          Mircea Toma added a comment - Changes made after ICE-2606 fixes have made the test for empty request useless.
          Hide
          Mircea Toma added a comment -

          More specifically ICE-1899 fixed the tight loop problem we've been seeing.

          Show
          Mircea Toma added a comment - More specifically ICE-1899 fixed the tight loop problem we've been seeing.
          Hide
          Mandeep Hayher added a comment -

          Revision: 15968
          Although there is significant improvement but a delay of 2-3 seconds is still seen on the clocks on both windows.

          Show
          Mandeep Hayher added a comment - Revision: 15968 Although there is significant improvement but a delay of 2-3 seconds is still seen on the clocks on both windows.
          Hide
          Mircea Toma added a comment -

          I cannot see any delay when running on Glassfish 9.1_01 on Mac.

          Show
          Mircea Toma added a comment - I cannot see any delay when running on Glassfish 9.1_01 on Mac.
          Hide
          Mandeep Hayher added a comment -

          Also see following javascript errors on the second window when the first window is closed.

          $A is not defined
          (no name)()ice-extras.js (line 5856)
          these()icefaces-d2d.js (line 193)
          [Break on this error] return _29.apply(_2b,_2a.concat($A(arguments)));
          icefaces-d2d.js (line 150)
          $A is not defined
          [Break on this error] return _29.apply(_2b,_2a.concat($A(arguments)));
          icefaces-d2d.js (line 150)
          $A is not defined
          [Break on this error] return _29.apply(_2b,_2a.concat($A(arguments)));
          icefaces-d2d.js (line 150)
          $A is not defined
          [Break on this error] return _29.apply(_2b,_2a.concat($A(arguments)));

          Show
          Mandeep Hayher added a comment - Also see following javascript errors on the second window when the first window is closed. $A is not defined (no name)()ice-extras.js (line 5856) these()icefaces-d2d.js (line 193) [Break on this error] return _29.apply(_2b,_2a.concat($A(arguments))); icefaces-d2d.js (line 150) $A is not defined [Break on this error] return _29.apply(_2b,_2a.concat($A(arguments))); icefaces-d2d.js (line 150) $A is not defined [Break on this error] return _29.apply(_2b,_2a.concat($A(arguments))); icefaces-d2d.js (line 150) $A is not defined [Break on this error] return _29.apply(_2b,_2a.concat($A(arguments)));
          Hide
          Mircea Toma added a comment -

          Refactor XMLHttpRequest callbacks to not make use of any library.

          Show
          Mircea Toma added a comment - Refactor XMLHttpRequest callbacks to not make use of any library.
          Hide
          Mircea Toma added a comment -

          This issue needs to be re-tested with the fix for ICE-2842.

          Show
          Mircea Toma added a comment - This issue needs to be re-tested with the fix for ICE-2842 .
          Hide
          Mircea Toma added a comment -

          According to this ( http://weblogs.java.net/blog/jfarcand/archive/2007/01/configuring_gri.html ) we need to change a few configuration parameters in domain.xml file to have a responsive Ajax application.

          Mainly we should change these values:

          • change jvm option
            <jvm-options>-server</jvm-options>
          • add jvm option
            <jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>
          • change 'thread-count' related attributes
            <request-processing header-buffer-length-in-bytes="8192" initial-thread-count="10"
            request-timeout-in-seconds="30" thread-count="130" thread-increment="10"/>
          • increment number of acceptor threads to match number of processors/cores
            <http-listener id="http-listener-1" address="0.0.0.0" port="8080" acceptor-threads="2".....
          Show
          Mircea Toma added a comment - According to this ( http://weblogs.java.net/blog/jfarcand/archive/2007/01/configuring_gri.html ) we need to change a few configuration parameters in domain.xml file to have a responsive Ajax application. Mainly we should change these values: change jvm option <jvm-options>-server</jvm-options> add jvm option <jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options> change 'thread-count' related attributes <request-processing header-buffer-length-in-bytes="8192" initial-thread-count="10" request-timeout-in-seconds="30" thread-count="130" thread-increment="10"/> increment number of acceptor threads to match number of processors/cores <http-listener id="http-listener-1" address="0.0.0.0" port="8080" acceptor-threads="2".....
          Hide
          Mircea Toma added a comment -

          The bug described here was actually fixed on commit with revision: 15968.

          The 1-2 seconds delay we see when using the chat in auctionMonitor happens also when running with Tomcat. The delay occurs only on the first 4 chat messages when large DOM updates arrive to the server and their processing introduce the delay. After that when the updates for the listed chat messages arrive as individual updates for each row the browser has to do less processing thus no visible delay in clocks.

          Show
          Mircea Toma added a comment - The bug described here was actually fixed on commit with revision: 15968. The 1-2 seconds delay we see when using the chat in auctionMonitor happens also when running with Tomcat. The delay occurs only on the first 4 chat messages when large DOM updates arrive to the server and their processing introduce the delay. After that when the updates for the listed chat messages arrive as individual updates for each row the browser has to do less processing thus no visible delay in clocks.
          Hide
          Ken Fyten added a comment -

          Assign to Ted for evaluation.

          Show
          Ken Fyten added a comment - Assign to Ted for evaluation.

            People

            • Assignee:
              Unassigned
              Reporter:
              Mandeep Hayher
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: