The storage recommendations for
OnePart are detailed below.
By default the storage works with an SQLite engine and is
therefore limited in terms of:
- concurrent accesses, as
each write action blocks the whole database,
- scalability, when the
number of entries is really big.
Before you begin: However, you can
configure its JDBC connection to work with compatible databases (SQL Server,
MySQL) if you need the storage to be more scalable. Tweaking the settings of
the
StorageService.xml
file allows you to:
-
Switch from SQLite to another RDBMS for storage backend.
-
Change connection pooling parameters.
-
Disable the internal locking mechanism for SQLite.
The Storage does
not expose its settings in any GUI, instead you have to manipulate the
<DATADIR>/config/360/StorageService.xml
file
directly.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StorageService xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="">
<StorageEngine className="com.exalead.cv360.storage.engine.jdbc.JdbcStorageEngine">
<!-- The JDBC driver's class name -->
<Parameter value="org.sqlite.JDBC" name="driver"/>
<!-- JDBC connection string, vendor-specific -->
<Parameter value="jdbc:sqlite:{dataDir}/storageService/storage.db.sqlite" name="connection"/>
<!-- Tables are prefixed, useful if you are using the same database for many different applications -->
<Parameter value="cv360" name="tablePrefix"/>
<!-- Internal read/write synchronization, disable for performance gain.
Tries to avoid potential file-system-level locking problems that can can occur if any of the following applies:
1. You are using SQLite over a networked file-system
2. You are using SQLite under Mac OS/X
3. You are using an old version of SQLiteIf none of the above applies you can safely disable this option.
See http://www.sqlite.org/lockingv3.html for more details on this issue -->
<Parameter value="true" name="synchronizedWrites"/>
<!-- DB username / password -->
<Parameter value="" name="username"/>
<Parameter value="" name="password"/>
<!-- The database connections are pooled, to avoid reconnecting every time.
When using a non-SQLite RDBMS, You can tweak (increase) the settings below for a performance gain.
poolMaxActive: Max. num opened connections - Keep low for -->
<Parameter value="1" name="poolInitialSize"/>
<Parameter value="3" name="poolMaxActive"/>
<Parameter value="2" name="poolMaxIdle"/>
</StorageEngine>
<RepushDocuments>false</RepushDocuments>
</StorageService>