The Coordinator

DaoSpace

DaoSpace is not a component you deploy or a store you instantiate. It is the tuple space that emerges when agents use two libraries over shared storage: dao.space.index builds covered indexes over each agent's own DaoStream and persists them in DaoJing, the content-addressed store, and dao.space.query matches over the persisted indexes associatively: by content, never by address.

A tuple space is defined by two complementary moves. Reading is associative matching : you locate a tuple by describing its content, never by naming its address. Writing is generative communication : you deposit a tuple into the shared medium and never address a receiver. Agents coordinate by leaving traces in the environment , the way ant colonies do. This is stigmergy: coordination through the environment, not through messages.

Associative reads

Agents describe what they need via positional match or Datalog, not who has it. A single-clause query is a match; Datalog generalizes the same by-content move to joins, negation, and aggregation.

Generative writes

An agent deposits a datom by appending to its own single-writer log and is done. No recipient is named, no broker mediates, and no write surface is shared.

Append-only, no take

Linda paired its read with a destructive take. DaoSpace has no removal: to claim or update, an agent appends a new datom, and current state is a query over the accreted facts.

Three Boundaries

DaoSpace keeps Datomic's strict separation of Transactor, Storage, and Query as abstraction boundaries, interfaces rather than deployment tiers, and maps them onto streams:

  • Transactor (write + index), decentralized : every agent appending to its own DaoStream is its own transactor. It enforces local schema, appends datom frames, and builds the covered indexes over its own datoms via dao.space.index , with no global contention and no commit step.
  • Storage: DaoJing , the decentralized, content-addressed store where indexes live persistently. It holds immutable B-Tree segment blobs and mutable root references. It does not match and it does not query.
  • Query (read): the dao.space.query library any interpreter embeds. Pure and in-process, it reads the agent's local in-memory indexes and every agent's published segments in DaoJing, then runs pattern matching and Datalog. This is Datomic's Peer model as a library rather than a service.

DaoSpace is not one of the three boundaries; it is the coordination surface that spans all three. Storage holds facts at rest; the tuple space is those facts under shared interpretation . A store that matched would collapse interpretation into storage, so the space-ness lives above DaoJing, in the composition of index and query.

The datom shape is the price of admission, freely chosen. DaoJing is a dumb key-value store that accepts any bytes. An interpreter that formats its facts as datoms enters the tuple space: strangers can match over its data associatively. One that writes arbitrary primary state opts out: nothing breaks, but that data cannot coordinate.

Code Can Live in DaoSpace

DaoSpace is not only for tasks, queues, or messages. Code itself can inhabit the space. If a function, parameter list, call site, or proof is represented as tuples, then the storage unit and the semantic unit finally match.

That is the break with Git. Git stores serialized files and merges text. Agents do not naturally work at file granularity. They rename functions, alter arguments, move subtrees, and explore variants below the file boundary. When those edits are forced through file diffs, accidental conflicts multiply.

In DaoSpace, those edits become facts in a shared queryable environment. One agent can assert a new function name. Another can assert a new parameter vector. A third can query variants, run evaluations, and promote the winning tuple set. The collaboration surface is semantic from the start, and files can be regenerated later as views for humans.

For the full argument, see Agent Smith Needs to Kill Git .

Coordination: Stigmergy

Agents coordinate by leaving datoms in storage for others to query, decoupled in time and identity. A producer appends a task to its own stream. A worker queries the whole store for posted work nothing has claimed, a negation-plus-join query that justifies a tuple space, then appends its claim to its own log. No broker, no message-format negotiation, no leader election.

Even races resolve declaratively. Two workers can claim the same task; both claims are simply recorded in their owners' logs. A downstream reader sees both, sorts by timestamp, breaks ties by worker id, and deterministically yields one winner. Exclusion is a query rule in the interpreters, not a guarantee the store enforces. One documented open gap remains: entity-id namespace stamping is still pending, so cross-stream :db/id collision is possible until the kickoff-hash namespace lands.

Distributed Work Queues

Workers query for posted tasks, claim them by appending a claim datom to their own log, and emit results. Conflicting claims resolve on the read side.

Single-writer logs

If 1,000 agents message one recipient, they append to 1,000 distinct streams and the recipient merges them on the read side. No shared write surface, no contention. Federated queries currently fall back to the eager walk on every host; lazy index re-attach is JVM-only.

Crash-only semantics

Append-only files have no partial-update corruption window. A restarted writer reopens in append mode; a reader resumes from a checkpointed cursor offset.

Time Travel

Queries accept an as-of bound, indexing storage only up to a point in time. The entire coordination log is available for replay, debugging, and audit.

A Family of Interpreters

Datalog over covered indexes is the default surface, but it is a capability, not the ontology. More generally, DaoSpace is a family of interpreters over one canonical datom history : a moduli space of databases. The datoms are the fixed substrate every member shares; a member is fixed by which materialized views it constructs. One point looks relational, another document-oriented, others columnar, graph-oriented, or logic-oriented.

Views are named and declared, never implicit: graph structure is one materialized interpretation constructed from datoms, not an assumed truth. Associative matching remains the privileged default and the contract strangers coordinate through; the moment cross-agent coordination runs through reference-following traversal, it has left the tuple space.

Sharing is governed the same way. The default mode is public: readers embed the query library and pull datom streams directly, with coarse per-stream access control. When fine-grained control is needed, the topology inverts in principle: the reader submits a governed interpreter wrapped in a capability, it runs confined against the authorized datoms, and only the bounded answer returns. Share governed computation, not data.

Lineage

The tuple space is Linda 's contribution: generative communication, spatial and temporal decoupling, non-destructive associative matching. DaoSpace diverges by being immutable (append, never take) and by being an n-tuple space: tuples of any dimension, not untyped positional arrays. The datom, the canonical persistent 5-tuple [e a v t m] of entity, attribute, value, transaction, and metadata, is the special case where DaoSpace behaves like Datomic. Unlike Datomic, dao.space.query/q is specified to query over n-tuples of any dimension, not just the 5-tuple datom shape. (Today's implementation still pads query templates to the datom 5-tuple; general n-tuple matching is specified, not yet implemented.)

The other two traditions live in the layers below. Datomic owns DaoJing: the dumb store of immutable segments and the Peer-as-library read model. Plan 9 owns DaoStream : the independent, location-transparent, append-only log substrate.

The synthesis: DaoSpace is the tuple space that emerges when agents index their streams and match over the result. Indexing creates queryable structure from raw appends; matching finds content associatively across every agent's published data; the tuple space is the coordination these two moves compose.

Learn how DaoStream carries these facts, or explore Yin to see the interpreters that inhabit the space.