SQLite

For development and testing on a single-host ScaleOut cluster, a SQLite persistence connection can be used to connect your Active Caching module to a SQLite database file. This allows modules to persist modifications to a SQLite database file and retrieve saved values when the module first creates an object.

To connect to a SQLite database, supply a SQLite Database connection string. This string is an expression that contains the parameters required for applications to connect to a database server. Connection strings typically include the path to the SQLite database file. (Note that the directory containing the database file must already exist; the connection will not create it.)

Here is a screenshot of the dialog in the ScaleOut Active Caching UI for creating a SQLite connection:

sqlite_config_image

The “Create table if missing” option causes the connection to automatically create the table used to store instance data if it does not already exist in the database. The table will be named ScaleoutModuleInstances.

Enable SQLite Persistence for a Module

When launching your model through the ScaleOut Active Caching UI, you can enable persistence by selecting the SQLite persistence provider you have defined above. If write-through is enabled, this will cause instances in your module to periodically persist themselves to SQLite every five seconds (if the object has been modified). If read-through is enabled, this will cause instances to retrieve their state from SQLite when they are first created.

sqlite_deploy_module_image