Re: [google-appengine] Re: X-AppEngine-City

2011-11-06 Thread Krishna Patel
The Maxmind Webapi is working well for me now. But I'm curious whether App
Engine will ever provide this out of the box.

perhaps the maxmind webapi would be another solution.
> i've not tried ipinfodb, but i am using maxmind on several projects
> (webapi and local db).
> the webapi works quite well for me when caching results locally for a
> short time.
> when using the webapi i've sometimes put in the local db as a backup
> solution in case the webapi times out etc.
>

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



Re: [google-appengine] X-AppEngine-City

2011-10-07 Thread Krishna Patel
Jeff,

I didn't even consider using their Java api. The idea of keeping the data in
memory on App Engine is absurd. I'm surprised you thought that might work.

I'm following an approach similar to Ikai's in his blog post:

http://ikaisays.com/2010/08/11/using-the-app-engine-mapper-for-bulk-data-import/

As you can see, he parses the Maxmind file into City and Zip entities so
that he can do lookups by Key.

Unfortunately I don't think this works to lookup a City from an IP address -
because you have to scan a series of IP ranges in the underlying data (the
data is not actually very complex).

Brandon, "what's in it for me" is a good question to ask - on both sides of
the transaction. In my case, it's a commercial app so why would I rely on
your service? Who are you and how do I know you will be around in 6 months
or 6 years? I don't mind paying for a service but I would prefer to pay for
a service with some weight behind it.

Juha, jsapi lookups are limited by daily quotas and questionable for a
commercial app without paying an alleged $10,000 licensing fee for Google
Maps Premium.

- Krishna

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



Re: [google-appengine] X-AppEngine-City

2011-10-06 Thread Krishna Patel
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  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.



Re: [google-appengine] X-AppEngine-City

2011-10-06 Thread Krishna Patel
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.

Third party apis are out of the question (this is a commercial app) and a
professional geolocation license for Google Maps allegedly costs $10,000 -
which is also out of reach.

For these reasons, it is disappointing that App Engine stopped short of
implementing X-AppEngine-City - which would have saved countless developer
hours and expense.

- Krishna

On Thu, Oct 6, 2011 at 4:54 PM, Ikai Lan (Google)  wrote:

> Krishna,
>
> It's a one time cost. How are you mapping the user to a city?
>
> You might also want to look into other services like SimpleGeo.com or
> client side geocoding via Google Maps.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> plus.ikailan.com | twitter.com/ikai
>
>
>
> On Thu, Oct 6, 2011 at 2:54 AM, Krishna Patel 
> wrote:
>
>> What's the most efficient way of determining city information since, at
>> the moment, there is an X-AppEngine-Country but no X-AppEngine-City?
>>
>> I was planning to get the GeoLite City database, which, uncompressed, is
>> 30MB (not sure if it needs to be split to be under the new 30MB upload
>> limit) and use a MapReduce job to load the database into entities.
>>
>> Computationally expensive but is that the only way to do this?
>>
>> --
>> 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.
>

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



[google-appengine] Why does "appcfg.py request_logs" not accept "java" as a valid runtime in app.yaml?

2011-09-18 Thread Krishna Patel
Is there a way for a Java app to call "appcfg.py request_logs"?

When I try to do so, I get this error which goes away if I kludge my
app.yaml by changing the runtime value from 'Java' to 'Python':

appcfg.py request_logs --application=s~example
--email=exam...@gmail.com--num_days=1 . C:\request_logs.txt
> Host: appengine.google.com
> Error parsing yaml file:
> Unable to assign value 'java' to attribute 'runtime':
> Value 'java' for runtime does not match expression '^go|python|python27$'
>   in ".\app.yaml", line 2, column 10


But I don't want to have to remember to change the runtime value every time.

Is there a way to avoid this kludge and download request logs for my Java
app?

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



[google-appengine] Why the need to prepend "s~" before appid for appcfg.py?

2011-09-18 Thread Krishna Patel
I thought I used to be able to say simply:

*appcfg.py download_data --application=APPID . . .*


Why do I now need to prepend a *s~* to my app-id:

*-application=*s~*APPID . . .*


It took me several hours to figure out that this was the cause of a problem
others have also had:

http://stackoverflow.com/questions/6239400/migrating-small-app-to-high-replication-datastore

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