The substrate of flow

DaoStream

The Way That Flows

In Datom.World, everything begins and ends with the DaoStream — the living current that connects all things.

The DaoStream is the substrate of flow — an ever-unfolding stream through which datoms flow, carrying interactions, transformations, and continuations across space, time, and device boundaries.

Like the Dao (道) in Taoist philosophy, it maintains a simple, constant form — the five-element tuple [e a v t m] — yet adapts to infinite contexts. The same datom stream flows locally, distributed, offline, or entangled, shaping itself to the environment. The DaoStream carries meaning not by dictating interpretation, but by allowing interpreters to emerge around it.

In Datom.World, the DaoStream replaces countless specialized APIs, message queues, and database protocols with a single, universal, and complete stream API:

Everything is a stream.

Applications, agents, and nodes do not "call" or "store." They listen, observe, and append to the DaoStream.

Every event is a datom: [e a v t m]

Every stream is a story of becoming.

Through the DaoStream, the world of software moves closer to the world of nature — spontaneous, adaptive, and self-organizing.

The Stream Protocol

DaoStream defines a simple protocol with five operations for stream lifecycle and data flow:

(defprotocol Stream
  (open [this params]
    "Open the stream with params which has only 1 mandatory key
     :path to a resource in a graph")
  (read [this params]
    "Read from the stream with params")
  (write [this data params]
    "Write data to the stream")
  (close [this]
    "Close the stream.")
  (status [this]
    "Returns the current status of the stream,
     e.g., :connecting, :connected"))

open

Establish a connection to a stream resource. The only mandatory parameter is :path which points to a resource in the datom graph.

Opening a stream prepares it for reading or writing, establishing connections to entangled nodes as needed.

read

Consume datoms from an open stream. Returns a sequence of [e a v t m] tuples.

Streams are lazy and asynchronous—read only pulls what you need, when you need it.

write

Append datoms to an open stream. Datoms flow through unchanged.

Whether datoms are ephemeral or persistent depends on consuming apps. Apps like DaoDB can materialize and persist them.

close

Close the stream and release resources. Properly closing streams ensures clean shutdown and resource cleanup.

status

Query the current state of the stream: :connecting , :connected , :closed , etc.

Status monitoring enables reactive applications that adapt to network conditions.

This protocol is universal. Every stream in Datom.World—whether it's a chat, a database, a sensor feed, or an API—implements these same five operations. No framework-specific APIs, no version sprawl, just streams.

Everything Becomes a Stream

When everything speaks the same language, everything composes:

  • Messages — A chat is a stream of datoms with text attributes
  • Files — A document is a stream of datoms with content chunks
  • Databases — Tables are streams of datoms; apps like DaoDB materialize indexes from them
  • User interactions — Clicks, scrolls, and inputs flow as datom streams
  • API calls — Request and response are just datoms in a stream
  • Sensors and telemetry — IoT devices emit streams of measurements
  • Analytics — Behavior tracking becomes stream transformation

Because everything is a stream, data flows through your system without translation. Read datoms, transform datoms, write datoms. No impedance mismatch between layers.

Streams as Infrastructure

DaoStream isn't just an API—it's the infrastructure of Datom.World:

Append-only immutability

Datoms are never modified or deleted. They flow through streams unchanged. Apps that consume them can build time travel, audit trails, and undo.

Distributed by design

Apps can consume the same stream from multiple nodes. Apps like DaoDB use CRDTs and causal ordering to replicate data across entangled nodes.

Local-first reality

Streams flow locally first. Apps can write to local streams and propagate to other nodes when connected. Offline isn't a special case—it's the default.

Every app in Datom.World is a stream interpreter. DaoDB interprets streams as queryable indexes. DaoFlow interprets streams as renderable interfaces. Shibi interprets streams as economic signals. Your app interprets streams however your domain requires.

One Truth, Many Perspectives

The power of DaoStream comes from separation of data and interpretation. Streams carry datoms—[entity attribute value time metadata] tuples that represent universal facts. Apps decide what those facts mean.

The same stream can serve many purposes simultaneously:

  • Your email client reads it as communication
  • Your calendar reads it as events
  • Your analytics tool reads it as behavior
  • Your AI agent reads it as training data

No need to duplicate data across different databases. No need to transform data between incompatible schemas. Just streams of datoms flowing through time, and interpreters that extract meaning.

This is schema-on-read taken to its logical conclusion: streams carry datoms, and interpretation happens at consumption time. Add new interpreters without migrations. Multiple views of the same flowing truth.

Why Streams Instead of APIs?

Modern software is drowning in accidental complexity:

  • Every service exposes a different API
  • Every database speaks a different query language
  • Every protocol requires different client libraries
  • REST, GraphQL, gRPC, WebSockets, SQL, NoSQL—each with its own mental model

DaoStream replaces all of this with a single primitive. The benefits compound:

Uniform interface

Learn read and write once, use everywhere. No framework thrash, no API versioning, no integration hell.

Temporal by default

Every stream is an immutable log. History is preserved automatically. Replay, debug, and audit without special tooling.

Composable by nature

Any stream can feed any other stream. Pipelines emerge naturally. Data flows like water through your system.

When everything is a stream, the distinction between database, API, filesystem, and message queue disappears. There are only datoms flowing through time, and you decide which streams to read and write.

The Flow of the Dao

In Taoist philosophy, the Dao is the natural order—the way things flow when not forced. Water doesn't fight its way downhill; it follows the path of least resistance.

DaoStream embodies this principle in software architecture:

  • No central authority — Streams flow between peers, not through gatekeepers
  • Natural composition — Data flows where it's needed, organically
  • Effortless distribution — Entanglement propagates changes without orchestration
  • Emergent behavior — Complex systems arise from simple stream interactions

This is stigmergy applied to data: leaving traces that others can interpret, creating collective intelligence without central control. Like ants building colonies through pheromone trails, apps build shared worlds through datom streams.

See how Yin agents consume and produce streams, or explore DaoDB to understand stream interpretation as queryable indexes.