Home > Archive > 2009 > August > 25How to fix URL-shorteners, part IITuesday, August 25, 2009 by Dave Winer.Last Wednesday I wrote a piece that explained how to fix URL-shorteners. Today, with the help of Joe Moreno at Adjix, I implemented it. Here's how my new URL-shortener works. 1. Joe is running the shortener at adjix.com. It's the same one he's always been running, but it's got a few new features. 2. In the prefs for Adjix, I told it that I wanted to use my own domain, c.oy.ly. I also told it to write copies of all my shortened URLs to a bucket at Amazon, which I had given his app permission to write to. By using my own domain, one which I control the DNS for, and retaining a copy of all the data, I am fully protected against his service going away. And I can decide at any time to take over hosting of my own short URLs by directing the c.oy.ly domain to s3.amazonaws.com instead of partner.adjix.com. 3. When I create a shortened URL, I do it by calling an API routine that works exactly as the APIs of the other shorteners. I give it the long URL, some identifying information so it knows to associate it with my Adjix account, and it returns a token, which I smash together with http://c.oy.ly/ to form the shortened URL. 4. All this is done with a bookmarklet communicating with a web app on one of my servers. It then takes the title of the page I'm linking to and adds the full URL from step 3, and redirects me to twitter.com, where I can edit the tweet before clicking on Update. 5. Then, every few minutes I call the Twitter API and ask if Dave has posted any new tweets. If so, I parse them, store the long and short versions of the URL in my database (by dereferencing the URL). Then I call a second API on Adjix to ask it to give me the counts for the most recent 50 links created by Dave. I then update the counts in my database, sort them, and prepare the familiar Top-40 report. Bottom-line: I am now using URL-shorteners in a way that does not make the Internet suck. I have done my good deed for the day! |
Recent stories Dave Winer, 55, is a visiting scholar at NYU's Arthur L. Carter Journalism Institute. He pioneered the development of weblogs, syndication (RSS), podcasting, outlining, and web content management software; former contributing editor at Wired Magazine, research fellow at Harvard Law School, entrepreneur, and investor in web media companies. A native New Yorker, he received a Master's in Computer Science from the University of Wisconsin, a Bachelor's in Mathematics from Tulane University and currently lives in New York City. "The protoblogger." - NY Times. "The father of modern-day content distribution." - PC World. One of BusinessWeek's 25 Most Influential People on the Web. "Helped popularize blogging, podcasting and RSS." - Time. "The father of blogging and RSS." - BBC. "RSS was born in 1997 out of the confluence of Dave Winer's 'Really Simple Syndication' technology, used to push out blog updates, and Netscape's 'Rich Site Summary', which allowed users to create custom Netscape home pages with regularly updated data flows." - Tim O'Reilly. Dave Winer | |||
© Copyright 1994-2010 Dave Winer . Last update: 5/20/2010; 5:25:34 PM Pacific. "It's even worse than it appears." |