Weekend appengine project: symlinkd.com
posted in programming by jon on 2009-11-06
A few weekends ago I got an itch to play around with Appengine, and was trying to think of something suitably simple.
One idea that had been banging around in my head for awhile was a simpler take on dynamic DNS (ala dyndns). I've had a dyndns account forever, but it annoyed me that they periodically deactivated my account until I logged in and 're-confirmed' that it was active.
This was especially irritating to me because they problem they're solving (storing an IP address and updating the value) isn't really a difficult one. Essentially, since I could easily obtain the originating address from an incoming HTTP request, all I really needed was to request a unique address, record the originating host, and have a way to retrieve that information on demand.
Further, it occurred to me that URL shorteners (like tinyURL) have some overlap here: they also have a unique address (or 'handle') that refers to some recorded value and a method for redirecting you there. So, I decided to make a single app that does both: a 'tinyURL' that's easy to programmatically update with the originating IP of the computer making the update request.
Moreover, I decided that since each 'handle' might change frequently, it might be nice to provide a persistent history of when and how it changed. After implementing this, I realized that, as a cool side effect, it makes it possible to use a link handle like a categorized bookmark list. Naturally, then, I'd need to make each handle subscribable to better suit this use case.
Thus, with a few hundred lines of python/html and a dab of javascript, symlinkd was created. It was mostly built in one evening in front of the TV, though I fiddled with it for a few evenings afterward. It mostly does what I want it to do, though I'll likely continue to poke at it.
Overall, I'm happy that I can now use curl to update my home IP address (rather than dyndns's binary blob client), and that I have my own personal URL shortener ;)
Random thoughts and things I learned:
- I don't think I like datastore, and I'm quite sure I don't really like GQL
- the minimalistic 'webapp' framework created for appengine is pretty serviceable
- getting user auth for free is a nice side effect of using appengine
- adding pubsubhubbub support to a content feed is really, really easy
- I like the Atom protocol for publishing syndicated content, especially when I'm generating the feed template manually.
- you can't use subdomains with appengine if you want to use your own domain (instead of .appspot.com)
Subscribe 