One interface, every protocol (openbindings.com)

by clevengermatt 26 comments 57 points
Read article View on HN

26 comments

[−] clevengermatt 29d ago
Hi HN. OpenBindings is an open spec for describing what a service does once and binding it to any protocol. You define operations with input/output schemas, then point at your existing OpenAPI doc, proto file, MCP server, or whatever else. The spec doesn't replace any of them. They're inputs.

The short version of why: programming languages have had interfaces and duck typing forever. You code to a shape, not an implementation. The web never got a successful equivalent at the network boundary. OpenBindings is an attempt at that.

What's here today: - The spec (v0.1.0): https://openbindings.com/spec - ob CLI: https://github.com/openbindings/ob - Go SDK: https://github.com/openbindings/openbindings-go - TypeScript SDK: https://github.com/openbindings/openbindings-ts - Binding executors for different protocols

Fastest way to try it: brew install openbindings/tap/ob ob demo

That starts a coffee shop service on six protocols. ob op exec localhost:8080 getMenu calls it. The CLI discovers the OBI (OpenBindings Interface) at /.well-known/openbindings and handles the rest.

Would love feedback on the spec design.

[−] mindcrime 29d ago
Huh. This sounds really interesting. Will definitely give it a look later this evening. At first blush, this sounds like something I could use.
[−] clevengermatt 29d ago
Thanks! Happy to answer any questions if you're interested. The ob demo is the fastest way to see it end to end. Starts a service on six protocols and lets you call it from the CLI.
[−] aaomidi 29d ago

> The spec doesn't replace any of them. They're inputs.

Claude wrote this

[−] clevengermatt 29d ago
Claude writes a lot these days. Sometimes, if it works, I don't change it. Good sense of smell on you.
[−] yencabulator 27d ago

> Stripe publishes an OBI, other payment providers declare a stripe.payments role, or a community defines a neutral payment-processor interface. No central registry, no governance bottleneck.

Except for the central registry of "stripe" and "payment-processor"?

[−] clevengermatt 27d ago
[dead]
[−] riwsky 29d ago
The web IS the duck typing equivalent at the network boundary! That’s why plenty of alternative service providers can and do implement eg object storage APIs that work with aws s3 client libraries, or LLM APIs that work with Claude Code. The reasons these use cases are standardized (while others remain fragmented) are economic, not technical (lock-in isn’t as profitable for these alt services as raw adoption)—and so a purely technical solution like this is unlikely to address the crux of the problem.

Even purely on the technical level, this seemingly hasn't internalized the lessons of https://xkcd.com/927/

[−] clevengermatt 29d ago
On the web being the duck typing equivalent. That's ad-hoc duck typing at the wire format level. S3-compatible APIs exist because companies reverse-engineered S3's surface and matched it. You have to replicate the paths, headers, and response shapes closely enough that the client libraries can't tell the difference, or they break. There's no spec that declares "I satisfy the S3 interface" and no way for a tool to verify compatibility without running requests.

OBI operates at the contract level instead. Two services with different wire formats can satisfy the same interface as long as their operation shapes match. The binding executors handle the wire differences. That's the duck typing analogy. Match the shape, not the implementation.

You're right that the drivers are partly economic. But technical standards and economics aren't isolated from each other. Terraform, Kubernetes, and OpenAPI itself are technical solutions that enabled economic behavior that wasn't viable before them. Lowering the cost of interop changes what's economically rational to pursue.

On the xkcd, the post addresses this. OBI structurally can't replace OpenAPI, gRPC, or MCP. An OBI without sources and bindings pointing to them is an unbound contract, not an actionable interface. The dependency runs one way. Those specs are inputs, not competitors.

[−] yencabulator 27d ago
None of the non-AWS copies of S3 implement exactly the S3 protocol. And even if they did, the next update -- coming at any arbitrary time -- would invalidate the full compatibility.
[−] rrgok 29d ago
All that song and dance about programming languages advantages and you chose to use JSON?

Man I hate JSON so much.

[−] quellhorst 29d ago
Shouldn't AI have made this less of a problem by now?
[−] vivzkestrel 29d ago
this means AWS and GCP ll have to implement your specification right?