Tagged Posts

#Api-Design

2 posts tagged with "Api-Design"

golang

The Firehose You Never Subscribed To — Three States of a WebSocket Subscription

Nov 7, 2026 6 min read

Every job I run broadcasts its status to every connected WebSocket client. Every step update too. The ranch mule worker panes, the workflow UI, my own debugging scripts — they all sit on the same /ws firehose and filter in JavaScript, or don’t filter at all and just burn bandwidth reading updates for jobs they will never render.

When Herd H3.4 asked for per-job subscriptions, the obvious implementation was the boring one: clients subscribe, unsubscribed clients get nothing. The problem with the obvious implementation is the ranch mule worker pane. It connects, it never sends a subscribe op, and it expects to see everything. Make “no subscription” mean “nothing” and every existing client goes dark on deploy day.

Read Article
golang

Tenancy Parity: What Adding Users to a Single-Tenant Go API Actually Cost Me

Oct 30, 2026 5 min read

For most of its life, mule’s API had exactly one tenant: me. No users table, no keys — the API was the trust boundary, guarded by which host could reach it. That’s an honest design for a single-operator system. It’s also a wall between mule and anything resembling a fleet.

Herd H3.1 — shipped in commit 93aad23 as “tenancy parity” — tore the wall down and rebuilt it properly: users, API keys, and owner-scoped everything, at parity with forge, my memory service, which already had tenancy. “Parity” was the operative word. I didn’t design a tenancy model; I copied a proven one and paid the interesting costs in the seams. Here’s where the money went.

Read Article