This page summarizes the options available in AppBoard for caching and polling, and provides some recommendations for setting the caching and polling configuration to maximize performance and provide the best user experience.
AppBoard uses a model of demand driven data collection. This means by default all requests for data originate from the client (Viewer or Builder) which the server then has to fulfill. In other words, without any clients connected to the AppBoard server it does not perform any querying of data sources at all. This default behaviour can be modified using Server Polling if enabled on specific Data Collections.
In practice the following events result in requests for data:
When the AppBoard server receives a request for data it will service the request by either returning cached data, or by fetching new data from the data source. Caching is enabled as part of the Data Source configuration, either for the entire Data Source, or for individual Data Source entities.
Understanding when to use client polling, server polling, and setting appropriate caching is important to ensure a good user experience, reduce the load on data sources, and reduce the load on the AppBoard server.
For widgets where the data shown is updated at the source and these updates should be reflected in the widget automatically, then it is necessary to turn on Client Polling. The AppBoard client will then poll the server for updated data based on the configured polling frequency. Client polling is only active for widgets on the currently visible Board.
In cases where the data source is slow to respond a client may have to wait on the response each time new data is fetched – which will depend on the client polling interval and cache settings of the data source. To avoid this problem enable Server Polling which will ensure server will always have a full cache and be able to respond to clients immediately.
Clearly a balance has to be struck between keeping the client with up-to-date information and the total number of queries being performed by the AppBoard server to external data sources.
Client polling can impact the performance of the client as it is doing more work issuing requests, processing responses, and re-drawing widgets. It will also increase the amount of network traffic to/from the AppBoard server. There is also an impact on the AppBoard server having to process more requests which ties back into setting appropriate cache timeouts.
When configuring client polling consider:
Enabling server polling schedules a job on the AppBoard server to make data requests for a Data Collection, just as a client would. The best use of this feature is to deal with slow to respond data sources by ensuring AppBoard always has data to return to clients immediately. Server polling jobs will continue at all times whether clients are connected or not, so will increase the idle load of the AppBoard server.
Please note with Server Polling enabled the AppBoard server will respond to clients with expired data if the cache timeout has been exceeded but fetching data from the source has not yet completed.
Server Polling does not have any settings itself, instead it relies on the Client Polling interval to set the server job polling interval. If Client Polling is disabled it will default to 60 seconds. While the server polling will occur at this frequency, whether AppBoard will request new data from the data source will depend on the cache timeout settings of the data source.
When enabling Server Polling consider:
In addition to setting the caching and polling intervals carefully, there are other elements of the system that should be controlled to maximize the performance of the AppBoard system. These include the following: