Skip to main content

A

Actor

Used by conflict-free replicated data types (CRDTs) to identify the source or author of a data mutation. An actor is composed of a SiteID and the site’s current epoch. Actors enable Ditto to track which peer made each change, allowing proper conflict resolution during data merges.

Attachment

A component for storing large binary files separately from documents. Attachments are referenced by documents via attachment tokens but must be explicitly fetched—they do not automatically sync with document subscriptions. Once created, attachments are immutable; to update, create a new attachment and replace the token in the document. See also: Blob Store

Authentication Webhook

An HTTP service hosted by the developer which receives credentials and responds with metadata about the user and which permissions they should have. The Identity Service uses this information to dynamically produce the required certificates. Configured through the Portal. A proprietary Apple-developed technology that establishes a point-to-point Wi-Fi connection between two Apple devices. When available in their environment, Small Peers utilize AWDL to create a mesh network connection and replicate data. AWDL provides faster transfer speeds than Bluetooth LE.

B

Backend

The underlying key-value store which Ditto uses for database-like persistence.

Big Peer

Previous name for Ditto Server. Indicates that Ditto Server acts as a peer in the meshed network of devices.

Blob Store

An internal component which offers general blob storage. Used by any internal Ditto components which need to persist “files”. The blob store does not necessarily require a true filesystem and might operate purely in memory.

Bluetooth LE (BLE)

A wireless technology for short-range communication that serves as one of Ditto’s primary transports. Bluetooth LE operates in two modes: GATT (slower, wider compatibility) and L2CAP (faster, newer devices). It enables peer-to-peer synchronization without internet connectivity.

BYOC

Bring Your Own Cloud. A model for deploying the Ditto Platform managed by Ditto in your own cloud account where you (the customer) share responsibility and control over the account—and therefore the cost, security, and compliance needs—with Ditto.

C

Certificate Authority (CA)

The cryptographic root of trust for all identities and certificates within a Ditto Application. Originally this was a standard X.509 CA for peer TLS certificates, but its role has expanded to include JWT and In-Band Certificate signatures. It is by knowing the public keys of the CA that one offline peer can verify the authenticity of another offline peer.

Change Data Capture (CDC)

A system for tracking data modifications for integration purposes, enabling external systems to receive notifications when data changes in Ditto.

Channel

A bidirectional message-oriented data flow running over the top of a Virtual Connection. These can offer reliable or lossy delivery characteristics and be opened either mutually or as a client/server type relationship. Channels are protocol-agnostic, like TCP/UDP, and are consumed by Services.

Chooser

Also known as the “Mesh Chooser”, a stateful algorithm which decides at any moment which outgoing connections should be made. This considers the peers currently connected, the peers whose advertisements have been detected by transports, and past failures.

Collection

A grouping of documents under a name. Loosely equivalent to a table in SQL terms. An app may have many collections. Each document within a collection must have a unique _id field (primary key).

Conflict-Free Replicated Data Type (CRDT)

An advanced class of data type designed to manage and replicate data changes in a way that allows multiple distributed peers to make updates concurrently without the need to reach consensus. CRDTs automatically merge to form a single meaningful value. Ditto implements several CRDT types:
  • REGISTER: Stores scalar values (strings, numbers, booleans, arrays) using last-write-wins strategy
  • MAP: Stores object properties using add-wins strategy for automatic concurrent merge
For more information, see Ditto’s blog post: An Inside Look at Ditto’s Delta State CRDTs.

CRDT

See Conflict-Free Replicated Data Type (CRDT).

D

Data Transfer Object (DTO)

Represents a structured data object that contains information to be transmitted from one peer to another.

Database

The Small Peer’s implementation of the Ditto store.

Delta Sync

A bandwidth optimization technique where only field-level changes (not entire documents) are transmitted between peers. This minimizes network usage and is especially important for battery-constrained devices and low-bandwidth connections like Bluetooth LE.

Device

A physical hardware unit (smartphone, tablet, IoT device, etc.) that can run Ditto-enabled applications. A single device can host multiple peers when running multiple Ditto-enabled applications or multiple Ditto instances within one application. Distinct from Small Peer, which refers to a Ditto SDK instance.

Ditto Address

An SDK-layer type which targets some peer in the mesh for a Bus connection or similar. It opaquely wraps whatever identifying information is needed.

Ditto Routing Protocol

A custom OSPF-esque shortest-path-first interior routing protocol used to route multi-hop packets within a Ditto mesh. Uses Presence as a data source.

Ditto Server

A cluster of servers that can run on-premises or in the cloud, augmenting the SDK’s local-first capabilities with cloud-based synchronization, identity management, monitoring, and data integration features. Previously called Big Peer.

Document

A schema-flexible unit of data contained in a collection; analogous to a row in a table. Each document must have a unique _id field (primary key) which is immutable after creation, and each field is backed by a specific CRDT type.

DQL (Ditto Query Language)

A SQL-like query language for interacting with Ditto documents. DQL uses string-based queries executed via ditto.store.execute(). It features SQL-like syntax, schema-less document orientation, and does not support JOIN operations in current versions.

DQL Strict Mode

A configuration option (SDK 4.11+) that enforces structure and CRDT type safety in collections. When enabled (default), all fields are treated as REGISTER by default. When disabled, objects are automatically treated as MAPs with field-level merging. All peers must use the same DQL_STRICT_MODE setting for consistent behavior.

E

Epoch

A concept which identifies a “version” of a peer’s CRDT knowledge. Used by replication and CRDT to identify whenever a peer has changed in some fundamental way that obsoletes prior knowledge of them. An Epoch changes each time a peer performs data Eviction.

Eviction

The process a peer takes to deliberately “forget” data locally. Unlike DELETE, eviction is a local-only operation that does not propagate to other peers, does not create tombstones, and immediately frees disk space. Evicted data may resync if an active subscription matches it. Important for use cases like cabin crew apps where data from the last flight is not needed on the next flight.

G

GATT (Generic ATTribute Profile)

An older, slower mode of Bluetooth LE data transfer with typical speed of 3 to 6 kB/s. Works back to very old Android and iOS phones. Where possible, the Bluetooth transport upgrades a connection to L2CAP.

H

Husked Document

A partially deleted document that results from concurrent DELETE and UPDATE operations on the same document. When these operations merge, Ditto’s CRDT combines them field-by-field, resulting in a document with some fields set to null and others containing updated values. Example scenario:
  1. Device A executes DELETE (sets all fields to null)
  2. Device B executes UPDATE concurrently (updates specific fields)
  3. After sync: Document has mix of null and updated fields
Prevention: Use logical deletion instead of DELETE for documents that may be updated concurrently.

Hybrid Logical Clock (HLC)

Used to track when mutations occurred to a CRDT, or component thereof. A Ditto HLC combines a physical clock portion (the local timestamp on a peer as Unix milliseconds) together with a logical portion (a number unique to each peer that increases by one with each change they make).

I

Identity

A complex parameter passed to Ditto at startup which defines how you will authenticate yourself and verify who other peers are, and whether they’re using the same Application as you. Modes include Online Playground (development only), Online with Authentication (production with granular permissions), and Shared Key (air-gapped environments). Some modes rely on the application having a common CA.

Identity Data

The data which the CA asserts about a participant in the mesh. It includes their Peer Key, SiteID, permissions, and other arbitrary data returned by the Authentication Webhook such as email address, job title, and so on.

Identity Service

The part of Ditto Server which handles login requests, invoking Authentication Webhooks if required, and generating the cryptographic material for peers to authenticate each other by acting as the CA.

In-Band Certificate

A bespoke binary format that a Certificate Authority can sign to assert that a given Identity Data is valid and matches a particular key. Plays the role of a TLS X.509 certificate in non-TLS situations.

Index

A data structure (SDK 4.12+) that improves query performance for large datasets by enabling faster lookups on specific fields. Currently supports simple indexes on single fields only, and is most effective for highly selective queries that return a small percentage of documents.

INITIAL Documents

A DQL keyword for INSERT statements that creates documents treated as “default data from the beginning of time” across all peers. Use cases:
  • Device-local templates (form templates, category lists)
  • Seed data that every peer should initialize independently
  • Data that should exist from the start but never sync between devices
Documents inserted with INITIAL do nothing if the _id already exists locally, preventing unnecessary synchronization traffic.

K

Keyspace

As per the Random Slicing algorithm, the keyspace is the range 0 to 1. The capacity of the cluster is used to divide 1, determining how much of the keyspace each partition owns.

L

L2CAP

See Logical Link Control and Adaptation Protocol.

LAN (Local Area Network)

A network transport that enables Ditto peers to communicate over a shared local network, such as Wi-Fi or Ethernet. LAN provides higher throughput than Bluetooth LE and is one of the transports used to form the Ditto mesh network. An encrypted connection between two peers who are not directly connected, with traffic routed via intermediate peers. Used for multi-hop sync via Query Overlap Groups, and Ditto Bus.

Live Query

Legacy term. See Local Store Observer.

Local Store Observer

An object that monitors database changes in the local store matching a given query over time, enabling real-time UI updates as data changes locally or syncs from other peers. Previously referred to as “Observer” or “Live Query.” Created via registerObserverWithSignalNext (recommended, with backpressure control) or registerObserver (simpler, without backpressure control).

Logical Deletion (Soft-delete pattern)

A soft-delete pattern where documents are marked as deleted (e.g., isDeleted: true) but not physically removed from the database. This approach avoids zombie data problems and husked documents that can occur with physical DELETE operations. A faster mode of Bluetooth LE transport at a lower level/complexity than GATT. Platforms that support it have much faster speeds (~20 kB/s).

M

MAP

A CRDT type that stores object properties using an “add-wins” strategy. When multiple offline peers make concurrent updates to different keys in a MAP, both changes are preserved after sync (field-level merging). Prefer MAP structures over arrays for data that may be updated concurrently by multiple peers.

Mesh Network

A network topology where peers connect directly to each other (peer-to-peer) without requiring a central server. Ditto creates mesh networks using multiple transports including Bluetooth LE, P2P Wi-Fi (AWDL/Wi-Fi Aware), LAN, and WebSockets.

mTLS (Mutual TLS)

Mutual Transport Layer Security, a security protocol where both parties in a connection authenticate each other using certificates. Ditto uses mTLS (TLS 1.3) by default to encrypt data in transit between peers, ensuring that only authorized peers can communicate within the mesh network.

Multi-hop Sync

The ability for Ditto to relay documents through intermediate devices that are not directly connected. An intermediate device can only relay documents it has in its local store—if a device’s subscription is too narrow, it won’t store certain documents and cannot relay them to other devices.

Multiplexer

A synchronous machine inside a Virtual Connection to a single remote peer, performing packet fragmentation and reassembly for all of the Physical Connections arriving from various transports.

O

Offline-First

An architectural approach where applications are designed to function fully without network connectivity. In Ditto, this means the local database remains readable and writable offline, and data automatically merges with other peers when connectivity is restored. This is a core design philosophy of the Ditto platform.

Online Playground

A type of Identity where peers do not need unique credentials to log in and everybody has read and write access to everything. Development and testing only—not secure for production use.

P

Peer

An instance of the Ditto SDK running within an application. Each peer has a unique identity and participates in the mesh network independently. A single device can host multiple peers when running multiple Ditto-enabled applications. Peers synchronize data with other peers based on their subscriptions. See also: Small Peer, Ditto Server

Peer Key

A P-256 private key generated and persisted on every device that runs Ditto. This is the primary unique identifier for each peer and its ECDSA signatures are used to prove authenticity. It is unrelated to CRDT actor IDs.

Peer-to-Peer Wi-Fi

Any mechanism for establishing direct Wi-Fi connections between devices without needing a router in between. AWDL is one such technology for Apple devices, and Wi-Fi Aware is another for Android devices.

Permission

A specification of which documents a given peer can read or write. This is presented as a list of specific collection names, and a sublist of query strings for each collection. Documents must match one of those DQL queries to be readable or writable. Permissions can only be specified on the immutable _id field. If using an Online with Authentication identity, permissions can be locked down; other identity types have no CA and let everybody access anything.

Physical Connection

A low-level network connection established through a specific transport mechanism (such as Bluetooth LE, LAN, or WebSocket). Multiple Physical Connections can be combined by the Multiplexer into a single Virtual Connection for improved reliability and throughput.

Portal

Self-service website (https://portal.ditto.live/) used to create and manage Applications hosted on Ditto’s cloud.

Presence

The awareness of other peers in the surrounding mesh network, including information about which peers are available and how they are connected. Presence data is used by the Ditto Routing Protocol to determine optimal paths for multi-hop sync. See also: Presence Viewer

Presence Viewer

The part of Ditto responsible for building a picture of all peers in the surrounding mesh, including rich peer info such as SDK version, device names, and which transports are active. This information is used as the basis for routing and can be visualized with the presence viewer.

Q

Query Overlap Groups

A set of peers whose subscriptions overlap, enabling them to relay documents to each other through multi-hop sync. When peers share overlapping queries, they can act as intermediaries for data synchronization even if the source and destination peers are not directly connected.

QueryResult

The result returned from ditto.store.execute() containing a collection of QueryResultItems. Treat QueryResults like database cursors that manage memory carefully.

QueryResultItem

An individual item within a QueryResult. Uses lazy-loading for memory efficiency—items materialize into memory only when accessed. QueryResultItems should be treated like database cursors; extract needed data immediately and do not retain them between Local Store Observer callbacks.

R

REGISTER

A CRDT type that stores scalar values (strings, numbers, booleans) and arrays using a last-write-wins strategy. When multiple peers update the same REGISTER field concurrently, the most recent write (by HLC timestamp) wins. Important for arrays: Arrays are treated as REGISTERs—the entire array is atomically replaced on update. Avoid using arrays for data that multiple peers may modify concurrently; use MAP structures instead.

Replication

The process of synchronizing data between peers in the Ditto mesh network. Replication is driven by subscriptions and uses Delta Sync to transmit only changed fields. The Replication Service handles document sync over Channels.

Replication Query

A query that runs on connected peers that results in changes being sent back to the initial peer when changes are made to the remote peers’ local database. See Subscription.

S

Service

Handles Channels to provide a particular functionality. The most important example is the Replication service, which performs document sync.

SiteID

A unique identifier for a peer which identifies any CRDT document mutations they author. Also has been used as unique peer identifier generally, but this is being phased out in favor of the Peer Key.

Small Peer

A device running applications built with Ditto SDK. Implies that all devices running on Ditto SDK are potential peers in the meshed network. Also referred to as “Edge Peers.”

Store

The local database component of the Ditto SDK, accessed via ditto.store. The Store provides methods for executing DQL queries, registering Local Store Observers, and managing attachments. All data operations go through the Store, which maintains the local copy of synchronized data.

Subscription

A query from the replication perspective, whereby one peer requests any data that matches this query from other peers to synchronize. Created via ditto.sync.registerSubscription(). Subscriptions tell Ditto what to sync; without active subscriptions, you may only see locally cached data.

Sync

The process of exchanging and merging data between peers in the Ditto mesh network. Sync operates automatically when peers are connected via any available transport, using subscriptions to determine which data to exchange and CRDTs to merge concurrent changes. Sync continues to work in offline-first scenarios, queuing changes until connectivity is restored. See also: Replication, Delta Sync, Multi-hop Sync

T

Tombstone

A deletion marker created when documents are deleted with DELETE DQL statements. Tombstones have a configurable TTL (Time To Live) and eventually expire. If a device reconnects after tombstone TTL expires, its data will be treated as new inserts, causing zombie data.

Transaction

A mechanism for grouping multiple DQL operations into a single atomic database commit. Transactions provide atomicity (all operations complete or none execute), consistency (all statements see identical data snapshots), and serializable isolation. Only one read-write transaction can execute at a time; long-running transactions block other read-write transactions.

Transports

The part of Ditto which involves the physical transport mechanisms such as Bluetooth LE (GATT/L2CAP), WebSockets, AWDL, Wi-Fi Aware, and LAN. Transports are concerned with finding other Ditto peers and establishing secured connections. These lowest-level transports are then weaved together at a higher level to form a Ditto mesh.

U

Unique Universally Stable Timestamp

The unique identifier assigned to every write transaction indicates its order in the sequence of events, a causal relationship to other events, conflict resolution mechanisms to handle concurrency conflicts, and enables non-blocking reads.

V

Version Vector

A tracking mechanism for document state across peers. Each change increments the document version, enabling peers to determine if incoming changes are new or already seen. Used by Delta Sync to transmit only changed fields.

Virtual Connection

A logical connection between two peers that may be composed of multiple Physical Connections across different transports. The Multiplexer combines Physical Connections into a Virtual Connection, providing improved reliability and throughput by utilizing all available network paths simultaneously.

W

WebSocket

A network transport protocol that enables bidirectional communication between peers over the internet. In Ditto, WebSocket connections are primarily used to communicate with Ditto Server for cloud-based synchronization when local transports (Bluetooth, LAN) are not available.

Wi-Fi Aware

A peer-to-peer Wi-Fi technology for Android devices that enables direct device-to-device connections without requiring a router or access point. Wi-Fi Aware serves a similar purpose to AWDL on Apple devices and is one of the transports used to form the Ditto mesh network.

Z

Zombie Data

Deleted data that reappears from previously disconnected devices after tombstone TTL has expired. When a device with old data reconnects after the tombstone has expired, its data is treated as new inserts rather than being suppressed by the deletion. Prevention strategies:
  • Use logical deletion instead of physical DELETE
  • Ensure tombstone TTL exceeds maximum expected offline duration
  • Design data lifecycle to account for potential zombie scenarios