1
Ask HN: Best geospatial indexing approach for real-time location systems in Go?
I'm building a real-time location-based notification system in Go where users need to receive updates relevant to their geographic position. I initially implemented this using Uber's H3 library with a room-based subscription model in Socket.IO, but I'm hitting some limitations.
The main issue: When a user joins at one resolution (e.g., 8) and an event is created at another resolution (e.g., 9), the user may miss relevant updates due to the mismatch in H3's cell hierarchy. I've tried various solutions involving emitting to parent/child cells, but the code has become overly complex.
I need a geospatial approach that:
Works efficiently in Go Handles thousands of concurrent users Delivers updates within 1-2 seconds Doesn't suffer from the hierarchical complexity issues I'm facing with H3
I'm considering:
Moving away from room-based subscriptions to direct geographic queries Using a different geospatial library (Redis GEO, S2, GeoHash) Rethinking how I use H3
Has anyone solved similar problems with real-time location-based systems? What approaches worked best in production?