▲ 0 r/milansql+1 crossposts

MilanSQL is now live on a Hetzner server (614 tests passed, 492KB RAM idle)

Following up on my last post: I just deployed the C++17 engine to a live Hetzner cloud server in Germany.

The background agent finished phase 152 and we are up to 614 passing architecture tests. The binary is incredibly lightweight, idling at just 492KB RAM on Ubuntu.

You can check out the live Web UI here to run queries or break the query planner:http://178.105.206.36:8080/webui

It also exposes the raw protocol interfaces if you want to connect via terminal:

Full source code, documentation for the BM25 full-text search, and the B+ Tree storage layer are open-source:https://github.com/haidari9819-lang/milansql

Let me know if you manage to crash the server!

reddit.com
u/Effective-Hurry436 — 5 days ago
▲ 7 r/milansql+1 crossposts

Added Okapi BM25 full-text search to my custom C++17 engine. Turns out math is actually useful.

u/Effective-Hurry436 — 6 days ago
▲ 0 r/u_Effective-Hurry436+1 crossposts

I mapped out the actual hardware limits & production capacity of my custom C++17 database engine (MilanSQL v5.9.0) running on a single $8/mo server. Here is what 248 integration tests and stress-testing revealed.

u/Effective-Hurry436 — 7 days ago
▲ 4 r/milansql+1 crossposts

Welcome to r/milansql! A Custom Relational Database Engine Built from Scratch in C++17 and Compiled to WebAssembly

Welcome to the official subreddit for MilanSQL!

This community is dedicated to the development, architecture, and engineering journey of MilanSQL—a relational SQL database engine written entirely from scratch in pure C++17 (zero external dependencies) and compiled to WebAssembly to run fully client-side directly in your browser.

Whether you are a compiler enthusiast, a database architect, a C++ dev, or just curious about storage engines, you’ve found the right place!

---

### 🚀 Try It In Your Browser

You don't need to configure any servers, open TCP ports, or install dependencies. You can run raw SQL queries, create tables, and test the optimizer live in a clean browser sandbox:

👉 Live WASM Demo: https://haidari9819-lang.github.io/milansql/index.html

📦 GitHub Repository: https://github.com/haidari9819-lang/milansql

---

### ⚙️ Deep-Dive Technical Architecture

MilanSQL is designed as an educational yet highly robust deep-dive into advanced database internals. Key core components include:

* **Cost-Based Query Planner:** Features a Dynamic Programming (DP) optimizer that evaluates 2^n subsets for multi-table JOINs based on data connectivity graphs.

* **Selectivity Estimation:** Re-engineered stats layer utilizing bucket-based equi-depth histograms for highly precise query optimization (<, <=, >, >=, =).

* **Lock-Free Plan Cache:** Concurrent execution caching that handles per-table plan invalidations cleanly using atomic counters (std::atomic) instead of heavy mutex locking.

* **Core Execution Layer:** Custom B-Tree indexing, native full-text search engine, and an embedded vector search engine supporting pgvector standards (HNSW index).

* **Multi-Protocol Interface:** Speaks standard SQL, acts natively as a PostgreSQL wire protocol endpoint, and supports GraphQL schemas.

* **Tested Rigorously:** Built with architectural stability in mind, backed by a growing testing framework (currently 223/223 integration tests passing).

---

### 💬 Join the Conversation!

Feel free to open up a new post here anytime to:

  1. Ask questions about the C++ execution layer or WebAssembly build target.

  2. Share interesting query benchmarks or stress-test the browser sandbox.

  3. Drop feedback, suggest features, or follow along with the upcoming Phase updates.

Thanks for stopping by, and happy querying!

reddit.com
u/Effective-Hurry436 — 7 days ago