CONCEPT Cited by 2 sources
Object-tree document model¶
An object-tree document model represents a document as a rooted tree of objects, each with a stable ObjectID and a bag of (Property, Value) entries. It's the data-model choice behind the HTML DOM, the Figma file format, every major design tool, and most real-time-collaboration systems over structured content.
The reduction Figma articulates in its 2019 multiplayer post (Source: sources/2019-figma-how-figmas-multiplayer-technology-works):
- Two-level map:
Map<ObjectID, Map<Property, Value>>. - Database-row view: tuples of
(ObjectID, Property, Value)— each triple is one editable fact. - Tree shape: hierarchy of
parent → childrenedges on top of the map (parent-ID property, or a children-list property on the parent).
Figma: root document → page objects → page-content subtrees (presented as the left-panel layers in the editor).
Why this shape matters for collaboration¶
The model has three load-bearing consequences for any real-time collaboration system built on top of it:
-
Feature velocity compounds on the schema. "Adding new features to Figma usually just means adding new properties to objects." The schema is open-extension — new capabilities don't require data-model migrations, only new property keys. This is why Figma could keep shipping features on the same multiplayer substrate through 2024 without redesigning the sync model.
-
Property-granular conflict resolution. Because state is decomposed to
(ObjectID, Property, Value)triples, concurrent edits to different properties of the same object never conflict — they commute trivially. Concurrent edits to the same(ObjectID, Property)are the only coordination point, and they're resolvable with per-property CRDTs like LWW-register. -
References as first-class edges. Property values can be ObjectIDs — instance → component, auto-layout frame → contained-child, style → shared-style-source. Those property-valued references are what QueryGraph later indexes as the edges of Figma's dependency graph. The 2019 data model is the graph's vertex set.
Compared to sibling data models¶
| Model | Shape | Concurrency story |
|---|---|---|
| Linear text | char[] |
OT; offsets shift under inserts/deletes |
| Object tree | Map<ID, Map<Prop, Val>> + parent edges |
Per-property CRDTs; references don't break under concurrent edits |
| JSON doc tree | Nested ordered maps + arrays | Per-path CRDTs (Automerge, Yjs); list-CRDTs for arrays |
| Relational rows | Table × PK × column | Row-level LWW + FK constraints; real-time usually bolted on |
Seen in¶
- sources/2019-figma-how-figmas-multiplayer-technology-works —
explicit articulation of the
Map<ObjectID, Map<Property, Value>>reduction and the DOM-analogy framing. The data-model choice the whole multiplayer stack is built on. - sources/2026-04-21-figma-how-figma-draws-inspiration-from-the-gaming-world — object-tree is the substrate where FigJam connectors, sticky notes, tables, and layout-controlled objects coexist; the post's cross-system connector-oscillation / autosave-overload bug (concepts/interdependent-systems) works precisely because connector state is a property on object nodes whose values depend on the layout of other object nodes — the object-tree shape is what makes that implicit cross-node coupling possible.
Related¶
- concepts/conflict-free-replicated-data-type — the natural concurrency primitive for per-property updates on this model.
- concepts/write-dependency-graph — Figma's 2024 bidirectional read/write-dep graph over the vertex set this model defines.
- concepts/reachability-based-subscription — per-session subscription model computed over the tree + reference edges.
- concepts/derived-subtree — portions of the object tree can themselves be framework-derived from other sources of truth; Figma Materializer (2026) generalises this as the third reactive graph over the same document model.
- systems/figma-multiplayer-querygraph — production instance.
- systems/figma-parameter-runtime — sibling reactive graph at parameter-binding granularity.
- systems/figma-materializer — sibling reactive graph at derived-subtree granularity.