The Coordinator

DaoSpace

DaoSpace is datom.world's implementation of a tuple space : a shared store of datoms that agents can collectively query and modify to coordinate work. Built on top of DaoStream and DaoDB , it enables declarative, stigmergic coordination without explicit message passing.

Unlike traditional messaging (sender → receiver), DaoSpace agents coordinate by leaving traces in the environment . An agent reads shared facts, modifies them based on local logic, and implicitly coordinates through the effects of those modifications. This is stigmergy: coordination through the environment, as seen in ant colonies and social insects.

Declarative coordination

Agents describe what they need via Datalog, not who has it. The environment handles matching.

Implicit messaging

Agents don't need to know about each other. They interact through the shared datom stream.

Persistent history

The entire coordination log is available for replay, debugging, and audit trails.

Stigmergy: Coordination via Traces

The core concept of DaoSpace is Tuple Space = DaoStream of Datoms + DaoDB Query Engine . Agents see a shared log of facts that they can query using Datalog. When an agent needs to coordinate, it appends a new datom to the stream. Other agents observe this change through their own stream cursors and react accordingly.

This architecture provides several fundamental advantages over traditional coordination models:

  • Full Queryability — Datalog unlocks complex pattern matching across the entire coordination state.
  • Network Agnostic — Works in-process, across linked nodes, or over any DaoStream transport.
  • Time Travel — Query the coordination state at any historical point via as-of-time .
  • Fault Tolerance — If an agent crashes, its traces remain in the stream for others to audit or recover.

DaoSpace is inspired by the Linda coordination language and JavaSpace , but modernized for the datom-stream paradigm. By replacing positional tuples with named datoms and wildcard matching with Datalog, DaoSpace removes the fragility and opacity that limited earlier tuple space implementations.

Coordination Patterns

DaoSpace supports a wide range of stigmergic patterns, from simple work queues to complex collaborative filtering.

Distributed Work Queues

Workers query for 'todo' tasks, claim them by asserting an 'in-progress' status, and emit results. No central broker required.

Agent Swarm Coordination

Agents leave 'pheromone' traces (datoms with strength and decay) that others follow to discover paths or consensus.

Watchdogs & Exception Handling

Monitoring agents query for anomalies (e.g., tasks stuck in-progress too long) and reassign work by asserting new facts.

Collaborative Filtering

Agents build models from shared observations and emit insights that others can join and refine in real-time.

Beyond Linda: A Modern Approach

Traditional tuple spaces like Linda used destructive reads ( take ) that caused deadlocks and lost history. DaoSpace is immutable and non-destructive . Cursors allow multiple agents to observe the same facts independently, and history is preserved forever.

Where Linda matches on positional wildcards, DaoSpace uses Datalog . This allows agents to express complex coordination logic involving joins, aggregations, and temporal constraints directly in their queries. Coordination becomes a database query problem, not a distributed systems protocol problem.

Learn how DaoStream carries these facts, or see DaoDB to understand the query engine behind DaoSpace.