Tag
Posts tagged “architecture”
·7 min read
Exactly-once is a WHERE clause: surviving duplicate carrier webhooks
Carriers deliver webhooks at least once, out of order, and sometimes twice under different ids. Here is how Handset turns that into one message status, one billed minute, and one event to your endpoint, with a unique index, a handful of guarded UPDATEs, and no dedupe service.
Jose Zamudio
·6 min read
Charging for usage without ever double-billing
A usage-based API has one bug it cannot ship: charging twice. Here is how Handset meters prepaid usage against an append-only ledger, why idempotency lives in a unique index instead of application code, and the migration that almost back-billed every account on day one.
Jose Zamudio
·6 min read
Anatomy of a media gateway: raw call audio over WebSockets
How Handset streams live call audio in both directions: two socket faces, one neutral frame protocol, drop-oldest buffering, and a Postgres row that coordinates a teardown across two processes.
Jose Zamudio
·7 min read
We built a fake carrier so you never have to test against a real one
Test keys on Handset run a complete simulated carrier behind the same interface as the real one: delivery receipts, replies, ringing phones, even raw call audio. Here is how it is built and why it is a product feature, not a test helper.
Jose Zamudio