On Software Architecture

The Insurance Policy I Stopped Paying

For most of my career I treated vendor lock-in as something close to a moral failure. Twenty-plus years later, I can report on how that bet paid off.

January 2025 · 6 min read

If an abstraction kept me out of a vendor's gravity well, I used it. I wrote SQL that would run anywhere instead of Oracle-specific code, or Informix-specific, or SQL Server-specific. Stored procedures made me nervous. If a query could stay generic, that was a win. CloudFormation or Terraform? Terraform, obviously — same infrastructure, no single cloud holding the deed. The same instinct went everywhere: queues, caches, object storage, auth. Wrap it. Keep the seam clean. Stay portable.

The reasoning was simple. If we ever had to move, we'd thank ourselves.

Twenty-plus years later, I can report on how that bet paid off. It didn't.


Where the hedge failed

Two ways it failed

The first way: the migration never came.

In most systems I've built, the database we launched on was the database we retired on. The catastrophe I was buying insurance against (SQL Server to Oracle, Oracle to something cheaper) never arrived. What actually arrived was version upgrades. Same engine, newer release, and the generic-SQL discipline bought us nothing there that a decent test suite wouldn't have. I paid a premium every sprint for a fire that never broke out.

The second way is more interesting, because it's the case where I should have been vindicated.

We did have to migrate from AWS to Azure once. This was back when Azure was well behind Amazon: the managed services weren't at parity and half the ergonomics we relied on simply didn't exist yet. We had abstraction layers. They helped at the margins. But the heavy part of that migration was never in the layer we'd built: the identity model, the networking assumptions, the failure behavior of managed services, the operational muscle memory of an entire team. Our abstractions covered the parts that were cheap to move anyway. Everything expensive stayed expensive.

The pattern worth naming

Generalization protects you from the portion of the problem you were already going to survive.


The real purchase

What I was actually buying

Portability was the story I told. The real purchase was something else.

Writing code was slow and expensive. A data access layer was a quarter of someone's life. Re-implementing an infrastructure stack against a new provider was a project with a name and a budget line. When rewriting is that costly, paying a little complexity tax up front to avoid a catastrophic rewrite later is a rational trade. The hedge was never against Oracle. It was against the cost of my own keyboard.

That's worth saying plainly, because the trade only works while that cost holds.


Same pattern, different decade

And I'm doing it again

I caught myself last month building an agent with a provider abstraction in it. Swap OpenAI for Gemini for Claude in a heartbeat. Either LangChain or my own thin wrapper — written with an AI's help, because it's 2026 and that's how the wrapper gets written now.

Same instinct. Same story. Same premium.

And the premium is real. Two parts to it.

The obvious one is complexity. Every abstraction is a layer someone has to read, debug, and keep current, and provider APIs move fast enough now that the wrapper is never quite done.

The one that costs more is the tuning. Native is where the good stuff lives — prompt caching, structured output, the specific shape of a provider's tool-calling, each model's context layout, reasoning controls that behave differently on every family. A generic layer standardizes on the intersection of what everyone supports, which means it standardizes on the least capable common denominator and hides the rest. You end up with an agent that runs on three providers and is tuned for none of them. You end up with a universal remote: it turns on every TV and controls none of them well.


The premise that changed

The number that moved

The premise underneath twenty years of my architectural caution was that code is expensive. That premise is the thing that changed.

If a native integration is a day of work instead of a quarter, portability stops being an architecture problem and becomes a regeneration problem. You don't need a translation layer that speaks every provider badly. You need a clear interface at the edge of your application and the willingness to rewrite what's behind it when the day comes. Rewriting an OpenAI-native adapter as a Claude-native one is now closer to an afternoon than a migration.

I'm not arguing for spaghetti. The boundary still matters — name the seam, keep provider details on one side of it, don't let vendor types leak into your domain model. That part is cheap and it's always been worth it. What I'm giving up is the deep translation layer underneath the seam, the one that promises the switch will be free and delivers a system that's mediocre everywhere instead.

Go native, use the knobs, and tune the thing until it's actually good on the provider you picked.

Twenty years of premiums, and I never filed the claim. I'm done paying that one.