5 ms·
I wrote that library originally for dl.google.com: https://go.dev/talks/2013/oscon-dl.slide#1 https://go.dev/talks/2013/oscon-dl.slide#1 I then open sourced it
by bradfitz 4mo ago
I wrote that library originally for dl.google.com: https://go.dev/talks/2013/oscon-dl.slide#1 https://go.dev/talks/2013/oscon-dl.slide#1
I then open sourced it in Jan 2013 in what was then named Camlistore (now Perkeep) in https://github.com/perkeep/perkeep/commit/6f9f0bdda9c9c1f14783812e9ccfc789968af43 https://github.com/perkeep/perkeep/commit/6f9f0bdda9c9c1f147...
d
And later I put it in https://pkg.go.dev/github.com/golang/groupcache/singleflight https://pkg.go.dev/github.com/golang/groupcache/singleflight (groupcache was written for dl.google.com)
And a private copy in Go's net package in Jun 2013: https://github.com/golang/go/commit/61d3b2db6292581fc07a3767ec23ec94ad6100d1 https://github.com/golang/go/commit/61d3b2db6292581fc07a3767...
It later moved to golang.org/x/net, and later to the Go standard library (well, internal: https://pkg.go.dev/internal/singleflight https://pkg.go.dev/internal/singleflight)
We now even have a copy with generics in Tailscale's tree at https://pkg.go.dev/tailscale.com/util/singleflight https://pkg.go.dev/tailscale.com/util/singleflight
So many variants of that code :)
- guessmyname 4mo ago> So many variants of that code Indeed… That evolution makes perfect sense. A lot of Go developers independently arrived at similar request coalescing patterns around that time, especially in caching, RPC, and high concurrency systems. I have an older implementation from personal 2013-era Go projects that follows almost the same approach. What is nice about open source is not necessarily the novelty of every individual idea, but having a well-tested, shared implementation the community can converge on. Your work on singleflight clearly became that reference point for the Go ecosystem, and it is cool to see the lineage from dl.google.com to groupcache, x/net, the standard library, and now all the downstream variants.