datalevin  by datalevin

Fast Datalog database for diverse workloads

Created 5 years ago
1,398 stars

Top 28.6% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Datalevin is a simple, fast, and versatile open-source Datalog database for developers preferring declarative querying over SQL. It offers high performance, ACID compliance, and broad functionality.

How It Works

Datalevin implements a Datomic-style Datalog query language with a novel cost-based query optimizer, achieving performance competitive with SQL and graph databases. It's built on a fork of LMDB for durable storage and high read throughput, supporting ACID transactions, WAL, and asynchronous transactions for write-intensive workloads. This approach prioritizes simplicity and familiar semantics.

Quick Start & Requirements

Primarily a Clojure library, Datalevin offers embedded JVM, client/server (port 8898), and babashka pod options. Requires a Clojure environment; Java consumers need Maven Central. See doc/install.md and https://cljdoc.org/d/datalevin/datalevin for details.

Highlighted Details

  • Performance: Benchmarks show significant gains over PostgreSQL/SQLite on complex queries (e.g., 2.4x faster than PostgreSQL on JOB-bench) and superior write transaction speeds (over 20x faster than SQLite async). Outperforms Datomic/Datascript on complex reads.
  • Versatility: Functions as a Datalog DB, high-performance EDN key-value store, document DB (JSON/EDN/Markdown with path indexing), and integrates vector DB capabilities with SIMD search.
  • Deployment: Supports embedded library, client/server with RBAC, and babashka pod integration.
  • Advanced Features: Novel full-text search engine and an advanced, high-performance rule engine.

Maintenance & Community

Actively developed with a clear roadmap to v3.0.0, including HA and JSON APIs. Used in production by Juji. Community engagement via #datalevin on Clojurians Slack.

Licensing & Compatibility

Licensed under the permissive Eclipse Public License (EPL), suitable for commercial and closed-source applications.

Limitations & Caveats

Intentionally omits Datomic's temporal features for simplicity. Features like read-only replicas, high availability, and a JSON API are planned for v1.0.0 and are not yet implemented.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
9
Star History
16 stars in the last 30 days

Explore Similar Projects

Starred by Mike Krieger Mike Krieger(CPO at Anthropic; Cofounder of Instagram), Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), and
25 more.

redis by redis

0.2%
74k
Redis is a versatile data structure server, cache, and query engine
Created 17 years ago
Updated 1 day ago
Feedback? Help us improve.