Tombstone
Adama web: the HTTP tier and the browser library
Dec 2021 โ Apr 2026 ยท age 39โ44
What it was
The front door of Adama. A Netty server spoke HTTP/2 and WebSockets, fetched a TLS certificate per domain as requests arrived, and carried two JSON protocols, the document protocol and MCP, on one WebSocket path. It pinged every browser once a second, so silence meant something. Assets flowed through a cache where the first requester did the work and everyone else followed, and images could be resized or recoloured by a short code in the URL. Documents could set cookies from their own responses. On the browser side, a delta tree applied the server's changes, including @o orderings that made a reorder cost almost nothing, and a click on the connection icon opened a live debugger built from the document's own reflection. Cross-origin access was granted to any origin the platform held a certificate for.
Wins, for the age
- At thirty-nine, the human wrote down a philosophy before the code: the ideal is polling, WebSockets are an optimisation, and failure should look like a poll. The tier was built to degrade into something boring.
- Used certificates as the authorisation oracle for cross-origin access, which removed a whole configuration surface.
- Built a stampede-proof two-tier asset cache after a CDN benchmark showed the exact failure it prevents.
- Found on their own what Cloudinary (2012) had found: image transforms as a URL micro-language, here with a decompression-bomb pre-check.
- Hardened the tier in February 2026 with rate limits, a firewall, cookie and transform limits, and HTTP/2.
What it taught
- Design the stream to degrade into a poll. Snapshot on reconnect and a missable heartbeat made failure uneventful.
- Let the platform's own proofs do authorisation where they can.
- Trust nothing a client says about itself. Development mode decided by request data was the tier's weakest choice; that switch belongs on the server.
- Ship the bytes you serve. The release copy of the browser library differed from the one actually served.
Genealogy
Ancestors: none on record. The door was drawn fresh from the "woe" posts of 2021. Descendants: none on record. The polling-shaped stream and the delta tree end here. Part of: Adama.
Epitaph
A door that trusted anyone it had signed a certificate for and pinged every second so that silence would mean something. It served its own client from memory, and named an unknown host as production.