Declarative coordination
Agents describe what they need via Datalog, not who has it. The environment handles matching.
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.
Agents describe what they need via Datalog, not who has it. The environment handles matching.
Agents don't need to know about each other. They interact through the shared datom stream.
The entire coordination log is available for replay, debugging, and audit trails.
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:
as-of-time .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.
DaoSpace supports a wide range of stigmergic patterns, from simple work queues to complex collaborative filtering.
Workers query for 'todo' tasks, claim them by asserting an 'in-progress' status, and emit results. No central broker required.
Agents leave 'pheromone' traces (datoms with strength and decay) that others follow to discover paths or consensus.
Monitoring agents query for anomalies (e.g., tasks stuck in-progress too long) and reassign work by asserting new facts.
Agents build models from shared observations and emit insights that others can join and refine in real-time.
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.