Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-6507

Prepare ApnsServiceHolder for clustering by using a queue for sender-limiting

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Blocker Blocker
    • None
    • None
    • None
    • None

      ApnsServiceCache (or its base AbstractServiceCache) can be refactored so that it will track number of used services/sockets per whole cluster (not only an app-server as of today).

      The idea is we will use "ticketing / lease" scenario:

      1. at the start of first token batch, we will dump N number of tickets to the queue
      2. AbstractServiceCache can lease the ticket from the queue (replacing current AtomicCounter) indicating it has right to create a new service
      3. once we want to free the service, we can return the slot to the cache, which will send a ticket back to the queue
      4. once the sending process is completed for given variant, a message will be sent to the topic to all subscribers that they can stop their services (replaces current CDI eventing: VariantCompleted, PushMessageCompleted)

      The tickets are identified by pushMessageInformationId and variantID and can be thus selected using JMS message property selectors.

      The system can be completed with pro-active closing mechanism that stops and frees up services that are not used for given time (e.g. ApnsService is not used for 5 seconds on one node, so we will stop it and allow other nodes to create it its ApnsService for dispatching loaded tokens).

              Unassigned Unassigned
              lfryc Lukáš Fryč (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 6 hours
                  6h
                  Remaining:
                  Remaining Estimate - 6 hours
                  6h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified