I like to solve application problems using the Web (statelessness, hypermedia, self-descriptive representations, and uniform interfaces) to produce an asymptotically tight bound solution!

Tuesday, June 03, 2008

Differences between S3 and Atompub

Since both S3 and Atompub are considered REST style interfaces, people often wonder whether it matters which one of the two they are using.

The bottom line is - S3 is best suited for server-side programming and Atompub is best for client-side interaction. This does not mean that the converse is disallowed, but, at least in the case of S3, a number of issues will render it unsuitable.

I will highlight a few differences between S3 and Atompub:
  1. Various Amazon proprietary headers, data formats, URL templates, and operations are required in S3's REST API. Atom does not require any new headers (one new optional header is defined in Atompub), and all the formats and operations are public standards in heavy use on the Internet.
  2. S3 requires clients to mint URIs on their own following a template.
    1. This means that the server cannot change without breaking clients.
    1. This means that one user can easily overwrite another's data since they could each mint the same URLs when creating new data.
  3. The S3 API does not provide a means of retrieving or changing metadata of objects.
  4. S3 does not handle any concurrency - it allows arbitrary writes to win.
S3 and Atompub are at different levels of abstraction. S3 is suitable for server-side programming, but cannot be exposed to the entire world. Therefore, S3 is good for corporates to implement their applications internally. However, anyone interested in providing an API that an unaffiliated developer would use would prefer to employ Atompub.

Benefits of using Atompub over S3
  1. No need to create new metadata vocabularies - just build on Atom and related efforts (such as Geo RSS, Dublin Core, etc.)
  2. Standard dumb-proof techniques for retrieving and manipulating individual items and their metadata, operating on lists of items including paging and
  3. Atompub uses HTTP conditional updates to control concurrent updates
UPDATE: A well-done slide deck by takemaru on practical Atompub servers explains how S3 is well suited for situations where the client of the API wishes to control the URI space, where metadata is simple and with the data.

0 comments:

Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License. All materials on this blog are either the original work of its owner or used with acknowledgement of the copyright owner. 

About Me

My Photo
I have been an avid student of the evolution of the Web and its application to business problems.

Blog Archive

Label Cloud