JS Ext

Tuesday, November 5, 2013

IBM Kicks Twitter in the Patents (Ouch)

In another example of patent absurdness, IBM is suing Twitter for patent infringement right before Twitter's IPO.  I'm a technical person, so I like to read the information about the patents whenever a software patent is filed.  I read some details about the first patent: 6,957,224.  That is when I noticed something really interesting.  I just invented that!

Now I'm not saying I'm the original inventor.  Far from it.  What I am saying is the patent isn't anything revolutionary.  At the highest level, it is just applying a lookup table to url shortening.  It has a bit about "proxying", which I did as well.  Here is how I infringed on this patent:

I am writing a new video on demand system.  This is the 3rd server rewrite that I'm going.  Right before I started to write this version, I stumbled upon thetvdb.com.  TVDB provides an API that allows me to get episode descriptions and screenshots.  I also get banners for shows and seasons.  I decided that my new VOD system would display these banners and screenshots but I didn't want to consume too much of TVDB's bandwidth.  I decided to cache the images.

I came up with a url shortening scheme.  I created a simple lookup table.  One column is the url of the image I want to cache.  The second column is the MD5 hash of the url.  This column has an index on it.  I chose MD5 because it is fast and I didn't need it to be cryptographically secure.  When the VOD frontend calls my server, the server gives a shortend url.  That url looks like /cache/${MD5_HASH}.jpg.  I wrote a servlet that maps to /cache/*.  That servlet will take the MD5 hash and see if a file exists in the cache directory with that name.  If it does not exist, then the servlet will perform a lookup in the lookup table to figure out which url maps to that MD5 hash.  The servlet then downloads the url to the cache directory.  Now that the cache file exists, it will send back the file (or a 304 to allow browser caches to work).  The VOD frontend can now "download" the image over and over again without impacting the availability of TVDB.

This is not a unique problem that I solved.  Also, this is not a unique solution.  This is why Twitter implemented it.  It is a good way of handling shortened urls.  Using a lookup table is an obvious step.  Adding an index to the lookup table is also obvious.  Putting a proxy service is once again an obvious step.  All of these elements makes it easier to use the system.  It is just good software design.  It is a shame that using all of those together to make urls shorter constitutes patent infringement.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.