Skip to content

Modules

Storage API

Store versioned records with compare-and-set through PersistenceService and use the shared Redis through RedisService.

PersistenceService

Records have a namespace, key, revision and immutable binary payload; your module defines and versions the payload format. The same semantics apply to MongoDB, MySQL, MariaDB and SQLite.

RuleValue
Namespace1–64 ASCII letters, digits, ., -, _
Key1–191 ASCII letters, digits, _ : . / -
PayloadUp to 1 MiB
Page size1–1000 records, ordered by key, afterKey exclusive
  • putAsync(ns, key, -1, payload) inserts with revision 0, and returns false if the record exists.
  • Updates and deletes require the revision you read; false means a conflict, not an exception.
  • Each mutation is atomic for one record. There are no multi-record transactions.
  • Reads go to Redis first and fill the cache from the database.

RedisService

get, set, delete, atomic increment with expiry, publish and subscribe, each with async and sync variants. set and increment require a TTL of 1–31536000 seconds. The network key prefix is added automatically. Up to 64 subscription listeners per server; pub/sub is transient and not a durable store.