Live data from Hacker News

I made a simple geolocation service

maxkostinevich.com

91–100 of 187 posts

Re: I made a simple geolocation service

#91

The cheapest alternative has to be to ask the users where they are and store it on the user device? I never understood the need for geoip unless you ship spyware. If the exact location is important geoip is not accurate enough anyway. Forwarding to regional sites automatically is just annoying when it doesn't work properly or someone is traveling abroad.

If it's just to route to regional sites, that's fine. Letting the user select just makes sense. However, there's a lot of use cases that semi-accurate geo-locations make sense. The first of which is analytics. If I'm a marketing person at a SaaS company, I want to know where my customers physically are if possible for a variety of useful reasons. Good quality estimates for location also help with security and complia…

> If I'm a marketing person at a SaaS company, I want to know where my customers physically are if possible for a variety of useful reasons.

What reasons? What makes you feel entitled to that information if not volunteered?

Re: I made a simple geolocation service

#92

The cheapest alternative has to be to ask the users where they are and store it on the user device? I never understood the need for geoip unless you ship spyware. If the exact location is important geoip is not accurate enough anyway. Forwarding to regional sites automatically is just annoying when it doesn't work properly or someone is traveling abroad.

Anything to do with mapping or local searches, geoip is very handy, save your users a few clicks and seconds when they first visit your site. One less dialog window to deal with.

Re: I made a simple geolocation service

#93

The cheapest alternative has to be to ask the users where they are and store it on the user device? I never understood the need for geoip unless you ship spyware. If the exact location is important geoip is not accurate enough anyway. Forwarding to regional sites automatically is just annoying when it doesn't work properly or someone is traveling abroad.

> I never understood the need for geoip unless you ship spyware.

There are many many cases where it’s relevant. Others have mentioned prepopulating or ease of use aspects. But you’re making big assumptions that the client has an interactive user at all. It’s important where you don’t own the client or there is defined behavior, say at a protocol behavior, that must be respected. Moving earlier than that there are cases where you need to route traffic before any sort of connection is even established.

I suspect you’re also underestimating geolocation precision and accuracy. Free datasets will get you the right state or city say 90-95% of the time. Cheap datasets get you to the right town or post code 95-97% of the time. Expensive or bespoke multi source datasets will get you reasonable post code, neighborhood, or even household & address accuracy. Think of cross correlating order histories per physical address, device fingerprints, and IP addresses/triangulation.

Re: I made a simple geolocation service

#94
post #83

Earlier quoted context omitted.

Installing updates and stuff is easy to automate.

And sometimes automatic updates break and then the site may be down until you find the problem which may require much reading and therefore a longer time if you don't deal with sysadmin stuff often. With PaaS it's someone else's job who does this every day.

...so someone else can install the updates that break the server? Check your SLA, no cloud provider is going to pay you much compensation when the service goes down

Re: I made a simple geolocation service

#96
post #86
post #81

Earlier quoted context omitted.

Your service correctly returned the following data about my IP: "client": { "conn_speed": "broadband", "conn_type": "wifi", "proxy_description": "vpn", "proxy_type": "hosting" Is this what Fastly is thinking about my IP?

Yeah, that's coming from these four Fastly VCL variables: conn_speed: https://developer.fastly.com/reference/vcl/variables/geoloca... conn_type: https://developer.fastly.com/reference/vcl/variables/geoloca... proxy_desc: https://developer.fastly.com/reference/vcl/variables/geoloca... proxy_type: https://developer.fastly.com/reference/vcl/variables/geoloca... conn_type is interesting to me, I'm not sure how you would…

Whatever it's using for conn_type, it's not accurate. I get "wifi" on all of my computers, wired or wireless.

Re: I made a simple geolocation service

#97
post #91

Earlier quoted context omitted.

If it's just to route to regional sites, that's fine. Letting the user select just makes sense. However, there's a lot of use cases that semi-accurate geo-locations make sense. The first of which is analytics. If I'm a marketing person at a SaaS company, I want to know where my customers physically are if possible for a variety of useful reasons. Good quality estimates for location also help with security and complia…

> If I'm a marketing person at a SaaS company, I want to know where my customers physically are if possible for a variety of useful reasons. What reasons? What makes you feel entitled to that information if not volunteered?

Any info that can be gleaned from the request is fair game.

Re: I made a simple geolocation service

#98

I applaud your efforts but it's disingenuous to title this how you "made a geolocation service" when you are just reading a field in someone else's geolocation service.

Indeed. Using another service and being a wrapper around it is not all that impressive. He is also using workers which makes his solution expensive.

I run ifconfig.io which now gets just over a billion hits a day. It is basically an echo service, and it just parrots back what cloudflare tells it. But since I run it on linode, it costs me a whopping $40 dollars a month for 35 billion returns a month. Using workers would cost me several thousand dollars.

http://ifconfig.io/country_code

Re: I made a simple geolocation service

#99
I'm a bit confused. This looks like a few hundred lines of code to read a value from a hardcoded dictionary. Even as a proof of concept it would be more sensible to just add two numbers or something, at least that gives the impression that you could also make the API do something useful.

Re: I made a simple geolocation service

#100
post #89
post #22

Google App Engine had this quite a while ago (almost a decade, I think)and a very generous free tier. Also has approx lat-long, city, state and country. https://blip.runway7.net https://github.com/runway7/blip I lost track of the consumer apps I've used this on and still haven't received a $1+ bill.

Is there a good lat/lon to timezone database that lets you leverage this into a presumptive timezone offset from UTC and thus local time?

Do you need the lat/lon for this? Usually you'd just put in the nearest city.

Moment.js is probably the most prevalent time and date library.

Post reply on HN