Go Channel Hell: How We Defeated chan map[string]*map[int]chan struct{}
Hey Gopher! 👋
Have you ever seen code like chan map[string]*map[int]chan struct{}? If yes, then you know what channel hell is.
This is a story about how we started simple, reached nightmare, and found an elegant solution. A real-time notification system that grew from 100 users to 100,000, and how we refactored the channel architecture.
Spoiler: we ended up replacing all this horror with 3 simple interfaces and typed channels 🚀
Continue reading