Skip to content

Local Key-Value Storage Engine

Purpose

The Local Key-Value Storage Engine provides the local storage and retrieval of data in a key-value format.

State

Messages received

GetValueKVStoreRequest

Find stored data by its key in the KV-store and return the value.

Reception:

GetValueKVStoreRequestV1

Records with fields:

The key that maps to the requested value in the KV-store.

Triggers

GetValueKVStoreResponseV1

Records with fields:

The key that maps to the requested value in the KV-store.

The requested value in the KV-store.

SetValueKVStoreRequest

Add a piece of data to the KV store by adding its key and the corresponding value. If the key already exists, override the value.

Reception:

SetValueKVStoreRequestV1

Records with fields:

The key that that identifies the piece of data in the KV-store.

The corresponding value that needs to be added to the KV-store.

Triggers

SetValueKVStoreResponseV1

Records with fields:

The key that that identifies the piece of data in the KV-store.

The success of the operation, indicating that the KV-pair was stored successfully or not.

DeleteValueKVStoreRequest

Prevent actors capable of sending read requests to the Storage Engine to be able to read a previously set value for a specified key.

Reception:

DeleteValueKVStoreRequestV1

Records with fields:

The key that that identifies the piece of data that should be removed from the KV-store.

Triggers

DeleteValueKVStoreResponseV1

Records with fields:

The key that that identifies the piece of data in the KV-store.

The success of the operation, indicating that the KV-pair was deleted successfully or not.

Notifications sent

ValueChangedKVStore

When the value in the KV-store changes, engines interested in this information get notified.

Records with fields:

The key that that identifies the changed piece of data in the KV-store.

The corresponding value that needs to be recorded in the KV-store.

  • Epoch Timestamp: EpochTimestamp

The wall clock time of the moment the value was changed.

Message Flow

sequenceDiagram

%% --8<-- [start:sequence]
Any Local Engine ->>+ Local KV Storage Engine: GetValueKVStoreRequest
Local KV Storage Engine -->>- Any Local Engine: GetValueKVStoreResponse
Any Local Engine ->>+ Local KV Storage Engine: SetValueKVStoreRequest
Local KV Storage Engine -->>- Any Local Engine: SetValueKVStoreResponse
Any Local Engine ->>+ Local KV Storage Engine: DeleteValueKVStoreRequest
Local KV Storage Engine -->>- Any Local Engine: DeleteValueKVStoreResponse
%% --8<-- [end:sequence]

(Wiki) links on this page