On Thu, Oct 6, 2011 at 12:12 PM, Krishna Patel
<krishnapatel...@gmail.com> wrote:
> Ikai,
> Uploading the data is a one-time cost, yes - but not an inexpensive one. And
> doing a city lookup upon each login is expensive because of the need to scan
> IP ranges in the Maxmind database. I assume this will require indexing but I
> don't know how expensive an IP/city lookup is going to be in terms of how
> many underlying datastore queries will need to be performed.

Maxmind's database doesn't work this way.  It's a flat file that gets
pulled entirely into RAM.  The code is horrific and it's nontrivial to
make it read from anything other than a filesystem.  We had to hack it
heavily just to read from a three-way-split file.

The downside is that an app instance is slow to startup because it
needs to pull 30MB off of Google's incredibly slow filesystem.  But
once it's running, lookups are pretty much instantaneous and
zero-cost.

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to