https://github.com/theremyyy/nyro-db
NyroDB is a next-generation database engine built from the ground up in Rust. It utilizes Zero-Copy Serialization, Asynchronous Batching, and Secondary Indexing to achieve performance that transcends modern understanding
https://github.com/theremyyy/nyro-db
dashmap database database-engine databases db engine performance realtime rust zero-copy
Last synced: 23 days ago
JSON representation
NyroDB is a next-generation database engine built from the ground up in Rust. It utilizes Zero-Copy Serialization, Asynchronous Batching, and Secondary Indexing to achieve performance that transcends modern understanding
- Host: GitHub
- URL: https://github.com/theremyyy/nyro-db
- Owner: TheRemyyy
- License: mit
- Created: 2025-12-11T20:50:42.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-12-29T04:13:03.000Z (about 1 month ago)
- Last Synced: 2026-01-13T20:40:43.945Z (23 days ago)
- Topics: dashmap, database, database-engine, databases, db, engine, performance, realtime, rust, zero-copy
- Language: Rust
- Homepage: https://nyro-db.vercel.app/
- Size: 166 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NyroDB
**The Fastest Real-Time Database in the Known Universe**
[](https://veloxframework.vercel.app)
[](https://www.rust-lang.org/)
[](https://github.com/TheRemyyy/nyro-db)
*A hyper-performant, zero-copy, real-time database engine designed for extreme throughput and universal versatility.*
[Features](#features) • [Installation](#installation) • [Documentation](#documentation) • [API Guide](#api-guide) • [Configuration](#configuration)
---
## Overview
NyroDB is a next-generation database engine built from the ground up in Rust. It utilizes **Zero-Copy Serialization (Bincode)**, **Asynchronous Batching**, and **Secondary Indexing** to achieve performance that transcends modern understanding. Whether you're building a real-time messaging app, a high-frequency trading platform, or a secure authentication system, NyroDB provides the speed and flexibility you need.
### Key Features
- **⚡ Extreme Throughput** — Capable of **1,000,000+ operations per second** with sub-microsecond latency.
- **🧠 Universal Querying** — O(1) secondary indexing on any field. Query by custom metadata instantly.
- **🌐 Real-Time Native** — Built-in WebSocket server for instant data streaming and pub/sub notifications.
- **🛡️ Secure by Design** — Native API Key authentication and schema validation for production-grade safety.
- **🚀 Zero-Copy Storage** — Optimized disk persistence using memory-mapped files and ultra-fast serialization.
- **📊 Real-Time Metrics** — Detailed performance monitoring including throughput windows and p99 latency stats.
### From Source
```bash
git clone https://github.com/TheRemyyy/nyro-db.git
cd nyro-db
cargo build --release
```
### Running
```bash
./target/release/NyroDB
```
NyroDB exposes a simple yet powerful REST and WebSocket API.
### REST Endpoints (Port 8081)
| Method | Endpoint | Description |
| :--- | :--- | :--- |
| `POST` | `/insert/:model` | Insert a new JSON record. |
| `GET` | `/get/:model/:id` | Retrieve a record by its primary ID. |
| `GET` | `/query/:model` | List all records in a model. |
| `GET` | `/query/:model/:field/:value` | **O(1)** search by secondary index. |
| `GET` | `/metrics` | Retrieve real-time performance statistics. |
### Real-Time WebSocket
Connect to `ws://127.0.0.1:8081/ws` to receive instant updates.
Format: `INSERT:model_name:{"id":123,...}`
NyroDB is configured via `nyrodb.toml`.
```toml
[server]
host = "127.0.0.1"
port = 8081
[security]
enable_auth = true
api_key = "your_secret_key"
[performance]
batch_size = 10000
max_concurrent_ops = 100000
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
Built with ❤️ and Rust