This page describes MobKit-specific storage adapters. It does not replace Meerkat’s own runtime-backed session durability model.
MobKit storage backends
JSON file store
The default adapter writes session state snapshots as JSON files to a local directory. Each session gets its own file, and concurrent access is managed through lock files.{session_id}.lock). The lock contains a JsonStoreLockRecord with the process ID and acquisition timestamp.
Stale lock recovery. If a process crashes while holding a lock, the lock becomes stale. On the next access attempt, the store checks whether the PID in the lock record is still alive. Dead PIDs trigger automatic lock recovery — the stale lock is removed and a new one is acquired.
BigQuery adapter
For production-oriented deployments, the BigQuery adapter writes session rows to a configured dataset and table:- Dataset and table names must be non-empty
- Only alphanumeric characters, underscores, and hyphens are allowed
Session persistence rows
Session state is serialized asSessionPersistenceRow records:
Session store contracts
TheSessionStoreContract defines the operations every backend must implement:
Contracts are verified by integration tests that run the same test suite against every backend implementation.
Materialization
MobKit provides two materialization functions for session inspection:materialize_latest_session_rows— returns the most recent row per sessionmaterialize_live_session_rows— returns rows for currently active sessions
Runtime correlation
When MobKit accepts amobkit/send_message request, the response includes the Meerkat session_id that accepted the message. Treat that value as the canonical correlation handle for follow-up inspection, debugging, and resume-aware flows.
See also
- Configuration — session store settings
- RPC API —
session_store.*methods - BigQuery naming — naming validation rules
