MCPcopy Index your code
hub / github.com/Rustixir/darkbird

github.com/Rustixir/darkbird @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
329 symbols 664 edges 39 files 21 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DarkBird

Download

DarkBird is a document-oriented, in-memory database solution optimized for fast real-time data searches.

Features

  • Database level: darkbird was storage, but from ( vsn 5.0.3 ) is full-featured database because provide Schema for building database and all operation do with database layer
  • Persistent: Uses a non-blocking write-ahead-logging engine for data persistence, storing data to multiple pages.
  • In-memory: Data is stored in memory, with two modes (DiskCopies, RamCopies), the first persisting data to disk and reloading the data into memory after restart.
  • Concurrency: Uses a high-concurrent HashMap (DashMap) and doesn't require Mutex/RwLock for thread synchronization.
  • Vector: darkbird provide a vector engine for storing and searching vectors
  • Indexing: Supports indexing, allowing for dynamic decision-making about which document fields to index.
  • Full-text search: Supports full-text search operations since version 3.5.0.
  • Materialized view: Supports materialized view
  • Tagging: Each document can have multiple tags, and one tag can refer to many documents, making it great for indexing groups of documents for fast retrieval by key.
  • Expiration: from vsn 6.0.0 support key expiry.
  • Atomic Operation: from vsn 6.0.0 support Atomic Operation (just like redis setNx)
  • Migration: The storage model is (Key, Document), and you can use migration to change the existing (Key, Document) data on disk before opening the storage.
  • Backup / Restore from vsn-6.1.0 support Backup/Restore
  • External database support: Supports Copy storage data to Postgres/Cassandra/Scylla and load from it.
  • Event handling: Subscribe to darkbird reporter to receive events.

Crate

darkbird = "6.2.4"

Examples

  • See the complete examples here.
  • This repo is Movies store service with (darkbird + actix-web) here.

Versions

  • 2.0.0: Improved performance and added persistent copy of whole data to a database.
  • 3.0.0: Implemented indexing, tagging, and range queries. Document model must implement tree trait from this version
  • 3.5.0: Added full-text search API
  • 4.0.0: Added materialized view support. Document models must implement the MaterializedView trait, and API is provided to fetch view models. Uses &str instead of &String for better performance and API compatibility. All examples are updated.
  • 5.0.1: migrated from Storage to Database world with Schema builder and Database layer to do all operation also is compatible with older version
  • 5.0.2: fixedbug persist indexing and changed fullText search api for a bug all examples updates
  • 5.0.3: fixedbug loader
  • 6.0.0: added another storage Engine for supporting: atomic operation (just like redis setNx), expiration and simpler api
  • 6.0.1: Backup/Restore _ new migration component (recover self if occure error)
  • 6.2.0: Vector Engine

Buy Me A Coffee

Extension points exported contracts — how you extend this code

Indexer (Interface)
used for exracting fields for hash index [17 implementers]
src/darkbird/document.rs
Tags (Interface)
use for indexing group of documents by tag [17 implementers]
src/darkbird/document.rs
Range (Interface)
used for range index [17 implementers]
src/darkbird/document.rs
MaterializedView (Interface)
used for materialized view [17 implementers]
src/darkbird/document.rs
FullText (Interface)
used for full text search engine [17 implementers]
src/darkbird/document.rs

Core symbols most depended-on inside this repo

to_string
called by 31
src/darkbird.rs
get
called by 26
src/darkbird/database.rs
insert
called by 25
src/darkbird/storage.rs
to_string
called by 24
example/Version-3.0.0 ( Indexing - Tagging )/taging.rs
iter
called by 21
src/darkbird/storage.rs
len
called by 19
src/darkbird/storage_redis.rs
iter
called by 8
src/darkbird/storage_vector.rs
remove
called by 8
src/darkbird/storage.rs

Shape

Method 224
Class 49
Function 29
Enum 19
Interface 8

Languages

Rust100%

Modules by API surface

src/darkbird/database.rs29 symbols
src/darkbird/storage.rs22 symbols
src/darkbird/wal/disk_log.rs18 symbols
src/darkbird/storage_redis.rs18 symbols
src/darkbird/storage_vector.rs14 symbols
src/darkbird/router.rs14 symbols
src/darkbird/index/tags.rs12 symbols
example/new_features_vsn2.rs12 symbols
src/darkbird/wal/page_processor.rs11 symbols
src/darkbird/persistent_worker.rs11 symbols
src/darkbird.rs10 symbols
example/migrate_to_another_database.rs10 symbols

For agents

$ claude mcp add darkbird \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact