3 ms·
fiorix, I am curious why you are using sqlite/redis as a store for the geoip data, instead of using cgo in conjunction with libGeoIP. Was it to enable updates
by stock_toaster 13y ago
fiorix, I am curious why you are using sqlite/redis as a store for the geoip data, instead of using cgo in conjunction with libGeoIP.
Was it to enable updates to the geoip data if you get corrections (crowdsourced or otherwise)?
- fiorix 13y agoSome of the early versions used libgeoip, but the database has changed many times over time; it started with MaxMind data, then switched to ipinfodb.com, then ip2location.com came into the mix, and currently is back to using MaxMind again with a few tweaks. The idea is to be free to change to whatever is more suitable whenever is necessary... Redis was initially used in the Python version (twisted+cyclone) to share usage quotas between multiple instances (one per cpu), and ended up in the Go version just because; actually, it could use a map or something, but I'd have to implement the ttl part... In other words, it's mostly for historical reasons.