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

Improve performance by pre-caching Sakai users

    XMLWordPrintable

    Details

    • Type: (Deprecated) Contributed Patch
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.x, 2.7.x
    • Fix Version/s: 2.9.x
    • Component/s: Kernel
    • Labels:
      None
    • Environment:
      UVa applied this patch to our local installation for both kernel 1.0.13 (Sakai 2.6.2) and 1.1.10 (Sakai 2.7.1).
    • Property addition/change required:
      Yes
    • Previous Issue Keys:
      KNL-826

      Description

      This contributed code improves performance by pre-caching Sakai users. So the full improvement of user caching does not require waiting for a second user interaction. This user pre-caching is done optionally on servlet container (Tomcat) restart and is also done optionally according to a configurable daily schedule.

      The contributed code is within the kernel and includes two new files:
      PrecachingDbUserService.java extends existing DbUserService.java to add user pre-caching. (This code is based on earlier code from Aaron Zeckoski, then at Caret.)
      Helper class DirectDbAccess.java uses a direct SQL SELECT to get a list of users to drive the usual user access through the Sakai API.

      There is also a patched change to user-components.xml to substitute for the existing DbUserService.java.

      The following Sakai properties condition this user pre-cache:
      run this user pre-cache on servlet container (Tomcat) startup if sakai property usercache.refresh.run.startup=true is configured (default is false)
      run this user pre-cache each day if sakai property usercache.refresh.run.daily=true is configured (default is true)
      the time-of-day of a daily run is configured with sakai property usercache.refresh.time=13:00 (military time; default is 04:00)
      the initial run of a daily scheduled user pre-cache is on the calendar day after a server restart; thereafter it's done daily
      (to be clear about this, a 0100 am restart will not run a 0400am daily scheduled pre-cache that same day)

      See also the contributed "readme" file.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  aaronz Aaron Zeckoski (Inactive)
                  Reporter:
                  cmw6s Cynthia Gast
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration