Search

 

Version: 4.3.0 +

Applicable to: Futurama Website/Futurama Webservice

 

Description

In case Futurama is running in Website or Webservice mode it is possible to configure settings for the caching of information. These settings are set in the cache-section.

Configuration

Settings

Within the element the next code has to be included:


  
    

Next to this code, also within the element the next code has to be included:


  
      
        
      
  

The futuramaSettings element is the general part for more configuration settings. Within this element the cache element is set.

Explanation

Within the cache element some attributes can be set. Below the possible values of these attributes.

enabled

Indicates whether the caching of documents/sessions is enabled or disabled. Notes:

  • this attribute is required;
  • this attribute is only used in Website mode or Webservice mode;
enableHistory

Indicates whether the use of the back button in the browser is enabled. This option is available from Futurama 17.10.

Notes:

  • this attribute not is required; The default value is false.
  • enabling this attribute is only possible in combination with Html5 rendering.
  • enabling this attribute will increase the memory usage for a Futurama session .
  • this attribute is only used in Website mode or Webservice mode.
numberOfDocuments

Indicates the number of documents that Futurama stores in the cache. When starting a new web session, the loading of a Futurama document can take some time. This depends on the size of the Futurama document. With the ‘numberOfDocuments’ setting, Futurama can read in advance a number of empty documents in memory. If a new session starts, one of these empty documents can be used to speed up the loading process. The number of documents Futurama has to read in advance can be defined with the ‘numberOfDocuments’ setting. Another important setting is the ‘secondsBetweenLoad’ setting (see described below). System administrators can use these two settings to find a good balance between performance (many documents in cache, combined with few seconds between loading new cache-documents will result in fast loading of new web sessions) and the memory use (few documents in cache, combined with many seconds between loading new cache-documents causes limited memory use). Notes:

  • the default value is '0';
  • this attribute is optional. If this attribute is not included the default value is used;
  • this attribute is only used in Website mode;
  • this attribute should be used in combination with the 'secondsBetweenLoad' attribute;
secondsBetweenLoad

Indicates the number of seconds before a new Futurama document will be read in cache. For more information see the description of 'numberOfDocuments'. Notes:

  • the default value is '0';
  • this attribute is optional. If this attribute is not included the default value is used;
  • this attribute is only used in Website mode;
  • this attribute should be used in combination with the 'numberOfDocuments' attribute;
expirationInMinutes

Indicates the number of minutes a document is kept in the cache after a webservice call. Basically, webservice calls are stateless. That means that every webservice call is an independant call, unrelated to any previous calls. This differs from sessions, that occur at websites. Nevertheless, with Futurama it is possible to store webservice documents. The advantage of this is that calculations, or part of calculations, don’t have to be executed everytime. This improves the performance significantly. An example is a webservice that has to read information from a database or an external webservice. In case the input remains the same, it isn’t necessary to read the information again with every webservice call. Notes:

  • the default value is '0';
  • this attribute is optional. If this attribute is not included the default value is used;
  • this attribute is only used in Webservice mode;
GCLargeObjectHeapCompactionModeInterval (from version 5.3.1)

This setting is available for version 5.3.1+. It is only used in batch mode. You can use this setting to determine how often Futurama will clean up the memory to avoid fragmentation. The value specifies the interval in seconds at which Futurama clean up the memory it uses. The default value is 0 which means that cleaning up the memory is disabled. We recommend to only use this property if you perform very calculation intensive long running jobs and you experience performance degradation as the job runs longer.

warmUpDocuments (from version 5.3.1)

This setting is available for version 5.3.1+. It is only used in webservice mode. You can use the warmUpDocuments configuration to specify which documents Futurama should load at startup. For each document that Futurama loads the warmUpXmlBuilder is executed. In this way you can make sure that when a service is restarted all Futurama documents are pre-cached and all the static data that the Futurama documents use is read into memory. In that way you can make sure that the first call to a webservice is not delayed by loading static data.

Within warmUpDocuments you can specify an unlimited number of files with a pattern. A pattern is a regular expression that determines if a file is loaded into cache. In the example above all files in the path for the webservice documents are searched. If a filename matches the regular expression, then it is loaded into cache. For more information about warmUp, see this page

To be able to use this setting you need to make sure that the application is started automatically when IIS is restarted. The pictures underneath show how to do this.

Windows Server

On Windows Server the feature ‘Application Initialization’ has to be installed. You can find this feature by going through the following steps. Go to Server Manager –> Dashboard –> Add roles and features –> Next –> check “Role-based or feature-based installation” –> Next –> check “Select a server from the server pool” –> Next. In the “Roles” screen unfold Web Server (IIS) –> Web Server –> Application Development.

See the following picture:

Capture

Windows

On Windows the feature ‘Application Initialization’ (Control Panel –> Programs –> Turn Windows features on or off –> Internet Information Services -> World Wide Web Services -> Application Development Features) has to be installed as is shown in the following picture:

IIS_feature_installation

 

IIS

You have to set the Start Mode on ‘AlwaysRunning’ for the application pool, as shown in the following picture:

ApplicationPoolConfig

 

In the Basic Settings of the application in IIS you have to set the property 'Enable Preload' as is shown in the following picture.

image

See for an example using the property warmUpDocuments this page.

Compatibility

These configuration settings are available from Futurama version 4.3.0. In previous versions you can find the cache settings in the generic appSettings section of the configuration file. If the new cache section is not included in the configuration file of Futurama version 4.3.0 or higher, Futurama will switch to its compatibility mode. This means that the 'old' appSettings will be loaded. It is recommended to convert these old settings to the new configuration. Below the mapping between the old and the new configuration.

Futurama Website

New configuration:

Where:

{Enabled} is true when the value of:

Is greater then 0:

{NumberOfDocuments} is value of:

{SecondsBetweenLoad} is value of:

Futurama Webservice

New configuration:

,

Where:

{Enabled} is value of

{Expirationinminutes} is value of

Related Topics

- Debug: Settings to debug while developing with Futurama

- Format: Format settings of Futurama

- Identity provider: Settings how to use an external identity provider for determining the access to a website

- Log: Settings for displaying errors, warnings, information messages and developers messages

- Mail: Definition of the mailserver that is used to send e-mails with Futurama Vision

- Mapping: Settings for default locations of Futurama files

- Monitor: Settings for getting session information

- Rendering: Settings to allow Futurama to generate customized HTML

- Security: Additional possible security settings when using Futurama Website

- Server: Settings when using Futurama Export either in server or in batch mode

- Vision: Configuration of the connection between Futurama and Futurama Vision

Feedback

If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.

Updated: 2015-12-07