Skip to content

Running in memory

Because the two seams — event bus and storage adapter — both have in-memory implementations, a complete datadata stack runs in a single JavaScript process: real server, real clients, real optimistic updates, with microtask latency and no infrastructure.

  • Server-side agents. The production use: in-process clients attach agents directly to the server inside the Durable Object, alongside WebSocket users.
  • Tests. datadata’s test suite spins up real client/server pairs per test — multi-client convergence, conflict, and session scenarios run without mocks or network.
  • Demos in the browser. The planned live demos on this site run the full engine in the page: several “clients”, one “server”, a latency slider standing in for the network. Nothing is simulated except the wire.

It’s easy to make a sync engine that only works distributed (everything needs the real backend) or one that only works locally (the local mode is a mock that lies to you). Keeping one event vocabulary and one server core for both is what makes the in-memory mode honest — what you observe in a test or a demo is the production code path, minus TCP.