{"id":48736866,"url":"https://github.com/nodedb-lab/nodedb","last_synced_at":"2026-04-12T05:01:22.273Z","repository":{"id":347702915,"uuid":"1183612568","full_name":"NodeDB-Lab/nodedb","owner":"NodeDB-Lab","description":"A local-first, real-time, edge-to-cloud hybrid database for multi-modal workloads","archived":false,"fork":false,"pushed_at":"2026-04-05T08:14:21.000Z","size":5829,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-05T10:11:59.721Z","etag":null,"topics":["columnar","database","distributed","graph","kv-store","local","nosql","rag","sql","timeseries","vector"],"latest_commit_sha":null,"homepage":"https://discord.gg/s54gDMVc7B","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NodeDB-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-16T19:32:29.000Z","updated_at":"2026-04-05T08:14:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/NodeDB-Lab/nodedb","commit_stats":null,"previous_names":["nodedb-lab/nodedb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NodeDB-Lab/nodedb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeDB-Lab%2Fnodedb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeDB-Lab%2Fnodedb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeDB-Lab%2Fnodedb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeDB-Lab%2Fnodedb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NodeDB-Lab","download_url":"https://codeload.github.com/NodeDB-Lab/nodedb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NodeDB-Lab%2Fnodedb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31704492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["columnar","database","distributed","graph","kv-store","local","nosql","rag","sql","timeseries","vector"],"created_at":"2026-04-12T05:01:19.392Z","updated_at":"2026-04-12T05:01:22.252Z","avatar_url":"https://github.com/NodeDB-Lab.png","language":"Rust","readme":"# NodeDB\n\n**Seven database engines in a single Rust binary. One SQL dialect. Zero network hops between engines.**\n\nNodeDB replaces the combination of PostgreSQL + pgvector + Redis + Neo4j + ClickHouse + Elasticsearch with a single process. Vector search, graph traversal, document storage, columnar analytics, timeseries, key-value, and full-text search share the same storage, memory, and query planner.\n\n## Why NodeDB\n\n- **One binary, not seven services.** No inter-service networking, no schema drift between systems, no data synchronization pipelines. A graph query that feeds a vector search that filters by full-text relevance executes in one process.\n- **PostgreSQL wire protocol.** Connect with `psql` or any PostgreSQL client library. Standard SQL with engine-specific extensions where SQL can't express the operation.\n- **Edge to cloud.** The same engines run embedded on phones and browsers (NodeDB-Lite, 4.5 MB WASM) with CRDT-based offline-first sync to the server.\n- **Serious about performance.** Thread-per-Core data plane with io_uring, SIMD-accelerated distance functions, zero-copy MessagePack transport, per-column compression (ALP, FastLanes, FSST, Gorilla). See benchmarks below.\n\n## Performance\n\n**Timeseries ingest + query benchmark** — 10M rows, high-cardinality DNS telemetry (50K+ unique domain names). Single node, NVMe storage.\n\n### Ingest\n\n| Engine      | Rate         | Time         | Memory     | Disk         |\n| ----------- | ------------ | ------------ | ---------- | ------------ |\n| **NodeDB**  | **93,450/s** | 107s         | **120 MB** | 2,217 MB     |\n| TimescaleDB | 56,615/s     | 177s         | 963 MB     | 2,802 MB     |\n| ClickHouse  | 53,905/s     | 186s         | 1,035 MB   | **1,647 MB** |\n| InfluxDB    | 22,715/s     | 88s (2M cap) | 1,656 MB   | 982 MB       |\n\n### Queries (ms, best of 3)\n\n| Query                      | NodeDB  | ClickHouse | TimescaleDB | InfluxDB (2M) |\n| -------------------------- | ------- | ---------- | ----------- | ------------- |\n| `COUNT(*)`                 | **\u003c1**  | 1          | 423         | 13,110        |\n| `WHERE qtype=A COUNT`      | 47      | **6**      | 347         | 5,297         |\n| `WHERE rcode=SERVFAIL`     | 41      | **6**      | 334         | 1,048         |\n| `GROUP BY qtype`           | 56      | **15**     | 597         | 12,426        |\n| `GROUP BY rcode`           | 52      | **16**     | 604         | 13,183        |\n| `GROUP BY cached+AVG`      | 120     | **33**     | 677         | 13,652        |\n| `GROUP BY client_ip (10K)` | **141** | 157        | 660         | 14,301        |\n| `GROUP BY qname (50K+)`    | 2,665   | **288**    | 3,644       | 16,720        |\n| `time_bucket 1h`           | 101     | **30**     | 603         | --            |\n| `time_bucket 5m+qtype`     | 138     | **99**     | 711         | --            |\n\nNodeDB is not a specialized timeseries database, yet it ingests 1.65x faster than TimescaleDB and 1.73x faster than ClickHouse with 8x less memory. Query latency is competitive with ClickHouse on low-cardinality aggregations and within 3-5x on high-cardinality GROUP BY. This is the tradeoff of a general-purpose engine: you get one system instead of five, with performance that stays in the same ballpark as specialized tools.\n\n## Engines\n\n| Engine                                       | What it replaces             | Key capability                                                                                                          |\n| -------------------------------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| [Vector](docs/vectors.md)                    | pgvector, Pinecone, Weaviate | HNSW with SQ8/PQ quantization, adaptive bitmap pre-filtering                                                            |\n| [Graph](docs/graph.md)                       | Neo4j, Amazon Neptune        | CSR adjacency, 13 algorithms, Cypher-subset MATCH, GraphRAG                                                             |\n| [Document](docs/documents.md)                | MongoDB, CouchDB             | Schemaless (MessagePack + CRDT) or Strict (Binary Tuples, O(1) field access). Typeguards for gradual schema enforcement |\n| [Columnar](docs/columnar.md)                 | ClickHouse, DuckDB           | Per-column codecs (ALP, FastLanes, FSST), predicate pushdown, HTAP bridge                                               |\n| [Timeseries](docs/timeseries.md)             | TimescaleDB, InfluxDB        | ILP ingest, continuous aggregation, PromQL, approximate aggregation                                                     |\n| [Spatial](docs/spatial.md)                   | PostGIS                      | R\\*-tree, geohash, H3, OGC predicates, hybrid spatial-vector                                                            |\n| [Key-Value](docs/kv.md)                      | Redis, DynamoDB              | O(1) lookups, TTL, sorted indexes, rate limiting, SQL-queryable                                                         |\n| [Full-Text Search](docs/full-text-search.md) | Elasticsearch                | BMW BM25, 27-language support, CJK bigrams, fuzzy, hybrid vector fusion                                                 |\n\n## Install\n\n```bash\n# Docker\ndocker run -d \\\n  -p 6432:6432 -p 6433:6433 -p 6480:6480 \\\n  -v nodedb-data:/var/lib/nodedb \\\n  farhansyah/nodedb:latest\n\n# Cargo\ncargo install nodedb\n```\n\nRequires Linux kernel \u003e= 5.1 (io_uring). Connect:\n\n```bash\nndb                              # native CLI (connects to localhost:6433)\npsql -h localhost -p 6432        # or any PostgreSQL client\n```\n\n```sql\nCREATE COLLECTION users;\n\n-- Standard SQL\nINSERT INTO users (name, email, age) VALUES ('Alice', 'alice@example.com', 30);\n\n-- Object literal syntax (same result)\nINSERT INTO users { name: 'Bob', email: 'bob@example.com', age: 25 };\n\n-- Batch insert\nINSERT INTO users [\n    { name: 'Charlie', email: 'charlie@example.com', age: 35 },\n    { name: 'Dana', email: 'dana@example.com', age: 28 }\n];\n\nSELECT * FROM users WHERE age \u003e 25;\n```\n\nSee [Getting Started](docs/getting-started.md) for build-from-source and configuration.\n\n## Deployment Modes\n\n| Mode                | Use case                                                                     |\n| ------------------- | ---------------------------------------------------------------------------- |\n| **Origin (server)** | Full distributed database. Multi-Raft, io_uring, pgwire. Horizontal scaling. |\n| **Origin (local)**  | Same binary, single-node. No cluster overhead.                               |\n| **NodeDB-Lite**     | Embedded library for phones, browsers, desktops. CRDT sync to Origin.        |\n\n## NodeDB-Lite\n\nAll seven engines as an embedded library. Linux, macOS, Windows, Android, iOS, and browser (WASM, ~4.5 MB).\n\n- **Lite only** -- local-first apps that don't need a server. Vector search, graph, FTS, documents, all in-process with sub-ms reads.\n- **Lite + Origin** -- offline-first with CRDT sync. Writes happen locally, deltas merge to Origin when online. Multiple devices converge regardless of order.\n- **Same API** -- the `NodeDb` trait is identical across Lite and Origin. Switch between embedded and server without changing application code.\n\nSee [NodeDB-Lite](https://github.com/NodeDB-Lab/nodedb-lite) for platform details and sync configuration.\n\n## Key Features\n\n**Write-time validation** -- Typeguards enforce types, required fields, CHECK constraints, and DEFAULT/VALUE expressions on schemaless collections. Graduate to strict schema with `CONVERT COLLECTION x TO strict`.\n\n**Real-time** -- CDC change streams with consumer groups (~1-5ms latency). Streaming materialized views. Durable topics. Cron scheduler. LISTEN/NOTIFY. All powered by the Event Plane.\n\n**Programmability** -- Stored procedures with `IF/FOR/WHILE/LOOP`. User-defined functions. Triggers (async, sync, deferred). `SECURITY DEFINER`.\n\n**Security** -- RBAC with GRANT/REVOKE. Row-level security with `$auth.*` context across all engines. Hash-chained audit log. Multi-tenancy with per-tenant encryption. JWKS, mTLS, API keys.\n\n**Six wire protocols** -- pgwire (PostgreSQL), HTTP/REST, WebSocket, RESP (Redis), ILP (InfluxDB line protocol), native MessagePack.\n\n## Tools\n\n- **[`ndb`](https://github.com/NodeDB-Lab/nodedb-cli)** -- Native CLI with TUI, syntax highlighting, and tab completion. Alternative to `psql`.\n- **[NodeDB Studio](https://github.com/NodeDB-Lab/nodedb-studio)** -- GUI client for managing collections, browsing data, and monitoring. _(coming soon)_\n- **[nodedb-bench](https://github.com/NodeDB-Lab/nodedb-bench)** -- Performance benchmarks against competing databases.\n\n## Documentation\n\n- [Getting Started](docs/getting-started.md) -- Build, run, connect\n- [Architecture](docs/architecture.md) -- Three-plane execution model\n- [Engine Guides](docs/README.md) -- Deep dives into each engine\n- [Security](docs/security/README.md) -- Auth, RBAC, RLS, audit, multi-tenancy\n- [Real-Time](docs/real-time.md) -- CDC, pub/sub, LIVE SELECT\n- [NodeDB-Lite](https://github.com/NodeDB-Lab/nodedb-lite) -- Embedded edge database\n- [AI Patterns](docs/ai/README.md) -- RAG, GraphRAG, agent memory, feature store\n\n## Building from Source\n\nFor development or contributing:\n\n```bash\ngit clone https://github.com/NodeDB-Lab/nodedb.git\ncd nodedb\ncargo build --release\ncargo test --all-features\n```\n\n## Status\n\nPre-release. All engines implemented and tested. Not yet deployed in production.\n\n## License\n\nNodeDB is licensed under the [Business Source License 1.1](LICENSE.md). You can use NodeDB for any commercial purpose — SaaS products, AI platforms, internal tools, self-hosted deployments, anything. The only restriction is offering NodeDB itself as a hosted database service (DBaaS) or commercial database tooling; that requires a [commercial license](LICENSE.md). Converts to Apache 2.0 on 2030-01-01.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodedb-lab%2Fnodedb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodedb-lab%2Fnodedb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodedb-lab%2Fnodedb/lists"}