(let [template (load-file "public/chp/template.chp")] (clojure.walk/postwalk-replace {:template/title "Datom.World — DaoSpace" :template/content (list [:section#dao-space.section-dark [:div.section-inner [:span.status-pill "The Coordinator"] [:h1 "DaoSpace"] [:p.section-lead "DaoSpace is not a component you deploy or a store you instantiate. It is the " [:strong "tuple space that emerges"] " when agents use two libraries over shared storage: " [:code "dao.space.index"] " builds covered indexes over each agent's own " [:a {:href "/dao-stream.chp"} "DaoStream"] " and publishes them through an intake stream for DaoJing to materialize, while " [:code "dao.space.query"] " matches over explicitly supplied bounded sources associatively: by content, never by address."] [:p "A tuple space is defined by two complementary moves. Reading is " [:strong "associative matching"] ": you locate a tuple by describing its content, never by naming its address. " "Writing is " [:strong "generative communication"] ": you deposit a tuple into the shared medium and never address a receiver. " "Agents coordinate by " [:strong "leaving traces in the environment"] ", the way ant colonies do. This is stigmergy: coordination through the environment, not through messages."] [:div.feature-grid [:article.feature-card [:h3 "Associative reads"] [:p "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."]] [:article.feature-card [:h3 "Generative writes"] [:p "An agent deposits a tuple by appending to its own single-writer log and is done. No recipient is named, no broker mediates, and no write surface is shared."]] [:article.feature-card [:h3 "Append-only, no take"] [:p "Linda paired its read with a destructive take. DaoSpace has no removal: to claim or update, an agent appends a new tuple. Under the datom interpretation, current state is a query over the accreted facts."]]]]] [:section.section-light [:div.section-inner [:h2 "Three Boundaries"] [:p "DaoSpace keeps Datomic's strict separation of Transactor, Storage, and Query as abstraction boundaries, interfaces rather than deployment tiers, and maps them onto streams:"] [:ul.bulleted [:li [:strong "Transactor (write + index), decentralized"] ": every agent appending to its own " [:a {:href "/dao-stream.chp"} "DaoStream"] " is its own transactor. The canonical datom path appends atomic transaction records and builds covered indexes over its own datoms via " [:code "dao.space.index"] ", with no global contention."] [:li [:strong "Storage: DaoJing"] ", the decentralized, content-addressed KV materialization where opaque payloads may persist. It holds immutable B-Tree segment blobs and manifests, with no mutable roots, matching, or query semantics."] [:li [:strong "Query (read): the " [:code "dao.space.query"] " library"] " any interpreter embeds. Pure and in-process, it consumes only values the caller constructs (a relation, a datom view, an opened published index, or a snapshot taken from a DaoStream reader handle), never opening or closing a stream itself, then runs positional matching, Datalog, and pull. This is Datomic's Peer model as a library rather than a service."]] [:p "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 " [:em "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."] [:p "DaoSpace is an n-tuple space: tuples of any finite dimension can be matched and unified, and arity never selects meaning. " "The canonical d5 datom " [:code "[e a v t m]"] " is an explicit persistent fact interpretation with automatic covered indexes, not the admission price for every tuple. " "DaoJing is more neutral still: it can materialize the opaque payloads of DaoSpace or any other database interpreter without learning their semantics."]]] [:section.section-dark [:div.section-inner [:h2 "Code Can Live in DaoSpace"] [:p "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."] [:p "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."] [:p "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."] [:p.next "For the full argument, see " [:a {:href "/blog/agent-smith-needs-to-kill-git.chp"} "Agent Smith Needs to Kill Git"] "."]]] [:section.section-dark [:div.section-inner [:h2 "Coordination: Stigmergy"] [:p "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 explicitly supplied sources 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."] [:p "Even races resolve declaratively. Two workers can claim the same task; both claims are simply recorded in their owners' logs. " "A downstream interpreter may apply an explicit winner rule using a genuinely comparable value or another deterministic convention. Per-stream transaction counters are not a shared clock. " "Exclusion and conflict resolution are query policies, not guarantees the store enforces. Independent sources remain explicitly scoped, so equal stream-local ids are never merged implicitly."] [:div.feature-grid [:article.feature-card [:h3 "Distributed Work Queues"] [:p "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."]] [:article.feature-card [:h3 "Single-writer logs"] [:p "If 1,000 agents message one recipient, they append to 1,000 distinct streams and the recipient composes explicitly named bounded sources on the read side. No shared write surface, no contention. Current views over published indexes are answered lazily from restored B-Tree segments, fetching only the slices a query touches; history and time-bounded reads use the eager walk."]] [:article.feature-card [:h3 "Crash-only semantics"] [:p "Append-only files have no partial-update corruption window. A restarted writer reopens in append mode; a reader resumes from a checkpointed cursor offset."]] [:article.feature-card [:h3 "Time Travel"] [:p "Explicit current and history datom views accept an as-of bound within one source's transaction order. Retained histories remain available for replay, debugging, and audit; cross-stream time requires an interpreter-supplied comparable coordinate."]]]]] [:section.section-light [:div.section-inner [:h2 "One Point in a Larger Space"] [:p "Datom.world admits a moduli space of databases because of its core axiom: " [:strong "interpretation is external to the stream"] ". " "Streams carry uncommitted byte syntax, while external interpreters materialize those bytes into tuples, vector fields, document trees, or graph projections as fit for their context."] [:p "DaoSpace is " [:strong "the tuple space point in that moduli space"] ", selected by exact positional matching and generative append-only communication. " "DaoField is a metric sibling selected by distance; graph, document, columnar, or temporal interpreters define other observation regimes."] [:p "Covered indexes, positional indexes, indexed snapshots, and entity projections are access coordinates inside DaoSpace—they alter access cost and ergonomics, not logical semantics. " "The moment a different observation algebra (such as metric distance or declared graph traversal) replaces associative matching, the system moves to another point in the space."] [:p "To understand how externalized interpretation generates this landscape, read " [:a {:href "/blog/datomworld-moduli-space-of-databases.blog"} "Datom.world: A Moduli Space of Databases"] ", or see " [:a {:href "/blog/daospace-moduli-space-of-databases.blog"} "DaoSpace Is a Tuple Space, Not a Moduli Space"] " for the precise distinction between the tuple space and the broader moduli space."]]] [:section.section-dark [:div.section-inner [:h2 "Lineage"] [:p "The tuple space is " [:a {:href "https://en.wikipedia.org/wiki/Linda_(coordination_language)" :target "_blank"} [:strong "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 " [:code "[e a v t m]"] " of entity, attribute, value, transaction, and metadata, is the special case where DaoSpace behaves like Datomic. Unlike Datomic, " [:code "dao.space.query/q"] " implements exact positional matching and unification over mixed n-tuples of arbitrary dimension, with explicit rest syntax for prefix matching."] [:p "The other two traditions live in the layers below. " [:strong "Datomic"] " owns DaoJing: the dumb store of immutable segments and the Peer-as-library read model. " [:strong "Plan 9"] " owns " [:a {:href "/dao-stream.chp"} "DaoStream"] ": the independent, location-transparent, append-only log substrate."] [:p "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."] [:p.next "Learn how " [:a {:href "/dao-stream.chp"} "DaoStream"] " carries these facts, or explore " [:a {:href "/yin.chp"} "Yin"] " to see the interpreters that inhabit the space."]]])} template))