Skip to main content

Anedya ValueStore(Beta)

ValueStore is a highly available and consistent key-value store designed specifically for Internet of Things (IoT) applications, offered as part of the services provided by Anedya. It provides a mechanism for storing and retrieving data using key-value pairs, organized within namespaces for efficient data management. From the overview, it appears as a normal key-value store, but it's designed to solve some of the very important IoT use-case scenarios.

Anedya ValueStore provides a way to:

  • Manage the configurations of your devices at scale
  • Fine-tune the configuration parameters of each individual device
  • Get a consistent and fault-tolerant storage for devices' operating parameters like Modbus addresses, Register maps, etc.
  • Get the status of the device
  • Store other attributes of the device that may affect its operation

Concepts of ValueStore

To get the most out of the ValueStore let's first understand a few terms.

Namespace

A namespace in ValueStore acts as a logical container for grouping related key-value pairs. This grouping helps categorize data based on specific criteria, promoting efficient data management and access control. Each namespace is uniquely identified by a combination of two fields: Scope and ID

{
"namespace": {
"scope": "global",
"id": "MODEL_X_v2"
}
}
  • *Scope: Defines the visibility and accessibility of the data within the namespace. It can be either:
    • Node-Level (Scope: node): Data is accessible only by the specific node where it's stored. The ID field in this case will contain the unique identifier of the node itself.
    • Global (Scope: global): Data is accessible by all nodes in the system. The ID field can be any arbitrary string chosen by the user for identification.

Key-Value

The key value pair is the fundamental object that can be stored and modified in the ValueStore. The key can be any arbitrary string, for example DATA_PUSH_FREQ or FIRMWARE_VERSION etc.

The value can hold any of the following types of data: stringbinaryfloatboolean

In Anedya ValueStore each key value can hold up to 512 KB of data. It can be anything from a string specifying the configuration of the device to default fallback firmware images for devices based on a microcontroller.

Access patterns in the ValueStore

Read Operations​

  • Node-Level Scope: A node can read data from its own namespace (matching node ID).
  • Global Scope: All nodes can read data from any global namespace. This facilitates access to shared data sets across the entire system.

Write Operations

  • Node-Level Scope: A node can only write data to its own namespace (matching node ID). This restricts nodes from modifying data belonging to other devices or global namespaces.
  • Global Scope: Only applications can write to or modify global namespaces using Platform APIs or the Anedya Dashboard. This ensures controlled modification of shared data sets to maintain data integrity.

Example

  • Node "A" can read configuration data from its own namespace and a global MODEL_X_CONFIG namespace.
  • Node "B" cannot read or modify configuration settings or any other key-value pairs within Node "A's" namespace.
  • Updating a global namespace MODEL_X_CONFIG containing that model or variant-specific device configuration can only be performed through Platform API or client-facing application

Pricing

👍🏻Free for Beta!

The ValuStore is currently in Beta and can be used without any additional charges!

The pricing is calculated based on two factors:

  • Operation Units
  • Storage used

Each read and write operation on the key value consumes one Operation Unit. And storage is charged on a GB-Month basis with each key-value pair occupying a minimum of 128 Bytes.

⚠️Important!

Anedya uses GiB(2^30 Bytes) for storage calculation

Example

Let's assume that you have 1000 devices in your fleet for which you need to manage device configuration. At the same time, each device updates its health status in the ValueStore on a daily basis. The assumptions are as follows:

  • All devices refer to the same global configuration; configuration is not specific to particular devices.
  • Device stores boolean data as health status; true means healthy
  • Devices check for configuration updates on a daily basis
  • Configuration is updated once every month
  • Configuration has a size of 100KB

For the mentioned application:

Monthly Configuration Update
1 x Write operation = 1 Write Operations
Device configuration update checks
1000 Devices x 30 Reads a Month x 1 Value for Configuration = 30,000 Read Operations
Device Health Status Update
1000 Devices x 30 Updates a month x 1 Boolean value = 30,000 Write Operations
Storage
(100kB Config Size x 1024 Bytes) + (1000 Devices x 1 Health Status Value x 128 Bytes)
= 230400 Bytes Stored
= 0.000214 GB Storage-Month