ICEpush
  1. ICEpush
  2. PUSH-224

Cloud Push for Cluster Environment with Fail-Over (Continued)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.2.0.GA
    • Fix Version/s: EE-3.3.0.GA
    • Component/s: Push Library, Push Server
    • Labels:
      None
    • Environment:
      Cluster environment
    • Assignee Priority:
      P1

      Description

      This is a follow-up to PUSH-222

      REQUIREMENTS:

      CLOUD PUSH IN CLUSTER ENVIRONMENT

      The first set of requirements in order to support Cloud Push in a cluster environment with or without fail-over (graceful and non-graceful) are as follows:

      - If a Server Push requires Cloud Push it must be send at least once and preferably only once regardless of graceful or non-graceful fail-over.
      - A Confirmation Timeout timer task for a particular Push ID must only be scheduled on a single EPS instance within the cluster environment.
      - A Confirmation Timeout timer task must be cancelled upon receiving a following listen.icepush with a participating Push ID that matches the Push ID the Confirmation Timeout timer task was scheduled for.
      - If a following listen.icepush is not received within the Confirmation Timeout a Cloud Push should be send and the Confirmation Timeout should only be cancelled if the Cloud Push has been send successfully.
      - If a fail-over occurs before the Confirmation Timeout was cancelled the successor EPS instance to the failure EPS instance must resume the Confirmation Timeout and cancel it only if a following listen.icepush is received or if the Cloud Push has been send successfully.
      - Due to this initial logic it is possible that a particular Cloud Push gets send more than once, but currently we accept this behaviour as long as that particular Cloud Push gets send at least once. (It is better to send a Cloud Push more than once than risking it not being send at all.)
      - Additionally, a Cloud Push flood protection must be in place in order to avoid accidental flooding of a device with Priority Push messages.

      CONFIRMATION TIMEOUT

      Before a Cloud Push can be send the Confirmation Timeout timer task must be scheduled. This should only occur when Priority Push is requested. To ensure this Confirmation Timeout is scheduled on a single EPS instance, the EPS instance that last received the listen.icepush request is responsible for scheduling the Confirmation Timeout. All other EPS instances are only responsible for recording the Confirmation Timeout data in order to potentially function as a successor EPS instance to failure EPS instances. Upon Confirmation Timeout cancellation the EPS instances are responsible for clearing the associated data.

      GRACEFUL SHUTDOWN

      During a graceful shutdown an EPS instance will send a final Shutdown message to let the other EPS instances know it is being shutdown gracefully.

      NON-GRACEFUL SHUTDOWN DETECTION

      Each EPS instance has a UUID generated at start-up. This UUID is part of the Status message which gets send every second by each EPS instance. Upon receiving a Status message of another EPS instance, the UUID is stored together with the timestamp when it was received as a Record in a Map. This information is used in the non-graceful shutdown detection.
      Every 5 seconds a scan runs over the Map of Records to see if each UUID has an associated timestamp not older than 5 seconds. If an old timestamp was detected the assumption is made that the EPS instance with the associated UUID was shutdown non-gracefully.

      DETERMINING THE SUCCESSOR EPS INSTANCE FOR THE FAILURE EPS INSTANCE

      Each EPS instance has a Map with UUIDs mapped to Records containing the UUIDs of all EPS instances, that it knows of based on received Status messages, within the cluster including itself. This Map has its UUIDs ordered. The successor EPS instance is the next EPS instance in the Map, or the first EPS instance if the failure EPS instance was the last EPS instances in the Map. As each EPS instance will do determination, each EPS instance itself will know if it is the successor or not. The successor EPS instance is responsible for resuming any Confirmation Timeout of the failure EPS instance that has not been cancelled or has not been confirmed.

        Activity

        Hide
        Jack Van Ooststroom added a comment -

        Sending src/main/java/org/icepush/BlockingConnectionServer.java
        Adding src/main/java/org/icepush/Group.java
        Sending src/main/java/org/icepush/LocalPushGroupManager.java
        Sending src/main/java/org/icepush/NoopPushGroupManager.java
        Sending src/main/java/org/icepush/PushGroupManager.java
        Adding src/main/java/org/icepush/PushID.java
        Sending src/main/java/org/icepush/SequenceTaggingServer.java
        Sending src/main/java/org/icepush/http/Request.java
        Sending src/main/java/org/icepush/http/standard/RequestProxy.java
        Sending src/main/java/org/icepush/servlet/BrowserBoundServlet.java
        Sending src/main/java/org/icepush/servlet/MainServlet.java
        Sending src/main/java/org/icepush/servlet/ServletRequestResponse.java
        Transmitting file data ............
        Committed revision 34511.

        Show
        Jack Van Ooststroom added a comment - Sending src/main/java/org/icepush/BlockingConnectionServer.java Adding src/main/java/org/icepush/Group.java Sending src/main/java/org/icepush/LocalPushGroupManager.java Sending src/main/java/org/icepush/NoopPushGroupManager.java Sending src/main/java/org/icepush/PushGroupManager.java Adding src/main/java/org/icepush/PushID.java Sending src/main/java/org/icepush/SequenceTaggingServer.java Sending src/main/java/org/icepush/http/Request.java Sending src/main/java/org/icepush/http/standard/RequestProxy.java Sending src/main/java/org/icepush/servlet/BrowserBoundServlet.java Sending src/main/java/org/icepush/servlet/MainServlet.java Sending src/main/java/org/icepush/servlet/ServletRequestResponse.java Transmitting file data ............ Committed revision 34511.
        Hide
        Jack Van Ooststroom added a comment -

        Sending core-ee/src/main/java/com/icesoft/icepush/AdjustHeartbeatServer.java
        Sending core-ee/src/main/java/com/icesoft/icepush/BrowserBoundServlet.java
        Transmitting file data ..
        Committed revision 34316.

        Show
        Jack Van Ooststroom added a comment - Sending core-ee/src/main/java/com/icesoft/icepush/AdjustHeartbeatServer.java Sending core-ee/src/main/java/com/icesoft/icepush/BrowserBoundServlet.java Transmitting file data .. Committed revision 34316.
        Hide
        Jack Van Ooststroom added a comment -

        Sending eps/src/main/java/com/icesoft/push/DynamicPushGroupManager.java
        Sending eps/src/main/java/com/icesoft/push/LocalPushGroupManager.java
        Adding eps/src/main/java/com/icesoft/push/PushID.java
        Sending eps/src/main/java/com/icesoft/push/RemotePushGroupManager.java
        Adding eps/src/main/java/com/icesoft/push/StatusManager.java
        Sending eps/src/main/java/com/icesoft/push/messaging/MessagePayload.java
        Sending eps/src/main/java/com/icesoft/push/messaging/PushMessageService.java
        Sending eps/src/main/java/com/icesoft/push/servlet/ICEpushServlet.java
        Transmitting file data ........
        Committed revision 34318.

        Show
        Jack Van Ooststroom added a comment - Sending eps/src/main/java/com/icesoft/push/DynamicPushGroupManager.java Sending eps/src/main/java/com/icesoft/push/LocalPushGroupManager.java Adding eps/src/main/java/com/icesoft/push/PushID.java Sending eps/src/main/java/com/icesoft/push/RemotePushGroupManager.java Adding eps/src/main/java/com/icesoft/push/StatusManager.java Sending eps/src/main/java/com/icesoft/push/messaging/MessagePayload.java Sending eps/src/main/java/com/icesoft/push/messaging/PushMessageService.java Sending eps/src/main/java/com/icesoft/push/servlet/ICEpushServlet.java Transmitting file data ........ Committed revision 34318.
        Hide
        Jack Van Ooststroom added a comment -

        The described requirements have been implemented. Please note that the Backoff still needs to be looked at for deployment in a cluster environment. A follow-up JIRA will be created for this. Successfully (smoke)tested the following environments:

        • Poll stand-alone without Cloud Push
        • Poll stand-alone with Cloud Push
        • Poll with EPS stand-alone without Cloud Push
        • Poll with EPS stand-alone with Cloud Push
        • Poll with EPS cluster without Cloud Push
        • Poll with EPS cluster with Cloud Push
        • Poll with EPS cluster without Cloud Push with graceful fail-over
        • Poll with EPS cluster with Cloud Push with graceful fail-over
        • Poll with EPS cluster without Cloud Push with non-graceful fail-over
        • Poll with EPS cluster with Cloud Push with non-graceful fail-over

        Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - The described requirements have been implemented. Please note that the Backoff still needs to be looked at for deployment in a cluster environment. A follow-up JIRA will be created for this. Successfully (smoke)tested the following environments: Poll stand-alone without Cloud Push Poll stand-alone with Cloud Push Poll with EPS stand-alone without Cloud Push Poll with EPS stand-alone with Cloud Push Poll with EPS cluster without Cloud Push Poll with EPS cluster with Cloud Push Poll with EPS cluster without Cloud Push with graceful fail-over Poll with EPS cluster with Cloud Push with graceful fail-over Poll with EPS cluster without Cloud Push with non-graceful fail-over Poll with EPS cluster with Cloud Push with non-graceful fail-over Marking this one as FIXED.
        Hide
        Ken Fyten added a comment -

        Commits to icepush-ee for this JIRA have broken the nightly Jenkins build for ICEfaces EE off the trunk.

        First failed Jenkins build: http://server.ice:8088/jenkins/view/ICEfaces/job/ICEfaces%20EE%203%20Trunk%20(Nightly)%202/196/

        Compilation error that fails the build:

        
        eps:
        
        pre.compile:
            [mkdir] Created dir: /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/build
            [mkdir] Created dir: /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/build/classes
            [mkdir] Created dir: /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/build/dist
        
        product.info:
             [copy] Copying 1 file to /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push
        
        compile:
            [javac] Compiling 59 source files to /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/build/classes
            [javac] /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push/StatusManager.java:7: cannot find symbol
            [javac] symbol  : class ConcurrentNavigableMap
            [javac] location: package java.util.concurrent
            [javac] import java.util.concurrent.ConcurrentNavigableMap;
            [javac]                             ^
            [javac] /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push/StatusManager.java:8: cannot find symbol
            [javac] symbol  : class ConcurrentSkipListMap
            [javac] location: package java.util.concurrent
            [javac] import java.util.concurrent.ConcurrentSkipListMap;
            [javac]                             ^
            [javac] /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push/StatusManager.java:28: cannot find symbol
            [javac] symbol  : class ConcurrentNavigableMap
            [javac] location: class com.icesoft.push.StatusManager
            [javac]     private final ConcurrentNavigableMap<UUID, Record> uuidRecordMap =
            [javac]                   ^
            [javac] /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push/StatusManager.java:29: cannot find symbol
            [javac] symbol  : class ConcurrentSkipListMap
            [javac] location: class com.icesoft.push.StatusManager
            [javac]         new ConcurrentSkipListMap<UUID, Record>(
            [javac]             ^
            [javac] Note: Some input files use unchecked or unsafe operations.
            [javac] Note: Recompile with -Xlint:unchecked for details.
            [javac] 4 errors
        
        Show
        Ken Fyten added a comment - Commits to icepush-ee for this JIRA have broken the nightly Jenkins build for ICEfaces EE off the trunk. First failed Jenkins build: http://server.ice:8088/jenkins/view/ICEfaces/job/ICEfaces%20EE%203%20Trunk%20(Nightly)%202/196/ Compilation error that fails the build: eps: pre.compile: [mkdir] Created dir: /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/build [mkdir] Created dir: /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/build/classes [mkdir] Created dir: /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/build/dist product.info: [copy] Copying 1 file to /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push compile: [javac] Compiling 59 source files to /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/build/classes [javac] /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push/StatusManager.java:7: cannot find symbol [javac] symbol : class ConcurrentNavigableMap [javac] location: package java.util.concurrent [javac] import java.util.concurrent.ConcurrentNavigableMap; [javac] ^ [javac] /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push/StatusManager.java:8: cannot find symbol [javac] symbol : class ConcurrentSkipListMap [javac] location: package java.util.concurrent [javac] import java.util.concurrent.ConcurrentSkipListMap; [javac] ^ [javac] /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push/StatusManager.java:28: cannot find symbol [javac] symbol : class ConcurrentNavigableMap [javac] location: class com.icesoft.push.StatusManager [javac] private final ConcurrentNavigableMap<UUID, Record> uuidRecordMap = [javac] ^ [javac] /home/builder/.jenkins/workspace/ICEfaces EE 3 Trunk (Nightly) 2/icefaces-ee/icepush-ee/eps/src/main/java/com/icesoft/push/StatusManager.java:29: cannot find symbol [javac] symbol : class ConcurrentSkipListMap [javac] location: class com.icesoft.push.StatusManager [javac] new ConcurrentSkipListMap<UUID, Record>( [javac] ^ [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 4 errors
        Hide
        Ted Goddard added a comment -

        JDK 1.5 implementation uses Collections.sort each time the "higher key" is required. This is likely acceptable since the higher key is checked only when a node failure occurs.

        Show
        Ted Goddard added a comment - JDK 1.5 implementation uses Collections.sort each time the "higher key" is required. This is likely acceptable since the higher key is checked only when a node failure occurs.
        Hide
        Jack Van Ooststroom added a comment -

        I confirmed Ted's fix in regards to the incorrect usage of an JDK 1.6 API. Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - I confirmed Ted's fix in regards to the incorrect usage of an JDK 1.6 API. Marking this one as FIXED.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: