Shared-Nothing Persistence Concepts

Use a unique name for each member that is joining the space. This is used to uniquely identify the persistence files.

Define a data store for each node that is joining as a seeder. The data store must be an existing directory name (with full path) that ActiveSpaces has permissions to read and write to.

You can do this by:

  • Using the MemberDef object and calling the tibasMemberDef_SetDataStore() function.
  • Setting the AS_DATA_STORE environment variable to the directory required before starting the client program or as-agent.
  • With the as-agent, using the -data_store <directory name with path> CLI command.

    When you are using the -data_store option with the as-agent command, such as as-agent -datastore "c:/abc/tmp"" ensure that you specify the absolute path to a directory. Also ensure that the datastore has write permissions on the directory.

    The data store directory can be different or same for each node (seeder). If it is the same, ActiveSpaces creates the required subdirectory structure based on the metaspace name, space name, and member name. Each file has the member name and a timestamp embedded in its name.

    Do not rename the files that are created by the persistence operation.

For code examples showing how to set up shared-nothing persistence, refer to ASPersistence2.c in the /examples directory.
Note: With shared-nothing and limited capacity, running a query on a field that is not indexed could return partial results. Before you query on a field, add an index on the field.

Writing to Disk

If the disk on which the datastore resides experiences issues that result in a write failure, such as running out of disk space, ActiveSpaces buffers such attempts and retries again later. Any write activity to the disk is buffered and retried in 10 seconds. This is the default that is defined by file_sync_interval in the space definition, but you can configure the interval as per your requirements.

If the disk failure is an extended event, you can suspend the write activity using the suspend persistence command from as-admin. In this case, all write activities are buffered in the memory. ActiveSpaces does not make an attempt to write to the disk till the persistence is resumed. You can use the resume persistence command from as-admin to resume a write activity. Refer to TIBCO ActiveSpaces Administration Guide on how to use the suspend and resume commands.

NOTE: Buffering and attempts to write to a disk is based on how the operating system reports an appropriate error when it encounters a failure writing to the disk. For NFS mounted file systems, error reporting is not reliable and ActiveSpaces would not be able to retry writing to the disk.