Skip to main content

Spotfire Information Link caching & Scheduled updates caching



Spotfire Information Links and the entire Information Modelling layer in Spotfire is a great way to democratize your data.

Information links become great starting point for your users to build their analytics without even knowing SQL or where the server is, what table to use and how are they joined  and all the geeky stuff.  In a typical instance there is a high likelihood that some of the information links are shared between different reports.

With new versions of Spotfire now there is an option available to cache Individual Information links.

The data behind the information link is cached at the Spotfire Server level. The cache is a Spotfire specific binary file which is stored on the Hard Drive of your Spotfire server. So you need to ensure that if you are caching there is enough space. 

The cache itself is self cleaning depending on timeouts and validation query. Also a Spotfire server Restart would clear up the cache, so you need to accommodate for that in your planning.

Caching is generally good for non volatile and non-personalized data, so ensure that you don’t use caching for the wrong use case.

Obviously for the cache to build the query needs to be run at least once.Few options are available here

1)     First user takes the hit.
Basically you set up the caching option and then analysis are used without any additional steps.
First user takes the hit and waits for the query to execute. Subsequent reports that use the same information links can then get the data from the spotfire server cache if it meets the time or validation query condition.

2)     Using Automation Services and fixed schedules
Lets say you know your data would be ready in the database everyday at 4:00 am and you want to cache the data at that point. You could simply create an Automation task, that uses the Spotfire “Open from Library” Task. Open any file that uses the information link that you want to cache.
Then schedule this task to run at 4:00 am. The job doesn’t really do much than opening a file and hence triggering an Information Link. Then depending on the validation query and/or timeout settings the actual end users when using any report that uses the information link would get the data served from Spotfire server cache.


3)     Using Automation Services and triggers
This is similar to option 2, but instead of using time based scheduling you can trigger an automation job by running a bat file programmatically or even calling Spotfire Automation services webservices. This way if you have an ETL process or some other process that needs be completed and the completion times are not fixed then you can trigger as needed.

4)     Using Scheduled Updates
Scheduled updates is a way to cache Spotfire files and data on the webplayer server for quicker access
You can find more details of scheduled updates in the installation manual for the webplayer.
6.0 Installation manual link

Basically if you schedule at least one file using the information link you want to cache then this triggers loading of the information link at specific times and hence the caching. Scheduled updates can be both time based and event based. More details can be found in the Installation manual and here

Considerations
Caching can help overall performance and significantly reduce the hit on your database if done right. Please consider the following factors while using caching.
1)     Enough Disk Space is available
2)     The benefit of caching would come from at least one report using the IL been completed loaded. So to ensure that subsequent reports use data from the cache you should accommodate the time needed for the cache to build and the report to load.
E.g. If a particular report needs 15 minutes to load then the subsequent reports that use the same information link, should be triggered after 15 minutes.
3)     Caching does not necessarily mean ability to handle enormous data, all good practices like Data-On-Demand, InDB connectivity should be considered. The great part about Spotfire is you can have a very hybrid solution and build a really great solution.
4)     Also ensure that you have enough connections set for datasources you are using and bandwidth to run queries which you plan to cache. E.g Trying to cache 15 queries at same time may not be as fast as doing them in chunks of 5. This depends on network, database server load,Spotfire server specs webserver specs and several other factors so you should check what works best for your environment.
         

















Comments

Post a Comment

Popular posts from this blog

Using Accordions in Spotfire Text Areas

Spotfire 6.0 provides great tools for quickly building your dashboard, but here we will learn to spice up things with the help of new 6.0 text area. If you are not aware the new 6.0 Text area supports HTML, Javascript and CSS. This opens up possibilities for doing a lot more with the text area. Some of the basic stuff can be seen here http://spotfire.tibco.com/qrt/UBSAN/presentation.html?pcode=100044   One of the cool things you can do is build an accordion panel in the text area for better utilization of the valuable screen real estate and helping the overall experience.(Watch the 0:15 second video below to see how accordion works - Sorry for the jitter in the video. The screen recorder does not record fast enough) Here is the html behind the text area : Please note that Spotfire controls are automatically created when you add text area controls, like filters, drop down lists etc. <DIV id="myaccordion"> <H3>Analysis Details</

Calendar Chart in Spotfire

I recently had a colleague asking me to show him the data in a calendar format.. Something like this I basically used a scatterplot for this.  You can check out the original DXP here  http://bit.ly/spotcalendar Some key settings to make it a calendar. Please note Order date is the date of interest here These expressions are out of the box expressions, no need to handcode them, but select them in the axis value  X Axis    <BinByDateTime([Order Date],"DayOfWeek",0)> Y Axis    Week([Order Date]) Trellis into panels   <BinByDateTime([Order Date],"Year.Quarter.Month",2)> Manual layout 4 X 3 Labels  UniqueConcatenate(DayOfMonth([Order Date])) Shape Tiled Markers Marker by   <UniqueConcatenate([Order Date])> Happy plotting your calendar!!!

Spotfire Auto Save for recovery

This is an extension I build to auto save local copies of currently open DXP every 15 minutes.. I have tested briefly and it seems to be doing its job, please please please try and test it if you can access a server and deploy.. Key Notes - This add-on will Auto Save Files while only in Spotfire Analyst Client. The save time is hard coded for every 15 minutes. Files are saved only if they are changed or user has done some actions like marking, filtering etc. The Files are saved in temporary location of the system, generally which will be like C:\Users\<username>\AppData\Local\Temp\Spotfire AutoSave If a Library file is opened it will be saved on your local machine under the temp path C:\Users\<username>\AppData\Local\Temp\Spotfire AutoSave\Library Content\ Library path will be replicated in this autosave location. e.g. C:\Users\<username> \Local\Temp\Spotfire AutoSave\LibraryContent\mylibraryfolder\mylibraryfilename_mmddyyyy_HH