Eradicating N+1s: The Two-phase Data Load and Render Pattern in Go
A two-phase load and render pattern in Go prevents N+1 query problems by separating data loading from rendering, eliminating lazy loading issues.
Engineer at Crunchy Data. Previously at Stripe and Heroku. Writes about databases, APIs, and backend engineering.
https://brandur.orgA two-phase load and render pattern in Go prevents N+1 query problems by separating data loading from rendering, eliminating lazy loading issues.
Postgres's listen/notify feature enables pub/sub messaging within the database, but it's often underutilized despite being simple and powerful.
Go's DisallowUnknownFields option improves API developer experience by catching typos and invalid fields in JSON requests early.
River is a Go + Postgres job queue that solves bloat issues while leveraging transactional guarantees to avoid distributed systems problems.
Go's `t.Parallel()` enables parallel test execution within packages, speeding up large test suites that would otherwise run sequentially.