Archive for February, 2008

Feb 18 2008

Commenting on Google Reader Shared Items

Published by David Jeffries under Internet

There needs to be a way to do this, and I'm sure that Google is working on something right now - at least I hope so. It's really annoying not being able to add some commentary to an item that I'm sharing so that people reading it actually understand the reason I shared it.

The same thing happens when I'm reading one of my friends shared items... I always want a way to tell them how I feel about what I just read. Why not just blog about it? I just want a little blurb, like a twitter, where I can quickly say what I'm thinking after I just read it.

If I could think of a feasible way to accomplish this I would write some software to let me do it. The only way I can see just quickly thinking is having a 3rd party site that takes your shared items and adds the abilities I want... Maybe this already exists? Time to do some research.

Update: This is what happens when you don't do pre-post research. From the Google Reader blog:

In the next updates, Google Reader should let you comment on shared items or chat with your online friends about certain posts, separate your shared items with tags and recommend shared items from people that have similar interests with you.

One response so far

Feb 08 2008

Google Geocode Request Limits

Published by David Jeffries under Programming

Google maps API is pretty cool, well written piece of software. Everything is pretty much perfect except for one thing. Geocoding. According to the signup page, you can geocode 15,000 addresses per day per API key. Here's the exact text:

There is a limit of 15,000 geocode requests per day per Maps API key. If you go over this 24-hour limit, the Maps API geocoder may stop working for you temporarily. If you continue to abuse this limit, your access to the Maps API geocoder may be blocked permanently.

So anyways, after designing my software to die at 14,500 requests, and then farm it out to a different server with a different API key, I found out that they made a change, and the limit is now 15,000 requests per IP. Well that's nice, but that means that most of the geocoding should be done on the client side. This is great because there's no way a client will ever hit 15 thousand, (at least not in this current project), but bad because it requires a pretty big rewrite of code.

After rewriting my code to do most of the geocoding on the client side I found out that the 15,000 requests per day per API key isn't actually 15k/day. It's more like 625 requests per hour - 10.4 per minute - or 1.7 requests per second. Make any more than that and you get throttled.

From some testing I did I found that you can make about 12 requests in a row before you start to get throttled. More than that and there will be a ~4-5 second delay until you can make another ~12 requests. It's not really nice to do this - so here is my resulting code:

var i=0;
//geoSave holds n addresses that need geocoding
while(i < geoSave.length){
  setTimeout("findAddress('"+geoSave[i]+"',2000*i);
  i++
}
 
function findAddress(address){
  geocoder.getLocations(address, function(response){
    //do stuff with the response
  });
}

So there it is, a simple 2 second delay and the client is able to make unlimited geocode requests.

One response so far