This documentation supports the 22.1 version of Action Request System.
To view an earlier version, select the version from the Product version menu.

Configuring prefetching

Prefetching is triggered whenever Mid Tier  is restarted, or when the cache is flushed. Prefetching includes these processes:

  1. Forms with active links and menus are preloaded into the system's memory.
  2. If a prefetchConfig.xml file exists (from a previous release of AR System ), all of the forms and views specified in that file are preloaded.
  3. Views are preloaded according to usage statistics gathered by the Mid Tier  server.

The first prefetching process can be enabled by checking the Enable Preload option from the General Settings page of the Remedy Mid Tier Configuration Tool.

User and group permissions for prefetching

You do not need to specify a prefetch for every user in the system. The Mid Tier  caches certain types of objects, such as compiled forms, HTML, and JavaScript relative to a set of permission groups. For some sets of groups, access to objects (for example, an active link or a field) might not be granted and as a result, a compiled form for one user can differ from that for another user. When using prefetching, you must specify a user who serves as a representative of a unique set of permissions for which you want to prefetch a form. Any subsequent user with the same set of permissions who accesses the form can take advantage of prefetching.

For example, suppose you have two groups, Group A and Group B, and two users, User 1 and User 2. Group A includes both users; Group B includes only User 2. User 1 has a permission set for Groups A and B; User 2 has a permission set for Group B only.

Even though both users belong to Group B, their unique permission sets differ. Mid Tier  will have a different set of compiled forms, HTML, and JavaScript for each user.

Prefetching is made easier if users are assigned a set of permission groups that perform the same function.

Editing the PrefetchConfig.xml file

Remember the following conditions when working with the prefetchConfig.xml file directly or in the Mid Tier Configuration Tool:

  • The prefetchConfig.xml file must be specified as UTF-8. When editing the file, do not alter the UTF-8 information.
  • Do not change the name of the prefetchConfig.xml file.
  • If you flush the cache in the Mid Tier Configuration Tool, any prefetched forms you previously specified are flushed from the memory cache. The prefetch process is performed again for these forms the next time the web server is restarted.
  • If you specified an invalid form name (for example, if a form name is misspelled or a form does not exist on the specified server), that form will not be prefetched. The Mid Tier  log notes the names of forms that were not prefetched.

You can edit the prefetchConfig.xml file directly using any text editor. You can access the prefetchConfig.xml file by using Configmaps. For more information, see the topic  Using ConfigMaps to access the configuration files Open link .

Specifying multiple threads for prefetching

You can specify the number of prefetch threads in the config.properties file by editing the arsystem.max_number_of_pretch_threads flag.

Specifying forms to prefetch using the prefetchConfig.xml file

The prefetchConfig.xml file is not required to prefetch forms or views, but a file from the previous version of  AR System can be edited to specify forms to prefetch. 

The Cache Settings page in the Configuration Tool includes a text box that shows the content of the prefetchConfig.xml file. Any changes to the prefetchConfig.xml file are automatically merged during upgrade.

Some form are out-of-the-box available in progressive views, offering better performance. For more information, see Developing a Progressive Web Application

Each form is prefetched according to the specified user's permissions for that form and its fields. For example, if you select a form that has 75 fields, and specify a user who has permission to view only 20 fields on that form, the prefetch process can fetch and cache the form with only the 20 fields for which the use has access.

How the prefetch process retrieves forms after Tomcat is started or restarted

When Tomcat is started or restarted, the system retrieves specified forms as follows:

  • The prefetch process retrieves an entry for a form from the prefetchConfig.xml file, and checks the timestamp on the include.
  • If the timestamp indicated on the AR System server is identical (that is, if the form has not been changed on the server), the prefetch process requests the specified form from the cache manager.
  • If the timestamp indicated on the AR System server is newer, the prefetch process retrieves all forms specified in the prefetchConfig.xml file from the AR System server .

If Tomcat starts when the AR System server  is not running, prefetch does not occur. To make sure forms are correctly prefetched, verify that the AR System server  is running before starting or restarting Tomcat.

Example of settings in prefetchConfig.xml file

In the following example:

  • The prefetchConfig.xml file instructs the mid tier to prefetch forms Home Page, Sample:Cities, and Sample:Enrollments from the server jiwu-w2k3 with the user Demo.
  • The server jiwu-w2k3 is used as a server name. However, Remedy Mid Tier also honors the name HomeServer, which indicates the forms are prefetched by using the Home Page Server name defined in the config.properties file when starting the Mid Tier .

<?xml version="1.0" encoding="UTF-8"?>
<midtier-prefetch-config  xmlns="http://www.bmc.com/remedy/midtier/midtier">
  <prefetch-user>
    <user-name>Demo</user-name>
    <locale>en_US</locale>
    <prefetch-server>
      <server-name>jiwu-w2k3</server-name>
      <prefetch-form>
        <form-name>Home Page</form-name>
      </prefetch-form>
      <prefetch-form>
        <form-name>Sample:Cities</form-name>
      </prefetch-form>
      <prefetch-form>
        <form-name>Sample:Enrollments</form-name>
      </prefetch-form>
    </prefetch-server>
  </prefetch-user>
</midtier-prefetch-config>

You can also click the XSD file link on the Cache page to display a copy of the XSD file, which shows the syntax used for the prefetch information.


Was this page helpful? Yes No Submitting... Thank you

Comments