This code is horrific:  http://www.maxmind.com/app/java

It's horrific because doesn't allow for working with anything other
than a RandomAccessFile, which is the interface I had to mock in order
to get it working.  It's horrific because it's full of magic numbers
and bizarre data structures without documentation.

Why do you want to run it agains the datastore?  The free version fits
in frontend RAM.  The "full" version will fit in backend RAM.  Or run
it on a linode server.  The idea of deciphering Maxmind's wacky data
structures gives me nightmares.

Jeff

On Thu, Oct 6, 2011 at 4:10 PM, Krishna Patel <krishnapatel...@gmail.com> wrote:
> Jeff,
> Which code is horrific?
>
> I was going to load the Maxmind database into custom entities - so I don't
> see why it's a big deal if it's tough to load a split file a single time.
> After it's loaded into custom entities all of my geo queries would run
> against the datastore. Maybe I'm misunderstanding you.
> Krishna
>
> On Thu, Oct 6, 2011 at 9:33 PM, Jeff Schnitzer <j...@infohazard.org> wrote:
>>
>> 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.
>
> --
> 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.
>

-- 
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