Rapid response to user input is critical to the success of any Web application. FlowForce Server administrators can leverage result caching, a new feature introduced in version 2014, to deliver nearly instantaneous results to users running FlowForce Server jobs in a browser window as HTTP services.
Configuring a FlowForce Server job to take advantage of result caching is a simple two-step process. As an example, let’s look at the job we created recently in FlowForce Server Jobs as HTTP Services. We defined a StyleVision Server transformation as the last step in a FlowForce Server job and made the job available as an HTTP service that delivered the HTML result to a Web browser window.
The drawback to that method is the end user’s request only triggers the job to start. Every execution step must be performed successfully before an HTML document is returned for display in the browser. If the job contains numerous steps for database queries, data transformations, XBRL validation, or other complex operations, or if the server is extremely busy, the end user experiences an unacceptable delay.
To take advantage of result caching, we will re-define the job to preserve results, set triggers to run on a fixed schedule, and deliver the most recent result on demand to any end user.
The job definition page with caching features is shown below:
The HTML result of the transformation is assigned to the name currentOnline, and a new execution step uses the /system/compute function with an expression that prepares data for the cache. The Execution Result portion defines the cache and the URL to access the cached data.
We have to run the job at least once to create the cache, so the second step is to define time triggers:
The triggers shown here will execute the job every 60 minutes during business hours from Monday through Friday.
For a FlowForce Server running at vmarketing001, with port 4646 assigned for HTTP services, the URL is http://vmarketing001:4646/service/currentGrouponOnline as shown in the image below:
The entire cached result snaps into the browser window with no processing delay, and instant gratification puts a smile on the end user’s face.
Result caching is a good solution to optimize application response time for any job that looks up data from an external source, but is not so time sensitive that it requires last-minute data. One example would be sales detail reports by district and product line for the previous day.
FlowForce Server is available for Windows, Linux, and Mac OS platforms. See for yourself how easy it is to please the consumers of automated enterprise workflows, click here to download a free trial!