Buffer Settings

Introduction : What is the Buffer ?

The primary source for data in Alpana is a database (SQL, SQLite).

When a Dashboard requires data from a Data Source that is based only on database Connections, the query is composed by Alpana and executed directly on the target database (except 1).

On the other hand, Data that comes from other types of Connections need to be bufferized : data is first fetched from the source and copied inside a Buffer database internal to Alpana, then Dashboards will query this Buffer.

Note

1: except in multi-source : when the database Connection is used together with another Connection, it also becomes bufferized as multi-source (see below)

Bufferized Connection types : What is bufferized ?

All Connection types that are not strictly databases are bufferized :

  • [Wondwerware Historian]
  • [RESTful API]
  • file-based Connections : [Excel], [CSV]

Multi-Source case

Multi-Source is a special case : in a Multi-Source context, even database-based Connections are bufferized.

Example :

SQL Connection1 points to your “MESDB” database, and SQL Connection2 points to your “OTHER_DB” database.

You create DataSource1 by making a join between Table1 from Connection1 and Table2 from Connection2.

⇒ Your DataSource1 is a Multi-Source Data Source. It is bufferized.

Data Flow : How bufferization happens ?

When data is requested from a bufferized Connection, the following happens :

  • If Buffer Refresh is not enabled : get data from Buffer
  • If Buffer Refresh is enabled :
    • If the Buffer is fresh ⇒ get data from Buffer
    • If the Buffer is out of date ⇒ refresh the Buffer with data from the Connection (the Historian query, the CSV file, etc…)

Content of the buffer database

Alpana will create, delete and update tables in the Buffer database.

This is a purely internal mechanism and should not relied on by external tools.

You shouldn’t use the same database for other purposes, otherwise you might lose your data.

Buffer setup in Alpana Designer

By default, Alpana Designer uses a local SQLite database as a Buffer. It is located at :

%localappdata%\code192\Alpana Platform\Alpana Designer\{your_version}\default_buffer.sqlite

SQlite has limitations, in particular with general performance and concurrent access. For better performance even in the Designer, it is advised to switch to SQL if you are able to.

Buffer database

In Alpana Designer, you can define what database to use as a Buffer from the top menu Dashboard > Buffer Settings... :

You can change the path of the SQLite database to create it in another location.

You can also set the Buffer as SQL database :

Per-Connection Buffer Refresh settings

Each Connection has their own refresh settings. When the defined refresh time is exceeded, the Buffer is considered out of date : next time it is queried, data will be fetched from the Connection (the Historian query, the CSV file, etc…)

To define the Buffer Refresh Time on your Connection, while creating or editing the Connection, tick “Buffer Refresh Setting - Enabled” at the bottom of the dialog. Then you can set the refresh period at “Refresh Every …”.

Buffer setup in Alpana Server

The Buffer for Alpana Server is set up initially during installation, and can be modified later using a dedicated utility.

For details, see Utilities : Buffer Settings Manager