3 posts tagged “google app engine”
Aral Balkan is trying to run the website for his conference on Google App Engine, the same platform that snaptrip uses. In October, he posted twice on Twitter:
I'd also noticed this, because the snaptrip login page (which does double-duty as an FAQ and news page - maybe I should rename it?) pulls in entries tagged 'snaptrip' from the Atom feed of this very weblog, and after my third post it failed to update for a good half a day. I wasn't that bothered, and didn't bother to double-check the documentation, which does clearly state thatGreat, you have no control over how Google App Engine caches data requests. Pulling in RSS feeds? Forget about it! (It uses Google Proxy and you can't tell it not to cache a feed or set the cache duration.)
Evidently this is the same problem as Aral has, and as usual, Tom Insam had an answer. It's from a slightly different direction (working with Google's Open Social containers), and as he said, it's what "everyone has done for years to bust caches you don't control": append an incrementing (or random) parameter to each request, which should mean that you're not hitting the cache. Having finally written a new blog post about snaptrip, I can confirm that this approach works. I'm not sure I'll leave it in - it seems a bit rude - but if timeliness is important, you might want to do the same.App Engine uses a HTTP/1.1 compliant proxy to fetch the result.
It also occurs to me that, if every call to urlfetch is cached for some time, then you may find that repeated calls via API libraries might give somewhat unexpected results (although they're more likely to have changing arguments, anyway). Be careful out there.
I'd hoped to do a lot to snaptrip over the weekend, and I pretty much managed to do what I hoped for. There's a lot of changes which went live today; a lot of them are kind of invisible, but hopefully they're all useful.
Firstly, there's some user interface changes that incorporate suggestions from people within Dopplr. You now have to authenticate with both Dopplr and Flickr before logging in; it was possible to use snaptrip with just the one, but it didn't really make a lot of sense. When you tag photos, they get a border in the city's colour (as they do if they've already been tagged). I've also removed the requirement to load all the photos before tagging them; you now get to do so in batches of 24.
Secondly, the behind the scenes changes. Google App Engine makes it really easy to use memcache to avoid loading data more than once, so I now use that, making reloading pages really quick. There's much better error detection, especially for when a network call to either of the services it relies on fails. I've also fixed the sort ordering in the statistics panel on the trip list page.
Thirdly, I've added a lot more functionality to make use of the location information on both sides. Your map now shows Flickr photos*, and it's a "slippy map", so you can zoom in and out and recenter it. (It also shows the departure point.) It's also possible to use the Dopplr information about trips to add photos to Flickr's map. I should probably make it clear here that snaptrip will never overwrite location data (or trip data) that you've added yourself.
Finally, I had a comment on a previous post asking why you couldn't see trip tags on Flickr. Assuming that snaptrip worked, then the machine tags it's added aren't even shown by default- you have to open the disclosure triangle in the right hand pane. However, if you're using Firefox and Greasemonkey, you can install the show-dopplr-links user script, which will display a badge and link - like those for Upcoming - on each photo page.
Hopefully this isn't the end- there are still features I want to add, and the usage of the app when DopplrHQ first publicised it was a pleasant surprise. I hope these fixes and additions make it useful for you, though.
* Usually. There's a philosophical point I hope to expand on in another post.
I've finally got to the point where I'm happy to really start posting about snaptrip.
snaptrip is a little web project that lets you use Dopplr and Flickr together. Initially, it allows you to put machine tags - specially formatted bits of data - on your Flickr photos. Why bother? Well, Dopplr itself uses this data, if available, to show you photos on its site.
Obviously that's a bit dull, and I do have further plans going forward, but because I've been stopping quite often to polish the app as I was building it, it's been a bit slower than I'd like. (I've also been using it to learn about both Python and Google App Engine - the appspot.com gives that bit away).
Anyway, once I've sorted out a couple of little niggles, I'll probably post more about this elsewhere, but for now, if you have a Dopplr account, feel free to try it.