Skip to main content

SharedTree

The SharedTree distributed data structure (DDS), available in Fluid Framework 2.0+, stores your application's shared data in a hierarchical structure.

A SharedTree has the following characteristics:

  • Data is accessed through a TreeView object that exposes all APIs for reading and editing.
  • It has a root and supports several kinds of internal (non-leaf) nodes and leaf nodes.
  • Each node kind mirrors a familiar JavaScript type: object, map, array, boolean, number, string, or null (with some exceptions).
  • Nodes are accessed using standard JavaScript/TypeScript syntax: dot notation, property assignment, and array indexes (with some exceptions).
  • A TreeView conforms to an application-defined schema with strong typing.
  • Internal nodes can be nested, subject to schema constraints.

To get started, read the quick start guide. For more detail, see the links below.

  • Tree Nodes: how information is stored on a SharedTree
    • Node Types: outlines the specific types that are stored by a SharedTree
  • Schema Definition: how the structure of a SharedTree is defined
  • Reading and Editing: how a SharedTree is read and edited through the APIs provided on the different node types
  • Events: the various events emitted by a SharedTree and what they can be used for
  • Transactions: how edits can be grouped into transactions
  • Undo Redo Support: how undo redo works on a SharedTree
  • Schema Evolution: how to make and rollout changes to an existing SharedTree schema.

API Documentation

For a comprehensive view of the SharedTree package's API documentation, see the fluid-framework API docs.