3 ms·
Author here. Ampbase is an OpAMP control plane for agent fleets, and this is how it runs without a database: conditional writes for uniqueness and compare-and-s
by jpsaccount 2mo ago
Author here. Ampbase is an OpAMP control plane for agent fleets, and this is how it runs without a database: conditional writes for uniqueness and compare-and-swap, one bucket per customer so isolation isn't a WHERE clause somebody has to remember, ULID keys so history is a prefix list.
Two things the post doesn't cover and I'm happy to get into. What closing the cross-region lost update actually took: annotating the RPCs that depend on a compare-and-swap and replaying those to a single region, with a client-side guard. And the read amplification, which we have a plan for but waiting on a clear signal for when it’s needed.
Cross-posted with thanks to the Tigris folks; the original is at ampbase.io.
- embedding-shape 2mo ago> and this is how it runs without a database From the article: > In practice, when you reach for a database engine you're actually reaching for four basic features: unique constraints, transactions, indices, and history tables. In order to use Tigris' global object storage as a database, we had to implement all of these primitives ourselves. Not sure why the "without a database" is or isn't so important, why is it mentioned so often and why the article flip-flopping between "we don't have a DB" and "we're effectively building our own DB"?
- typesanitizer 2mo ago> [..] so isolation isn't a WHERE clause somebody has to remember, [..] Two things the post doesn't cover and I'm happy to get into. What closing the cross-region lost update actually took: [..] Set of my Claude alarm bell, and lo-and-behold, Pangram judges this comment to be 100% AI-generated, albeit with limited confidence.
- 8by3 2mo agoreal people don't write "compare-and-swap" ... or "lo-and-behold" for that matter. edit. Clearly the joke about "lo-and-behold" didn't land well with the bots...
- ninjaoxygen 2mo agoPeople who grew up with assembly language or locking primitives are fairly likely to use compare-and-swap because it's literally the commonly understood term for it. https://en.wikipedia.org/wiki/Compare-and-swap https://en.wikipedia.org/wiki/Compare-and-swap
- 8by3 2mo agoTIL, thanks for the context. What I was getting at still stands, LLM's seem to love a lot of words-with-hyphens which might be grammatically correct, but I've never seen a human actually type.
- BenoitP 2mo agoCompare-and-swap is a hardware instruction, and beyond that a desirable pattern for dealing with concurrent writes. CMPXCHG https://www.felixcloutier.com/x86/cmpxchg https://www.felixcloutier.com/x86/cmpxchg https://lwn.net/Articles/847973/ https://lwn.net/Articles/847973/
- lelanthran 2mo agoI do. For compare-and-swap I have even got a lock less queue that I implemented with it.
- BenoitP 2mo agoThere's even a load-bearing in there as well
- themgt 2mo agoAnd the read amplification, which we have a plan for but waiting on a clear signal for when it’s needed. This is Claude between the lines admitting none of it was needed. Postgres on a VM would be doing just fine right now.