What is jasonisnthappy?
jasonisnthappy is a lightweight, embedded document database written in Rust with ACID transactions and MVCC (Multi-Version Concurrency Control) support. It provides a simple, file-based solution for applications that need reliable JSON document storage without the overhead of a separate database server. Designed for developers who want the power of a document database with the simplicity of SQLite, jasonisnthappy runs entirely within your application process and stores data in a single file.Key features
Pure Rust
No
unsafe code in the core library, ensuring memory safety and reliabilityACID transactions
Full commit/rollback with conflict detection and write-ahead logging
MVCC support
Snapshot isolation where reads never block writes and writes never block reads
Cross-platform
Works seamlessly on macOS, Linux, and Windows
Core capabilities
Document storage
- JSON documents with automatic ID generation
- Upsert operations for flexible data management
- Schema validation using JSON Schema
- Configurable document size limits
Advanced indexing
- B-tree storage engine with copy-on-write
- Single-field and compound indexes
- Unique indexes for data integrity
- Full-text search with TF-IDF scoring and Unicode tokenization
Query and aggregation
- Rich query language with logical, comparison, and membership operators
- Dot notation for nested field access
- Aggregation pipeline with group, match, sort, project, and accumulator stages
- QueryBuilder with fluent API for sorting, pagination, and projections
Production-ready features
- Write-Ahead Logging (WAL): Checksummed for crash recovery and durability
- Change streams: Real-time notifications on insert, update, and delete operations
- Bulk operations: High-throughput batch inserts and writes
- Backup & restore: Point-in-time snapshots with file locking
- Garbage collection: Reclaim space from old MVCC versions
- Read-only mode: Safe concurrent access for read replicas
- LRU page cache: In-memory caching with corruption detection
- Metrics: Track transactions, cache, WAL, and errors
Developer experience
- Web UI & REST API: Built-in dashboard and CRUD endpoints for easy exploration
- CLI: Interactive REPL and command-line access
- Language bindings: Use from Rust, Go, Python, or JavaScript (Node/Deno/Bun)
- Configurable: Tunable cache, checkpoints, permissions, and limits
Use cases
jasonisnthappy is ideal for:Desktop applications
Embedded storage for Electron, Tauri, or native desktop apps
Command-line tools
Local data persistence without external dependencies
Edge computing
Lightweight database for IoT devices and edge servers
Mobile backends
Embedded database for mobile applications
Development and testing
Quick prototyping with a simple, file-based database
Microservices
Service-local data storage with ACID guarantees
Performance characteristics
All benchmarks run with ACID guarantees and MVCC enabled:- Bulk inserts: ~19,150 documents/sec (1000 docs/transaction)
- Single insert: ~8ms with full fsync durability (WAL + DB file)
- Query speed: Sub-millisecond queries even on 2500+ document collections
- Concurrent writes: Linear scaling with thread count up to core count
- MVCC overhead: Minimal - reads don’t block writes, writes don’t block reads
See the full performance benchmarks in the repository for detailed metrics across write, read, bulk insert, query, and update operations.
Multi-language support
jasonisnthappy provides first-class support for multiple programming languages through a shared C FFI layer:Get started
Quickstart
Get up and running with jasonisnthappy in 5 minutes
Installation
Install jasonisnthappy for your language and platform
Core concepts
Learn about transactions, collections, and MVCC
API reference
Explore the complete API documentation
Open source
jasonisnthappy is open source and licensed under MIT. Contributions, issues, and feature requests are welcome!View on GitHub
Star the repository and contribute to the project