Software Intelligence • Networked Thought • Graph Database

Roam Research: Architecture, Datalog & Benchmarks

A systems teardown of Roam Research: how in-memory DataScript Datalog databases, atomic block-level UID trees, and bidirectional link indexing pioneered networked thought.

DataScript
Client Database

Entire graph held in-memory as an immutable Datalog database in the browser.

Block-Level
Granularity

Every bullet point is an atomic entity with a globally unique identifier (UID).

Firebase Sync
Cloud Backend

Centralized cloud persistence with proprietary real-time event streaming.

Roam Research Deep-Dive Chapters

1. Architecture & DataScript Stack Teardown →
2. Speed & Browser Heap Benchmarks →
3. Data Privacy & EDN Export Sovereignty →

The Breakthrough and Constraint of In-Memory Datalog

Before Roam Research launched in 2019, note-taking applications treated documents as flat hierarchical text files stored in folders. Roam treated knowledge as an interconnected graph database. Instead of files, every single bullet point is an entity with a 9-character UID. By embedding DataScript (an in-memory Datalog database written in ClojureScript) directly inside the user's web browser, Roam made bidirectional linking, block references, and nested queries instantaneous.

However, holding the entire knowledge graph in browser memory has physical limitations. As a user's graph expands beyond 50,000 blocks with heavy image attachments and complex transclusions, client memory consumption climbs past 1.5 GB. Initial graph download times can exceed 10 seconds over high-latency connections, highlighting the inherent tension between in-browser graph computation and scale.

← Back to Software Hub Compare with Obsidian Compare with Logseq →
Arkajit Das
Author • Verified Entity

Co-Founder & Chief Product Officer at Fraoula. Technology product executive leading enterprise AI, data platform architecture, and distributed systems.