Product: TIBCO Spotfire Analyst
Versions: 7.5 and above
Summary:
This article describes various Caching options in TIBCO Spotfire
Details:
This article describes various caching options in TIBCO Spotfire.
Resolution:
The primary benefit of caching data or analysis is to speed up the process of loading the analysis at the user's end. Caching data will also avoid querying the database every time a user opens the dashboard which decreases the load. Caching analysis can reduce the wait time to even load cached data. Consideration should be taken when one is caching data that needs to be personalized. The method in this KB article 000019929 How to setup caching for reports with personalized information links with row level security can be used to help personalize cached data in Scheduled Updates.
Here are multiple options for caching data in TIBCO Spotfire and a description of their individual use cases.
Option 1: Caching Data and Analyses on the TIBCO Spotfire Web Player
Pre-requisites:
- TIBCO Spotfire Web Player > Scheduled Updates
Details:
If the analysis will be accessed in the TIBCO Spotfire Web Player, Scheduled Updates can be used to load the report during a given schedule. It will be retained in the RAM (and optionally the disk cache) and all requests will only use that cached version while that schedule is active. This way the SQL execution only needs to be run once at the start of the schedule.
Reference: https://docs.tibco.com/pub/spotfire_server/7.11.0/doc/html/TIB_sfire_server_tsas_admin_help/GUID-77D00E34-7A16-4984-B4E0-A7F404A24B70.html
Disk Caching can also be enabled while scheduling caching of an analysis. By default, disk caching is disabled and can be enabled from Spotfire.Dxp.Worker.Web.Config file by setting enabled="true".
<cacheSettings enabled="false" path="" maxDiskSizeMb="0" maxAgeMinutes="1440"/>
Reference: https://docs.tibco.com/pub/spotfire_server/7.11.0/doc/html/TIB_sfire_server_tsas_admin_help/GUID-11962D1F-38AB-47D4-8247-3360C1B64646.html
By default, "Allow caching" option for disk caching is checked for all analysis while creating rules (Create Rule > File > Additional Properties at extreme bottom left as shown in screenshot). Specific analysis can be excluded from disk caching by unchecking "Allow caching" option.
Disk Caching acts as a recovery cache so that whenever your TIBCO Spotfire Web Player undergoes a restart, the cache present in the disk will be used across all TIBCO Spotfire Web Player services on same node. If cache needs to be used across multiple TIBCO Spotfire Web Player nodes, shared disk needs to be used. Note: Disk caching does not decrease the RAM requirement for Scheduled updates
See "How Disk Caching works in TIBCO Spotfire" for more details
SBDF Caching enables in-memory cache of Geo Coding tables which leads to faster creation and sharing of map chart visualizations on TIBCO Spotfire Web Player and quickly open SBDF files from the library, it is possible to cache and preload the SBDF files stored in the library. The default query picks up only geo-coding tables but it is possible to configure it to cache other files as well. If files have not been accessed for a specified time, or if memory is low, they will be removed from memory. This can be updated in the Spotfire.Dxp.Worker.Web.config file here:
<sbdfCache enabled="true" cacheTimeoutMinutes="30" /> <preloadSettings enabled="true" libraryCheckIntervalMinutes="10" librarySearch="MapChart.IsGeocodingTable::true AND MapChart.IsGeocodingEnabled::true" /></sbdfCache>
Option 2: Caching data in the TIBCO Spotfire Analyst client
Pre-requisites:
- TIBCO Spotfire Analyst
- TIBCO Spotfire Automation Services
- Windows Task Scheduler or other scheduling application if job scheduling is needed
Details:
See KB: 000035388 Caching data in TIBCO Spotfire Analyst for full details of caching options in the TIBCO Spotfire Analyst client.
Cons:
- Saving the analysis as embedded (dxp) or the data (SBDF) in the library may be challenging if the data is larger than 2GB and if the TIBCO Spotfire application database is on a Microsoft SQL Server (see KB 000028303 Size limit of items stored in the TIBCO Spotfire Library for more details)
- TIBCO Spotfire Automation services job setup and schedule will be required for some configurations
Option 3: Caching data through Information Links
Pre-requisites:
- TIBCO Spotfire Analyst > Information Designer
- Setting Cache expiry time in Spotfire server > Attachment Manager
- TIBCO Spotfire WebPlayer > Scheduled Updates
- TIBCO Spotfire Automation Services
- Windows Task Scheduler or other scheduling application if job scheduling is needed
Details:
See KB: 000035390 Caching data through Information links for full details of caching options using Information Links.
Cons:
- Whenever TIBCO Spotfire Server is restarted, Information link cache will expire and need to be re-cached again
- Information link caching option is not useable in case of a clustered TIBCO Spotfire Servers because Information link caching needs to be done on each TIBCO Spotfire server, the cache is not shared across servers. Opening analysis on TIBCO Spotfire Web Player or TIBCO Spotfire Automation Services connecting to specific TIBCO Spotfire server will not guarantee caching Information link on that particular server as Node Manager services can cache Information link data on any TIBCO Spotfire servers or sometimes all. This may sometimes result in cached data being out of sync. However, opening dashboard manually connecting to each TIBCO Spotfire server through TIBCO Spotfire Analyst will create Information link cache on each server.
- Spotfire attachment manager caches library content and the results of information link executions when downloading or saving large amounts of data. If cache expiration time in Attachment Manager is extended to a week, then other contents will also not be cleaned up till a week and temp folder will start occupying more disk space
- Multiple dashboards using same Information link should not be run at the same time otherwise all the dashboards will try to cache the same Information link multiple times. If data volume retrieved by that Information link is huge, disk space can also be exhausted and it will also impact your database performance as same query is running multiple times simultaneously. Let one dashboard cache the Information link completely and then trigger rest of the dashboards so they will use the Information link cache
Option 4: Caching data through Data Connection
Pre-requisites:
- TIBCO Spotfire Analyst > Data Connection
Details:
Data connection caching is done on TIBCO Spotfire Web Player service level to speed up loading of dashboards and avoid hitting the database every time by all users. In case of multiple TIBCO Spotfire Web Player services, data connection caching needs to be done on individual TIBCO Web Player services either manually or using Scheduled Updates.
Open the dashboard containing data connection to be cached, individually on each TIBCO Spotfire Web Player instance manually. So the data connection will get cached and all users opening the dashboard will get cached data. Data will remain cached till its expiry set date time. Once data connection cached is expired, the first time when the dashboard is opened it will fetch new data and again cache it till the mentioned expiry date. On TIBCO Spotfire Analyst, data connection cache will be preserved only while the session is active.
Cons:
- Whenever TIBCO Spotfire Web Player Node is restarted, data connection cache will expire and need to be re-cached again
- In case of multiple TIBCO Spotfire Web Player services, data connection caching needs to be done for each service
- Need to use workaround to re-cache data when the existing data connection cache has not expired as it cannot be done directly. See KB: 000034774 How to manually refresh the data connection cache on TIBCO Spotfire Web player when caching settings are done through data connections
Comments
0 comments
Article is closed for comments.