What to Do With Discarded Toys? Or, When Your Prototype Outlives Its Problem

Reading time:1347 words, 7 min read
Last edited:
What to Do With Discarded Toys? Or, When Your Prototype Outlives Its Problem

CambiumDB started its life with an uninspired name, content-service, as a prototype for a problem at Homa, and it outlived that problem. This post is about what I did with it next: how I went looking for a problem (an engineering tale as old as time), what the research turned up, and why I kept going anyway.

Two jobs at Homa

The prototype had two jobs in mind, and it lost both of them.

The first was a memory layer for AI agents. Agents are good at working with files, so the plan was a file system API over S3, because EFS is expensive. Almost the same week I wrapped up that prototype, AWS launched S3 Files, which mounts S3 buckets as file systems. That was the safer, cheaper bet, so we went with it.

The second was serving raw property data to a data layer that worked out derived fields on demand. Hot data sat in memory and Redis, and everything lived in S3. When you knew which record you wanted, it was fast and cheap, much like a key-value store. What it didn't solve was discoverability: finding the records you didn't already know about. That's a search problem. We could have put a search layer next to a raw-data layer, stitched them together, and put them behind a single interface, but splitting the two was far too complex and would not meet our road map goals. We wanted to move fast and not reinvent the wheel, so we went with a much simpler, consolidated design. That's a story for another day and Homa's technical blog, not here.

A solution without a problem

That left me with a prototype and no problem. I didn't want to throw it away. It was fun to build, well tested and, for the most part, well designed.

So I did what I'd do with any research project. I asked two questions:

  1. does this solve anyone else's problem; and
  2. if it does, is anything about it new?

Why I went to the literature

In my experience, the best ideas come from deep experience in a field. You learn where the pitfalls and sharp edges are and where the prior art falls short, and over time that turns into intuition. I don't have that intuition for databases or distributed systems yet. When you don't have it, you lean on prior art to get ideas.

I also ruled out one easy answer early. Rewriting a service in Rust, so it's faster and more reliable, used to count as a contribution by itself. It counts for less now. Plenty of databases are being rewritten in Rust or started in it, and AI has lowered the cost of large rewrites.

What the research turned up

I spent a few days reading: one literature review on commit protocols, and another on attacks against shared agent memory. Most of what I found was a polite no.

Syncing edge devices through a bucket had been done. My first idea was to let devices write while disconnected and reconcile later, with the bucket as the place everything syncs to. The classic system for this is Bayou. ECROs (2021) already does operations with preconditions, a deterministic order without a leader, and rollback and replay, and IceCube (2001) and SECRO (2019) covered similar ground before it. What's missing is a well-built, maintained implementation. That's a fair goal, but it isn't new research.

Without a central server, the order never becomes final. A replica that comes back from being offline, not even a malicious one, can make earlier decisions fail after the fact. Bayou avoided this with a primary server. In CambiumDB, the bucket can play that role.

Byzantine fault tolerance has hard limits. A Byzantine node is one that can lie. Kleppmann and Howard showed that a peer-to-peer database can resist fake identities only if every transaction keeps its invariants no matter how concurrent updates merge. Kleppmann's Byzantine-tolerant CRDTs make every honest replica end up in the same state, but an update that is well formed and plausible gets accepted everywhere. The replicas agree on what was written, not on whether it's true.

The angle that pulled me back

That last point brought me back to agents. If a team of agents shares one memory, what happens when one of them is compromised and starts writing plausible but wrong information? How fast does it spread, and how much does it hurt the reliability of the whole system? The same question applies outside of LLMs. Drone swarms are Byzantine systems too: some members may be malicious, and the swarm has to recover.

Out of curiosity, I wanted to know what the current state of research was on this problem, so I dug into the literature. My first instinct was that it wasn't much of a threat: most agents work alongside people, and people would notice the drift and correct it. The evidence says otherwise. Overreliance is the most common error when people make decisions with AI, Claude Code users approve 93% of its permission prompts, and in one study participants missed misinformation in 39% of ChatGPT's answers. Early memory attacks spread poorly from one agent to the next, but newer ones are built to spread. Byzantine-tolerant replication doesn't catch any of this, because a well-formed lie is still a valid update. And in the cases I read, how long it took to notice the poison mattered more than how hard it was to roll back. I wrote up the full findings in Trusted Writers, Poisoned Memory.

The malicious case isn't the only one that matters, though. Even when every agent is trustworthy, context drift is normal. As centralized context layers become the norm, more agents read from and write to them, and direct human oversight shrinks. One agent with bad local state can then put the same discrepancy into the shared context over and over, and it leaks into code or marketing copy. Finding and correcting it is a tax in itself, and unless you find the agent with the bad state, you can't keep it from happening again.

I already see the benign version on my engineering team. An agent invents a requirement, or inflates its scope or importance, and it starts leaking across PRs: into subtle implementation choices, into comments, into review guidance. If it isn't rooted out at the source, it keeps cropping up like a weed. And if a person with the right context doesn't notice it right away, it gets harder to contain. So I suspect the benign versions of this problem will become a more common concern for organizations and teams.

Recovery is where it got interesting. Dependency-Guided Rollback Repair (2026) quarantines a bad memory and everything derived from it, then replays what's left. Deleting the bad entry isn't enough, because claims built on it stay behind, and resetting the whole store throws away good data. That's close to how CambiumDB already works. Every write goes into an ordered log, so you can find everything that came after a bad entry and replay around it.

Fine, it's for me

That's where CambiumDB is headed: a data layer between field nodes and a central hub, where a bad write can be traced, quarantined and replayed. But I've stopped needing it to be new. It's fine if this is just for my own learning. Here's what I want out of it:

  • Rust, in a real codebase.
  • Database internals: commit, logs, checkpoints and compaction, learned by building them.
  • CRDTs, distributed systems and Byzantine systems, through a deterministic simulator that can replay any failure.
  • A shot at something new. If good ideas come from intuition, building this is how I get some.

The name

GroveFS had to go. It isn't a file system, and GroveDB was taken. The cambium is the thin layer under a tree's bark that does the growing. It lays down a new ring each year, which is the history, and it walls off wounds so rot can't spread, which is the quarantine.

The first thing all this produced is a series on commit, starting with What Is a Commit, Really?.