In Foresight Analytics Platform data caching and repository object caching are implemented to speed up work.
To cache data in Foresight Analytics Platform, In-Memory is applied. In-Memory is a subsystem that enables data loading from sources (cube caching), data local storage, quick multiuser access and high performance. Caching enables to avoid sending request each time the data sample from DBMS is required. The following repository objects support In-Memory caching:
All cube types, except calculated (virtual cubes and cube views use source cache).
Time series databases.
ADOMD cubes.
To cache objects of various types, the various mechanisms speeding up access to objects and their work are developed. Description of object caching principles is given below.
Data is stored in file cache. Cache stores values from definite point and coordinates identifying point binding to data source. Files containing the data currently in use are mapped to computer memory. Memory paging mechanism provides a possibility to work in limited RAM with almost unlimited size of data stored in files. In case of out-of-memory state, data loading/downloading is page-by-page.
When the In-Memory mechanism is used, a special structure with source data is loaded to RAM memory. Further data processing (creating data slice, filtering, aggregation, sorting, and so on) is executed in the RAM memory, without addressing data source. Thus, the platform response time is reduced and user work interactivity increases. Cache provides incremental data processing where if some cells are modified, then only related with those cells data is recalculated and not the whole source. On working user access permissions to data are taken into account. Data segments that are set up on creating a role model for Foresight Budgeting are also taken into account
The In-Memory mechanism architecture looks as follows:
The interface of communication with platform provides platform tools the data that are currently in use.
The In-Memory data network control manager fully controls cache: creating and working with files, interaction with displayed memory manager, controlling data structures, allocating computer resources on executing various operations and other functions.
Displayed memory manager provides the quickest possible loading of required file fragment to RAM using operating system possibilities, search of required data in RAM to work with it.
In the desktop application, the cache management of separate objects is performed on the Cache tab of the Object Properties dialog box. BI server will apply data caching for objects which cache was enabled in the desktop application.
By default cache is created in the following forlders:
Windows. C:\Program Files\Foresight\Foresight Analytics Platform 9.2\inmem_data\.
Linux. /var/tmp/inmem_data.
NOTE. Users that will work with cache must have read and write permissions to specified folders.
The caching mechanism settings are changed in the Settings.xml file or in registry. Settings are determined on client workstations if the desktop application is used, or at BI server.
After data is changed and saved, updated data will be in the cache of the computer used for work. To update cache on computers of other users of the Foresight Analytics Platform desktop application, click the Update Cache button on the Cache tab of the Object Properties dialog box. It is also possible to set up scheduled cache update on each user's computer using task scheduler.
The current implementation has the following constraints and features when working with data caching:
Cache is not used, if working with time series database is executed in the Analytical Queries (OLAP) tool, and the Attributes display version is enabled.
Cache created for time series databases will not be applied on working in the Time Series Analysis tool.
Aggregation by fixed dimensions is not calculated if:
Segments are set for cube.
Calculated facts are present in cube.
If any structure modifications are made in source dimensions (set of attributes is changed, new elements are added, hierarchy of existing elements changes and other modifications), for further correct work it is necessary to update cache.
Values by calculated facts of standard cube are not cached.
It is impossible to create cache, if cube has several sources, and the same dimension is linked in one of them and is not bound in others.
On creating cache, aggregations are calculated for default cube display option. For other display options, aggregation is calculated on the first request.
Working with cache is available within one running instance of platform.
The list given below presents factors that can speed down work with cached data. In some cases, speeding down can be considerable:
The use of aggregation by custom alternative hierarchies.
Multiple requests to cached cube on specifying a little selection from the Modeling and Forecasting tool.
Aggregation using the Number of Empty and Number of Non-Empty methods.
The use of virtual cubes (speeding down is linked to data cloning from source cache on opening).
Dimension fixing with aggregation in cube view.
Aggregation by unbound dimension in standard cube (can considerably increase the cache size).
When there is a big number of bound stored information (data aggregation, aggregation by fixed dimensions) data storing will take more time because all stored aggregated matrix are recalculated.
Caching of dictionaries and dimensions in time series databases
Caching of development environment objects
Image caching of object preview
On Foresight Analytics Platform working, extraction and storage of data required for web application running is made in the BI server memory. The system can be also expanded by introducing additional (more performing) BI servers with function of data extracting and caching from repository base. BI server with web application will request those BI servers and get the flow with required data without additional request of DBMS.
In the registry or in the settings.xml it is required to fill in the Service section. This section contains addresses of removed BI servers and repository settings for which the specified data caching scheme is applied.
NOTE. The specified caching mode is relevant only for the subjects for which caching is enabled in repository.
Cache clearing allows avoiding the use of potentially outdated data.
NOTE. Cache clearing is available only in the desktop application.
To clear dictionary and time series database cache, select the Clear Cache item in the Tools menu in the object navigator.
To clear development environment object cache, select the Repository > Clear Assembly Cache item of security manager.
To clear regular report cache, click the Clear button in the Object Cache.
To clear data cache of different objects, click the Clear Cache item on the Cache tab of the Object properties window.
To clear repository cache, select the Clear Cache item in the Tools main menu of the object navigator.
See also: