News for hackers. Stuff that matters.

achernik

Re:Solid Queue 1.6.0 now supports fiber workers on Saturday August 01, 2026 @12:43PM (#49135960)
this used to be the case in Rails, but hasn't been for at least a year. Nowadays each framework-controlled action (like record.save) checks out a connection and then returns it back; this was implemented as part of the whole "run rails in fiber-based server" push
Re:Everything I know about good API design on Sunday August 24, 2025 @09:16PM (#45009322)
> How should you store the key? I’ve seen people store it in some durable, resource-specific way (e.g. as a column on the comments table), but I don’t think that’s strictly necessary. The easiest way is to put them in Redis or some similar key/value store (with the idempotency key as the key).

I'm not sure how would storing a key in Redis achieve idempotency in all failure cases. What's the algorithm? Imagine a server handling the request is doing a conditional write (like SET key 1 NX), and sees that the key is already stored. What then, skip creating a comment? Can't assume that the comment had been created before, since the process could have been killed in-between storing the key in Redis and actually creating the comment in the database.

An attempt to store idempotency key needs to be atomically committed (and rolled back in case it's unsuccessful) together with the operation payload, i.e. it always has to be a resource-specific id. For all intents and purposes, the idempotency key is the ID of the operation (request) being executed, be it "comment creation" or "comment update".

Re:Push Ifs Up and Fors Down on Saturday May 17, 2025 @10:41AM (#44014670)
consider his another post in somewhat similar spirit: https://tigerbeetle.com/blog/2024-12-19-enum-of-arrays/ the author is indeed working in a performance-oriented niche
Re:Ruby 3.5 Feature: Namespace on read on Tuesday May 13, 2025 @08:40AM (#43972268)
this would be a major breaking change
Re:US Ends Support For Ukrainian F-16s on Sunday March 09, 2025 @11:54AM (#43310248)
wasn’t the Carnation Revolution a direct result of the war in Angola?
Re:Building Thousands of Reproducible ML Models with pipe on Wednesday January 09, 2019 @03:13PM (#18868350)
looks like they are "introducing" some internal component https://mobile.twitter.com/automattic/status/106436688085984...