/// A key-value store, as an actor: node b runs it, any node calls it.
/// Nothing here knows about distribution: a subject `dist.whereis` found
/// on another node is called as a local one.
import std/actor.{Continue}
import std/dict.{type Dict}
import std/process.{type Subject, type proc}
/// What the store is asked. Every field can cross hosts (`Wire`):
/// strings, and the subjects the answers go to, so `dist.name` accepts
/// this type and `actor.call` works across nodes.
pub type Request
{ /// Set `key` to `value`; the answer is its previous value.
Put(key: String, value: String, reply: Subject