Concurrency breaks ordering by design, but sometimes we need both. Explore three methods to preserve order in concurrent Go applications, from standard ReplyTo channels to sophisticated permission passing, with benchmarks and real-world trade-offs.
After a decade of Go backends, I wanted to try something different – so I built a daily number-picking game with vintage UI and game theory elements. A humble introduction to my side project "How Low Can You Go?"
What happens when we need different timeout durations for different endpoints? While implementing timeouts might seem straightforward at first glance, the most obvious solution fails silently, frustraiting both users and developers.
How to convert a stream of real-time updates into efficient database batches without sacrificing latency or code clarity? A deep dive into building a transparent batching layer that just works.
Using magic bytes to validate file uploads without buffering the entire file in memory. A clean, reusable solution built on top of http.DetectContentType and io.Reader from the Go standard library.
A practical approach to tracking progress in concurrent one-off Go scripts, moving from multiple atomic counters to a clean, reusable solution. The post explores a fast lock-free implementation using copy-on-write and compare-and-swap patterns.
Sometimes the bottleneck isn't the file processing – it's the bucket traversal. Learn how to speed up the listing of files in S3 and other object storages by partitioning the bucket into ranges and streaming files from each of them concurrently. This approach can achieve significant speed-ups, turning hours-long operations into minutes.