ICEpush
  1. ICEpush
  2. PUSH-154

Avoid sending cloud push notifications during response-request gap

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      server
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      Avoid sending cloud push notifications when notifications are triggered during the server-response - client-request gap. During this gap the pushIds are temporarily parked (when blocking connection runs) which is falsely interpreted as stopped blocking connection.

        Activity

        Mircea Toma created issue -
        Mircea Toma made changes -
        Field Original Value New Value
        Assignee Mircea Toma [ mircea.toma ]
        Mircea Toma made changes -
        Salesforce Case []
        Fix Version/s 2.0.0 [ 10233 ]
        Fix Version/s 2.0-Beta [ 10232 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.0 [ 10259 ]
        Fix Version/s 2.0.0 [ 10233 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26819 Mon Dec 12 07:29:12 MST 2011 mircea.toma PUSH-154 Refactored internal communication between PushGroupManager and BlockingConnectionServer. Introduced the concept of confirmation for the received notifications. Implemented notification queue to make sure the notifications are properly serialized and buffered when needed. Moved browser request timeout mechanism in BlockingConnectionServer that lets the PushGroupManager know when notifications were not received.
        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/servlet/MainServlet.java
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/LocalPushGroupManager.java
        Commit graph ADD /icepush/trunk/icepush/core/src/main/java/org/icepush/LocalNotificationBroadcaster.java
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/NoopPushGroupManager.java
        Commit graph ADD /icepush/trunk/icepush/core/src/main/java/org/icepush/NotificationBroadcaster.java
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/BlockingConnectionServer.java
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/servlet/BrowserBoundServlet.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26820 Mon Dec 12 07:36:00 MST 2011 mircea.toma PUSH-154 Removed unused class -- its functionality was rolled into BlockingConnectionServer.
        Files Changed
        Commit graph DEL /icepush/trunk/icepush/core/src/main/java/org/icepush/ParkIDsServer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26821 Mon Dec 12 08:00:20 MST 2011 mircea.toma PUSH-154 Run email sending on a different thread to avoid blocking the NotificationProvider.send method.
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/EmailNotificationProvider.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26823 Mon Dec 12 08:53:38 MST 2011 ken.fyten PUSH-154 - Fixed typo.
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/LocalPushGroupManager.java
        Hide
        Mircea Toma added a comment -

        Refactored internal communication between PushGroupManager and BlockingConnectionServer. Introduced the concept of confirmation for the received notifications. Implemented notification queue to make sure the notifications are properly serialized and buffered when needed. Moved browser request timeout mechanism in BlockingConnectionServer that lets the PushGroupManager know when notifications were not received.

        Show
        Mircea Toma added a comment - Refactored internal communication between PushGroupManager and BlockingConnectionServer. Introduced the concept of confirmation for the received notifications. Implemented notification queue to make sure the notifications are properly serialized and buffered when needed. Moved browser request timeout mechanism in BlockingConnectionServer that lets the PushGroupManager know when notifications were not received.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mircea Toma added a comment - - edited

        Introduced parameter that can be used to configure the notification queue size:

        org.icepush.notificationQueueSize (defaults to 1000)

        Introduced also parameter that can be used to configure the time to wait (in milliseconds) for the notification confirmation from the browser:

        org.icepush.connectionRecreationTimeout (default to 500)

        Show
        Mircea Toma added a comment - - edited Introduced parameter that can be used to configure the notification queue size: org.icepush.notificationQueueSize (defaults to 1000) Introduced also parameter that can be used to configure the time to wait (in milliseconds) for the notification confirmation from the browser: org.icepush.connectionRecreationTimeout (default to 500)
        Mircea Toma made changes -
        Salesforce Case []
        Affects [Documentation (User Guide, Ref. Guide, etc.)]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26857 Tue Dec 13 12:31:11 MST 2011 ted.goddard trunk icepush.jar revision 29615 (PUSH-154)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/lib/icepush.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26905 Thu Dec 15 15:36:32 MST 2011 mircea.toma PUSH-154 Stop sharing the timer used by the LocalPushGroupManager since its thread is used up.
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/servlet/MainServlet.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/BlockingConnectionServer.java
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/servlet/BrowserBoundServlet.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26914 Fri Dec 16 01:45:00 MST 2011 mircea.toma PUSH-154 Make sure that the timer is properly stopped on application restart.
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/LocalPushGroupManager.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26958 Mon Dec 19 15:31:57 MST 2011 mircea.toma PUSH-154 Stop scanning for expiry when adding (or re-adding) pushIDs to the group. The scanning is to be triggered only after the notification confirmation is received giving thus a chance to the server to touch the active pushIds and groups.
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/LocalPushGroupManager.java
        Hide
        Mircea Toma added a comment -

        The SessionViewManager in ICEfaces is calling LocalPushGroupManager.addMember(group, id) to add the current view (as pushID) to the session group. This occurs on each JSF lifecycle. Everything is normal up until now. The problem is triggered when LocalPushGroupManager.addMember method is scanning the groups for expiry. Every time a page is rendered or updated a scan for expiry is executed, which is not what we want. The scanning should be done only after a notification was broadcasted and the notification confirmations are received back. This way the server has a chance to touch the groups that are still active and only after that expire the ones inactive.

        The fix applied just removes the LocalPushGroupManager.scanForExpiry call in LocalPushGroupManager.addMember method.

        Show
        Mircea Toma added a comment - The SessionViewManager in ICEfaces is calling LocalPushGroupManager.addMember(group, id) to add the current view (as pushID) to the session group. This occurs on each JSF lifecycle. Everything is normal up until now. The problem is triggered when LocalPushGroupManager.addMember method is scanning the groups for expiry. Every time a page is rendered or updated a scan for expiry is executed, which is not what we want. The scanning should be done only after a notification was broadcasted and the notification confirmations are received back. This way the server has a chance to touch the groups that are still active and only after that expire the ones inactive. The fix applied just removes the LocalPushGroupManager.scanForExpiry call in LocalPushGroupManager.addMember method.
        Mircea Toma made changes -
        Comment [ Stopped scanning for expiry when adding (or re-adding) pushIDs to the group. The scanning is to be triggered only after the notification confirmation is received giving thus a chance to the server to touch the active pushIds and groups. ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: