Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-44071

Update Presence correctly by clearing timer and update when browser tab is active

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 20.0
    • Fix Version/s: 21.0 [Tentative]
    • Component/s: Presence
    • Labels:
      None
    • 20 status:
      Please Merge
    • Test Plan:
      Hide

      Before:
      While monitoring the access log:

      tail -f localhost_access_log | grep presence

      Open a site in Sakai:
      1. Open up developer tools and in console type in 'updatePresence()' after the page is loaded

      This causes multiple presence request to be sent to the server (2 = 1 initial load / 1 manually called)
      [fix is proper clearing of timer handle]

      Open multiple sites in Sakai:
      2. Each tab will generate a presence request

      [Fix - event listener for active tab - send presence request for that tab]

      Show
      Before: While monitoring the access log: tail -f localhost_access_log | grep presence Open a site in Sakai: 1. Open up developer tools and in console type in 'updatePresence()' after the page is loaded This causes multiple presence request to be sent to the server (2 = 1 initial load / 1 manually called) [fix is proper clearing of timer handle] Open multiple sites in Sakai: 2. Each tab will generate a presence request [Fix - event listener for active tab - send presence request for that tab]

      Description

      1. The setTimeout handle is not cleared properly and might cause a cascade effect if multiple updatePresence function calls are made.

      2. Presence sends out a lot of HTTP requests for each tab open in a browser - this creates unnecessary load on the server.

      A more accurate portrayal of activity is when a user is active on the tab that is open in the browser - this reduces the number of presence requests that are sent to the server.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                coosthuizen Corné Oosthuizen
                Reporter:
                coosthuizen Corné Oosthuizen
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration