Skip to main content

Module stores

Module stores 

Source
Expand description

The kernel-owned stores and their backends (spec 3.2 §7.1, §7.3, §13 Q8).

Phase 1 has one kernel-owned store, the ProcessStore side table, with the kernel’s daily spend totals per process (the phase-1 source of ProcessView::spend_today and spend_7d). It runs on every backend that holds the run, schedule and governance stores, with one conformance suite (process_store_conformance_tests!, feature conformance):

BackendTypeFeatureOpened from
In-memoryInMemoryProcessStore——
SQLiteSqliteProcessStoresqlite (default)the pool of harness.db, with its own migration table
PostgreSQLPostgresProcessStorepostgresthe URL of adk-rust serve --store
RedisRedisProcessStoreredisthe URL of adk-rust serve --store

Phase 2 adds the AgendaStore on the same four backends (InMemoryAgendaStore, SqliteAgendaStore, PostgresAgendaStore, RedisAgendaStore, suite agenda_store_conformance_tests!).

The driver store (drivers::DriverStore, feature drivers) runs on the same four backends: InMemoryDriverStore, SqliteDriverStore, PostgresDriverStore and RedisDriverStore (spec 3.2 §7.7).

The ledger store (proc::LedgerStore, feature proc) runs on the same four backends: InMemoryLedgerStore, SqliteLedgerStore, PostgresLedgerStore and RedisLedgerStore (spec 3.2 §7.10, suite ledger_store_conformance_tests!).

The PartitionStore — the partition table and the crossing ledger (§7.8) — runs on in-memory, SQLite, PostgreSQL and Redis (InMemoryPartitionStore, SqlitePartitionStore, PostgresPartitionStore, RedisPartitionStore, suite partition_store_conformance_tests!).

Phase 4 adds these stores on MongoDB, Firestore and Neo4j (§13 Q8), each checked by its conformance suite against a live server in CI:

StoreMongoDB (mongodb)Firestore (firestore)Neo4j (neo4j)
ProcessStoreMongoProcessStoreFirestoreProcessStoreNeo4jProcessStore
AgendaStoreMongoAgendaStoreFirestoreAgendaStoreNeo4jAgendaStore
drivers::DriverStore (with drivers)MongoDriverStoreFirestoreDriverStoreNeo4jDriverStore
proc::LedgerStore (with proc)MongoLedgerStoreFirestoreLedgerStoreNeo4jLedgerStore
PartitionStoreMongoPartitionStoreFirestorePartitionStoreNeo4jPartitionStore
CronWatermarkStoreMongoCronWatermarkStoreFirestoreCronWatermarkStoreNeo4jCronWatermarkStore

The CronWatermarkStore — where each cron wake source left off (§7.4) — runs on in-memory, SQLite, PostgreSQL and Redis (InMemoryCronWatermarkStore, SqliteCronWatermarkStore, PostgresCronWatermarkStore, RedisCronWatermarkStore, suite cron_watermark_store_conformance_tests!), and on MongoDB, Firestore and Neo4j.

The AgentStore — the agents a person adds (spec 3.3 §5.7, §10 K7) — runs on every backend: InMemoryAgentStore, SqliteAgentStore, PostgresAgentStore, RedisAgentStore, MongoAgentStore, FirestoreAgentStore and Neo4jAgentStore, suite agent_store_conformance_tests!.

There is no file backend and no Vertex AI backend (§13 Q8): no durable store on main is file-backed, and Vertex AI holds sessions only.

Structs§

FirestoreAgendaStore
An AgendaStore in Firestore, shared by every replica (spec 3.2 §7.1, §7.5, §13 Q8, feature firestore).
FirestoreAgentStore
An AgentStore in Firestore, shared by every replica (spec 3.3 §5.7, §10 K7, feature firestore).
FirestoreCronWatermarkStore
A CronWatermarkStore in Firestore, shared by every replica (spec 3.2 §7.4, §13 Q8, feature firestore).
FirestoreDriverStore
A DriverStore in Firestore, shared by every replica (spec 3.2 §7.7, §13 Q8; features drivers, firestore).
FirestoreLedgerStore
A LedgerStore in Firestore, shared by every replica (spec 3.2 §7.1, §7.10, §13 Q8, features proc and firestore).
FirestorePartitionStore
A PartitionStore in Firestore, shared by every replica (spec 3.2 §7.1, §7.8, §13 Q8, feature firestore).
FirestoreProcessStore
A ProcessStore in Firestore, shared by every replica (spec 3.2 §7.1, §13 Q8, feature firestore).
InMemoryAgendaStore
An AgendaStore in process memory, for tests and a kernel with no durable store (spec 3.2 §7.5). Its items end with the process.
InMemoryAgentStore
An AgentStore in process memory, for tests and a kernel with no durable store (spec 3.3 §5.7). Its records end with the process.
InMemoryCronWatermarkStore
A CronWatermarkStore in process memory, for tests and a kernel with no durable store (spec 3.2 §7.4). Its cursors end with the process, so a restarted kernel over it sees no tick it missed.
InMemoryDriverStore
A DriverStore in process memory, for tests and a kernel with no durable store (spec 3.2 §7.7). Its records end with the process.
InMemoryLedgerStore
A LedgerStore in process memory, for tests and a kernel with no durable store (spec 3.2 §7.10). Its rows end with the process.
InMemoryPartitionStore
A PartitionStore in process memory, for tests and a kernel with no durable store (spec 3.2 §7.8). Its records end with the process.
InMemoryProcessStore
A ProcessStore in process memory, for tests and a kernel with no durable store (spec 3.2 §7.3). Its rows end with the process.
KernelStores
Every stateful store a kernel keeps, opened together on one backend (spec 3.2 §7.1, §13 Q8): the bundle KernelBuilder::stores and TenantKernelBuilder::stores (feature managed) take, so a host opens one value instead of assembling each store, and a kernel never keeps a store in memory by accident.
MongoAgendaStore
An AgendaStore in MongoDB, shared by every replica (spec 3.2 §7.1, §7.5, §13 Q8, feature mongodb).
MongoAgentStore
An AgentStore in MongoDB, shared by every replica (spec 3.3 §5.7, §10 K7, feature mongodb).
MongoCronWatermarkStore
A CronWatermarkStore in MongoDB, shared by every replica (spec 3.2 §7.4, §13 Q8, feature mongodb).
MongoDriverStore
A DriverStore in MongoDB, shared by every replica (spec 3.2 §7.7, §13 Q8; features drivers, mongodb).
MongoLedgerStore
A LedgerStore in MongoDB, shared by every replica (spec 3.2 §7.1, §7.10, §13 Q8, features proc and mongodb).
MongoPartitionStore
A PartitionStore in MongoDB, shared by every replica (spec 3.2 §7.1, §7.8, §13 Q8, feature mongodb).
MongoProcessStore
A ProcessStore in MongoDB, shared by every replica (spec 3.2 §7.1, §13 Q8, feature mongodb).
Neo4jAgendaStore
An AgendaStore in Neo4j, shared by every replica (spec 3.2 §7.1, §7.5, §13 Q8, feature neo4j).
Neo4jAgentStore
An AgentStore in Neo4j, shared by every replica (spec 3.3 §5.7, §10 K7, feature neo4j).
Neo4jCronWatermarkStore
A CronWatermarkStore in Neo4j, shared by every replica (spec 3.2 §7.4, §13 Q8, feature neo4j).
Neo4jDriverStore
A DriverStore in Neo4j, shared by every replica (spec 3.2 §7.7, §13 Q8; features drivers, neo4j).
Neo4jLedgerStore
A LedgerStore in Neo4j, shared by every replica (spec 3.2 §7.1, §7.10, §13 Q8, features proc and neo4j).
Neo4jPartitionStore
A PartitionStore in Neo4j, shared by every replica (spec 3.2 §7.1, §7.8, §13 Q8, feature neo4j).
Neo4jProcessStore
A ProcessStore in Neo4j, shared by every replica (spec 3.2 §7.1, §13 Q8, feature neo4j).
PostgresAgendaStore
An AgendaStore in PostgreSQL, shared by every replica (spec 3.2 §7.1, §7.5, feature postgres).
PostgresAgentStore
An AgentStore in PostgreSQL, shared by every replica (spec 3.3 §5.7, §10 K7, feature postgres).
PostgresCronWatermarkStore
A CronWatermarkStore in PostgreSQL, shared by every replica (spec 3.2 §7.4, feature postgres).
PostgresDriverStore
A DriverStore in PostgreSQL, shared by every replica (spec 3.2 §7.7, features drivers, postgres).
PostgresLedgerStore
A LedgerStore in PostgreSQL, shared by every replica (spec 3.2 §7.1, §7.10, features proc and postgres).
PostgresPartitionStore
A PartitionStore in PostgreSQL, shared by every replica (spec 3.2 §7.1, §7.8, feature postgres).
PostgresProcessStore
A ProcessStore in PostgreSQL, shared by every replica (spec 3.2 §7.1, feature postgres).
ProcessFilter
Which processes ps lists (spec 3.2 §7.3, §8.1 adk-rust ps [--partition P] [--state S]).
RedisAgendaStore
An AgendaStore in Redis, shared by every replica (spec 3.2 §7.1, §7.5, feature redis).
RedisAgentStore
An AgentStore in Redis, shared by every replica (spec 3.3 §5.7, §10 K7, feature redis).
RedisCronWatermarkStore
A CronWatermarkStore in Redis, shared by every replica (spec 3.2 §7.4, feature redis).
RedisDriverStore
A DriverStore in Redis, shared by every replica (spec 3.2 §7.7, features drivers, redis).
RedisLedgerStore
A LedgerStore in Redis, shared by every replica (spec 3.2 §7.1, §7.10, features proc and redis).
RedisPartitionStore
A PartitionStore in Redis, shared by every replica (spec 3.2 §7.1, §7.8, feature redis).
RedisProcessStore
A ProcessStore in Redis, shared by every replica (spec 3.2 §7.1, feature redis).
SqliteAgendaStore
An AgendaStore in SQLite (spec 3.2 §7.1, §7.5, feature sqlite).
SqliteAgentStore
An AgentStore in SQLite (spec 3.3 §5.7, §10 K7, feature sqlite).
SqliteCronWatermarkStore
A CronWatermarkStore in SQLite (spec 3.2 §7.4, feature sqlite).
SqliteDriverStore
A DriverStore in SQLite (spec 3.2 §7.7, features drivers, sqlite).
SqliteLedgerStore
A LedgerStore in SQLite (spec 3.2 §7.1, §7.10, features proc and sqlite).
SqlitePartitionStore
A PartitionStore in SQLite (spec 3.2 §7.1, §7.8, feature sqlite).
SqliteProcessStore
A ProcessStore in SQLite (spec 3.2 §7.1, feature sqlite).
StoreUse
One of a kernel’s stateful stores: where it came from and whether it is known to be held in memory (Kernel::store_uses).
UsageTotals
What a process or a partition used over a span of UTC days (ProcessStore::usage).

Enums§

SpendScope
Whose spend ProcessStore::spend sums (spec 3.2 §7.3, §7.10).
StoreOrigin
Where one of a kernel’s stateful stores came from (spec 3.2 §7.1).

Traits§

ProcessStore
The kernel’s side table of process metadata, keyed by run id (spec 3.2 §7.3, §6 D-2).