FoldDB Glossary

This glossary provides definitions for key terms and concepts used in the FoldDB system. Terms are organized by category for easier reference.

Data Storage

Atom - An immutable data container that stores content and metadata. Atoms form the foundation of FoldDB's storage system and maintain version history through links to previous versions.

AtomRef - A pointer to the latest version of an Atom. AtomRefs enable efficient data access and version tracking while maintaining immutability.

AtomRefCollection - A collection of AtomRefs organized with string keys. Provides a way to manage multiple related Atoms through a single interface.

AtomStatus - The current state of an Atom, which can be either Active or Deleted. Status changes are tracked in update history.

Version History - The complete record of changes to an Atom, maintained through immutable versioning and previous version links.

Data Structure

Schema - A JSON-based definition that specifies data structure, field-level permissions, payment requirements, and transformation rules. Schemas are the core mechanism for data validation and access control in FoldDB.

Field - A single data element within a schema, with its own type, validation rules, permissions, and payment requirements.

JSON Schema - The format used for defining schemas in FoldDB, including field types, validation rules, permissions, and payment requirements.

Schema Version - A specific iteration of a schema, with explicit transformation rules for converting data between versions while maintaining consistency.

Schema Transform - A defined mapping between schemas that enables data transformation while maintaining validation and access control. Transforms are used to convert data between different schema versions or formats.

Field Mapping - The explicit relationship between fields in different schemas, defining how data should be transformed and validated during schema transformations.

Access Control

Permission Policy - A set of rules defining access control at the field level. Policies consider trust distance, explicit permissions, and payment requirements.

Trust Distance - A numerical value representing the trust relationship between users. Lower trust distances indicate higher trust and typically result in broader access rights and lower costs for data operations.

Field-Level Permission - A granular access control mechanism that defines read/write permissions and payment requirements for individual fields in a schema.

Trust Relationship - A connection between users with an associated trust distance that affects both access rights and payment calculations.

Public Key Authentication - The primary authentication mechanism in FoldDB, where users are identified and authenticated using public key cryptography.

Explicit Permission - A direct grant of access rights to a specific public key, independent of trust distance.

Payment System

Lightning Network - A layer-2 payment network used by FoldDB for micropayments. Enables instant, low-cost transactions for data access and schema usage.

Hold Invoice - A Lightning Network payment mechanism used for complex operations. Ensures atomic transactions by holding payment until the operation completes successfully.

Base Cost - The minimum fee for accessing a field or using a schema. This cost may be scaled based on trust distance and operation complexity.

Trust Scaling - A multiplier applied to base costs based on trust distance. Lower trust distances result in lower scaling factors, reducing costs for trusted relationships.

Payment Verification - The process of confirming that a Lightning Network payment has been completed successfully before executing an operation.

Payment Status - The current state of a payment, which can be Pending, Settled, Expired, Failed, PartiallyPaid, or Cancelled.

System Components

Node - A FoldDB instance that manages data storage, schema validation, permission checking, and payment processing.

Permission Manager - A component that handles trust distance calculations, permission verification, and access control.

Payment Manager - A component that handles Lightning Network integration, fee calculation, and payment verification.

Schema Core - A component responsible for schema lifecycle management, validation, and transformation coordination.

Lightning Client - An interface for interacting with the Lightning Network for payment processing.

Technical Concepts

Atomic Operation - A database operation that either completes entirely or fails entirely, maintaining data consistency. All FoldDB operations are atomic.

Thread Safety - A guarantee that operations can be executed concurrently without data corruption. FoldDB ensures thread safety through careful component design.

Complex Operation - An operation that may involve multiple steps or transformations, typically secured using hold invoices to ensure atomicity.

Resource Usage - A factor in fee calculation that considers storage space, processing time, and other system resources consumed by an operation.

Schema Marketplace - A platform where developers can publish schemas and receive compensation through Lightning Network payments when their schemas are used.