Somebody needs to make a simple REST service that will let you keep versions of a plain-text document. It would be a public, anonymous service.

The only requirement to using this service would be to generate a unique key for your document to prevent collisions. The dumbest, easiest thing I can think of is a MD5 hash of a URL (it's not meant to be secure, just predictable, and a 128-bit hash value is pretty predictable). We could go more advanced and allow for salting, but let's ignore that use case for now).

In REST-speak, the service would have 3 methods:

POST: http://freeversioning/uniquekey/
This method would allow you to create/edit contents for this unique key.

GET: http://freeversioning/uniquekey/
This method would retrieve a list of available revisions for this particular key

GET: http://freeversioning/uniquekey/diff/?from=$val&to=$val
This method would do a diff between two versions ($val and $to would be keys retrieved from the GET method above)

How would this be useful? I can think of two very specific use cases right now:

  1. Blogs - Serious bloggers (not me) would benefit from this service because they could keep track of edits to their blog posts, without requiring heavy CPU lifting. I know for Tabulas being able to add wiki-like functions to post editing would be fantastic, and I'm sure this would equally apply to Wordpress and such. This could also open the door for more collaborative blogging - the problem with opening up your individual blog posts to multiple authors is maintaining a listing of revisions and reverting bad changes (a place where wikis shine). The barrier to entry for revisioning functionality is high. Very high. Especially with XHTML (guess who does this well!)
  2. Light-weight SVN for websites - This service wouldn't store any media (it would just store the XHTML data), but imagine being able to snapshot the content your site over time and seeing the diffs of the changes over time.

I want to touch back on point 1 a bit, I make this see like a blog-oriented tool, but it really isn't. Think about all the content management systems out there, and how they differ. But the beauty of a service like this is that it's completely CMS agnostic - it doesn't care where the data or requests are coming from - all it cares about is storing the data and then showing diffs of the content when requested. Think about all Drupal's less-than-stellar versioning, and how it would benefit from revisioning of its documents. It's bringing the power of the wiki to every CMS in the world.

we need more apps like s3 - simple interfaces for complex and deep problems to simplify development.

There's a very good chance that this is the dumbest idea in the world - I might wake up tomorrow and go WTF.

Posted by roy on July 9, 2007 at 11:09 PM in Web Development | 4 Comments

Related Entries

Want to comment with Tabulas?. Please login.

Comment posted on July 10th, 2007 at 12:04 PM
what are the "factories" in www.browsershots.org ?
Comment posted on July 10th, 2007 at 06:03 AM
i read (or remember reading) that msft built that all into their new document standards (that are supposed to be open format, but sorta isn't). I do know that with office 2007, you are blog publishable upon save, and it embeds a version like all other .doc files. only its .docX or something like that.. hwatever.
Comment posted on July 10th, 2007 at 10:24 AM
office open xml. i heard that the document released with the standard from microsoft was hundreds of pages long.
Comment posted on July 10th, 2007 at 12:20 PM
i heard that too.... just neglected to mention it =)