You are here: Part 6: RTI Persistence Service > Configuring Persistence Service > Configuring Persistent Storage

Configuring Persistent Storage

The <persistent_storage> tag is used to persist DDS samples into permanent storage. If the <persistence_storage> tag is not specified, the service will operate in TRANSIENT mode and all the data will be kept in memory. Otherwise, the persistence service will operate in PERSISTENT mode and all the topic data will be stored into the filesystem or into a relational database that provides an ODBC driver.

lists the tags that you can specify in <persistent_storage>.

Relational Database Limitations: The ODBC storage does not support BLOBs. The maximum size for a serialized DDS sample is 65535 bytes in MySQL.

Persistent Storage tags

Tags within <persistent_storage>

Description

Number of Tags Allowed

<external_
database>

When this tag is present, the topic data will be persisted in a relational database.

This tag is required if <filesystem> is not specified.

See .

0 or 1

<filesystem>

When this tag is present, the topic data will be persisted into files.

This tag is required if <external_database> is not specified.

See .

0 or 1

<restore>

This DDS_Boolean (see ) indicates if the topic data associated with a previous execution of the persistence service must be restored or not. If the topic data is not restored, it will be deleted from the persistent storage.

Default: 1

0 or 1

<type_object_max_
serialized_length>

Defines the length in bytes of the database column used to store the TypeObjects associated with PRSTDataWriters and PRSTDataReader.

For additional information on TypeObjects, see the RTI Connext DDS Core Libraries Getting Started Guide Addendum for Extensible Types.

Default: 10488576

0 or 1

 

External Database Tags

Tags within <external_database>

Description

Number of Tags Allowed

<dsn>

DSN used to connect to the database using ODBC. You should create this DSN through the ODBC settings on Windows systems, or in your .odbc.ini file on UNIX/Linux systems.

This tag is required.

1 (required)

<odbc_library>

Specifies the ODBC driver to load. By default, Connext DDS will try to use the standard ODBC driver manager library (UnixOdbc on UNIX/Linux systems, the Windows ODBC driver manager on Windows systems).

0 or 1

<password>

Password to connect to the database.

Default: no username is used

0 or 1

<username>

Username to connect to the database.

Default: no username is used

0 or 1

Filesystem tags

Tags within <filesystem>

Description

Number of Tags Allowed

<directory>

Specifies the directory of the files in which topic data will be persisted. There will be one file per PRSTDataWriter/PRSTDataReader pair.

The directory must exist; otherwise the service will report an error upon start up.

Default: current working directory

0 or 1

<file_prefix>

A name prefix associated with all the files created by Persistence Service.

Default: PS

0 or 1

<journal_mode>

Sets the journal mode of the persistent storage. This tag can take these values:

  • DELETE: Deletes the rollback journal at the conclusion of each transaction.

  • TRUNCATE: Commits transactions by truncating the rollback journal to zero-length instead of deleting it.

  • PERSIST: Prevents the rollback journal from being deleted at the end of each transaction. Instead, the header of the journal is overwritten with zeros.

  • MEMORY: Stores the rollback journal in volatile RAM. This saves disk I/O.

  • WAL: Uses a write-ahead log instead of a rollback journal to implement transactions.

  • OFF: Completely disables the rollback journal. If the application crashes in the middle of a transaction when the OFF journaling mode is set, the files containing the DDS samples will very likely be corrupted.

Default: DELETE

0 or 1

<synchronization>

Determines the level of synchronization with the physical disk.

This tag can take three values:

  • FULL: Every DDS sample is written into physical disk as Persistence Service receives it.

  • NORMAL: DDS samples are written into disk at critical moments.

  • OFF: No synchronization is enforced. Data will be written to physical disk when the OS flushes its buffers.

Default: OFF

0 or 1

<trace_file>

Specifies the name of the trace file for debugging purposes. The trace file contains information about all SQL statements executed by the persistence service.

Default: No trace file is generated

0 or 1

<vacuum>

Sets the auto-vacuum status of the storage. This tag can take these values:

  • NONE: When data is deleted from the storage files, the files remain the same size.

  • FULL: The storage files are compacted every transaction.

Default: FULL

0 or 1

© 2016 RTI