Background · 1
MelodyDB started from that question. If an application had to declare all its queries at build time, could you build a different kind of database?
Most applications already declare their queries. Developers write them in code, usually through an ORM. But that is invisible to the database. Its interface is still largely “all of SQL”, so it has to support everything you have told it you don’t need.
If the application declares its queries to the system instead, the system can compile them. It can also choose the storage engine for exactly those queries, or shape one to fit them.
Query execution and planning are hard.
Lucene, Postgres and MongoDB are general-purpose engines. They carry machinery, at compile time and at run time, that any one application will never use. That is a tax on the user. Good systems can minimize the tax, but they usually do it by adding complexity.
A query engine that accepts any query at any time can’t know which behaviour an application depends on, so every change underneath risks breaking someone, and the engine gets harder to change every year.
Redis is the counterexample. Its author, Salvatore Sanfilippo, built it with no query engine. He wrote in 2012: “your data inside Redis is stored in a way that is natural to query for your use case, that’s why is so fast apart from being in memory, there is no query analysis, optimisation, data reordering. You are just operating on data structures via primitive capabilities offered by those data structures.” Redis can do a great deal because it has less machinery. That inspired MelodyDB.
Sanfilippo names the trade in the same post: “Redis is not the kind of system where you can insert data and then argue about how to fetch those data in creative ways.” And: “You need to design with the query patterns in mind.”
The application server is where the queries live. Put it inside the database, and the system knows every query and what the developer expects from it.
The two are closer than they look. An application server and a database mostly use similar data structures to serve data. Much of the difference comes down to durability.
Admission control is the other reason. Most systems don’t design it in, and the user experience shows it. Often the user just sees a 429 or a 503. It is like a busy restaurant that, once it is fully booked, boards up the whole place and hangs a CLOSED sign.
Deciding which work to accept, slow down or refuse has to run all the way from the incoming request to the storage underneath. It can’t be an afterthought.
Running a simple CRUD app should be cheap. The CPU, IO and disk it uses cost pennies. But to get that cost you have to pack many apps together on the same machines. Cloud providers can do that and you can’t.
One of my Vercel invoices had eight metered line items: build minutes, ISR reads, ISR writes, web analytics events, active CPU, origin transfer, provisioned memory and observability events. Seven of them came to 42 cents together. The eighth, 493 build minutes, cost $23.43. Cloudflare sent me an invoice for $183 after D1, its database, started replicating globally.
Both were my fault. I made every decision that led to them. But fixing either one meant rethinking the entire design.
Cloud providers make their money later. Once you grow past a certain size, or need a certain feature, they start charging, and the charge is often metered, not fixed. So you build up to a point, put your credit card in expecting not to use it, and get a bill because you tripped a metering trigger you didn’t know was there.
It gets worse. The free part tends to be what’s popular: a database and an application server. If you need logging, observability, search, workflows or analytics, you sign up for more services. Now your to-do app has ten accounts, each with its own limits and its own surprise costs. If the app grows across any of them, each one wants to charge you a little.
So I asked what would happen if all of that was just there. At small scale you shouldn’t need separate services, and it should still be extremely cheap. At large scale it should grow with you, and you should still be able to eject to a specialized service if you want. A database with specialized engines inside it might be able to do that. That is what MelodyDB should do.
Rust was the obvious choice. It compiles to native code, so it can be fast and efficient. It is memory safe. It also compiles to Wasm, which brings a sandbox for safety and the browser as a target.
Google reported in November 2025 that Android’s Rust code has about a thousandth of the memory safety vulnerability density of its C and C++ code. The number is still not zero. A month later the Linux kernel assigned its first CVE to Rust code. So the goal is to eliminate third-party Rust dependencies. An agent can build production-quality components and systems, so MelodyDB doesn’t need to bring in many third-party ones.
In August 2026 a worm called ChainDrop compromised more than 400 npm packages. It ran automatically when someone installed a package, collected the developer’s credentials, and used their publishing token to put itself into every package they could publish. A year earlier a worm called Shai-Hulud compromised over 500 in a similar way. Those modules are often unnecessary. MelodyDB is responsible for the application server too, so it can remove many of the supply chain problems that come with npm.
Patching won’t fix this, because adversarial agents have a disproportionate incentive to find vulnerabilities. The platform must be safe by construction, as much as possible.
Agents don’t reach for packages unless you tell them to. They write what they need directly, and in doing so they can make mistakes or hide design choices. There are two ways to handle that. Build more into the platform, so an application needs fewer components. Then teach agents how and when to use a component safely.
I am a single developer attempting a project that would need a large team. Coding agents make that possible, and they shape both what I make and how I make it. What I’m making is large and ambitious. How I’m making it is solo, with agents and no funding.
I spent the last 20 years running large engineering teams, of 100 people and more, and AI works well for me. At my job I didn’t write code, but I was still responsible for the outcomes. I had to understand and approve the design, guide a talented technical team, and provide a product and engineering vision. With agents this is basically what you do, except without the humans.
Agents are good at databases. They have learned from a large body of database code and design, which is why there is an explosion of rewrites in Rust. For me, that means I don’t need to be a storage engine expert or a consensus expert. The agent can do that, and it can start from hard-won design lessons, such as using deterministic simulation testing to ensure correctness.
I backfilled this note. I came up with these ideas a few months ago and wrote them down here later. I will backfill more of the design notes over time. Some design decisions have changed since then, and these notes are meant to show my thinking at the time. The design page says where the design stands today.
Leave an email to hear when there is something to run.