Configuration

All more or less important things in Reveno can be configured. In order to start changing values, you should first access config instance of engine, like: reveno.configuration().

All the changes must be done before reveno.startup() call.

Name Default value Description
config().mutableModel false Sets current used model type by engine as Mutable. Read more to get everything about different model types.
config().immutableModel true Sets current used model type by engine as Immutable. Read more to get everything about different model types.
config().cpuConsumption NORMAL Allows to configure the rate at which pipe consumers burn CPU. Though overall system latency and throughput affects in appropriate way. This reflects some Disruptor wait strategies.
config().mutableModelFailover() SNAPSHOTS Establishes how Repository rollback would be performed in case of Mutable model was set. Supports two types of actions:

  • SNAPSHOTS – default approach where Repository items auto snapshotted on first retrieval, and loaded back when rollback happens, hence no additional actions from user is needed.
  • COMPENSATING_ACTIONS – approach where Compensating Transaction Actions are used, means for each Transaction Action user must provide compensating one, so in case of rollback they will be called. It solves the problem of performance while adding significant complexity.
config().journaling().maxObjectSize 128 kb The max size in bytes which any serialized transaction might have (means all transaction actions which were issued by single command together).
config().journaling().volumesSize 0 kb, 0 kb Sets volume sizes for transactions and events commit journals separately. If both set 0, no volumes are used. Read more about Volumes.
config().journaling().volumes 3 The amount of volumes that will be prepared on engine startup if there is too little available volumes. Read more about Volumes.
config().journaling().minVolumes 1 The minimal amount of remain volumes, at which engine will start background job which is preparing new ones. Read more about Volumes.
config().journaling().channelOptions BUFFERING_VM File Channel options that manages how transaction data will be written with respect to durability and speed. Supports four options:

  • BUFFERING_VM – The fastest option for Channel operations, but at the same time the least fault tolerant. Means some direct buffer will be created for the write operations, with eventual batched flushes on disk. In case of VM crash, significant amount of transactions might be lost.
  • BUFFERING_MMAP_OS – Compromise between fault tolerance and write speed. This option relies on mmap ability of OS. All written data from complete transactions will survive VM crash, but still some data might be lost in case of OS system crash. Since it relies on OS mmap func, the results might vary greatly across platforms.
  • BUFFERING_OS – Compromise between fault tolerance and write speed. This option relies on internal OS page caching. It’s more strict than mmap and hence less performant. All written data from complete transactions will survive VM crash, but still some data might be lost in case of OS system crash.
  • UNBUFFERED_IO – The slowest option, where each transaction data is written directly to disk synchronously. Guarantees fault tolerant in case either VM or OS crash.
config().disruptor().bufferSize 1024 Configuration for DisruptorPipeProcessor, which is used by default for Reveno pipes. Sets the size of Disruptor Ring Buffer.
config().snapshotting().atShutdown false Sets whether to always perform snapshot at system shutdown. Read more about Reveno Snapshotting.
config().snapshotting().every -1 Performs snapshotting after provided amount of transactions is processed by the system. -1 means the feature is disabled. Read more about Reveno Snapshotting.