Crate datafold

Crate datafold 

Source
Expand description

§DataFold Node Library

This library implements the core functionality of the DataFold distributed data platform. It provides a schema-based data storage and query system with distributed networking capabilities.

§Core Components

  • atom - Atomic data storage units that form the foundation of the database
  • datafold_node - Node implementation with TCP server and configuration
  • db_operations - Database operation handlers
  • error - Error types and handling
  • fees - Payment and fee calculation system
  • fold_db_core - Core database functionality
  • permissions - Access control and permission management
  • schema - Schema definition, validation, and execution

§Architecture

DataFold uses a distributed architecture where each node can store and process data according to defined schemas. Nodes can communicate with each other to share and replicate data, with permissions controlling access to different schemas and operations.

The system is built around the concept of schemas that define the structure of data and the operations that can be performed on it. Each schema has fields with associated permissions and payment requirements.

Re-exports§

pub use datafold_node::config::load_node_config;
pub use datafold_node::config::NodeConfig;
pub use datafold_node::DataFoldNode;
pub use error::FoldDbError;
pub use error::FoldDbResult;
pub use fold_db_core::FoldDB;
pub use schema::types::operations::MutationType;
pub use schema::types::operations::Operation;
pub use schema::Schema;
pub use schema::SchemaState;
pub use security::ClientSecurity;
pub use security::ConditionalEncryption;
pub use security::Ed25519KeyPair;
pub use security::Ed25519PublicKey;
pub use security::EncryptedData;
pub use security::EncryptionManager;
pub use security::EncryptionUtils;
pub use security::KeyRegistrationRequest;
pub use security::KeyRegistrationResponse;
pub use security::KeyUtils;
pub use security::MessageSigner;
pub use security::MessageVerifier;
pub use security::PublicKeyInfo;
pub use security::SecurityConfig;
pub use security::SecurityConfigBuilder;
pub use security::SecurityError;
pub use security::SecurityManager;
pub use security::SecurityMiddleware;
pub use security::SecurityResult;
pub use security::SignedMessage;
pub use security::SigningUtils;
pub use security::VerificationResult;
pub use ingestion::IngestionConfig;
pub use ingestion::IngestionCore;
pub use ingestion::IngestionError;
pub use ingestion::IngestionResponse;
pub use storage::DatabaseConfig;
pub use storage::StorageError;
pub use constants::DEFAULT_HTTP_PORT;
pub use constants::DEFAULT_P2P_PORT;

Modules§

atom
config_utils
Configuration utilities for eliminating duplicate initialization patterns
constants
datafold_node
A DataFold node is a self-contained instance that can store data, process queries and mutations, and communicate with other nodes. Each node has:
db_operations
error
fold_db_core
FoldDB Core - Event-driven database system
ingestion
Ingestion Module
logging
Enhanced Logging System
progress
Generic progress tracking system for DataFold
schema
Schema System
schema_service
Schema Service
security
Security module for client key management, message signing, and encryption
server
storage
testing_utils
Consolidated testing utilities for database setup and common test patterns
transform
utils
Comprehensive error handling utilities for the DataFold system.

Macros§

deserialize_error
field_map
Macro for creating field maps with default configurations
impl_field
lock_error
log_feature
Generic logging macro for all features
serialize_error
sled_error
Convenience macros for common error patterns