Amazon S3

Posted by Aaron Feng Thu, 08 Mar 2007 02:23:00 GMT

Since Shoechicken will provide RESTful web services, it is only natural to check out some existing web services that are already in the wild. One of the most well known web services that provides a REST API is the Amazon Simple Storage Service (Amazon S3).

S3 provides web services that allow a subscriber to store and retrieve data. The subscriber is charged based on bandwidth and storage used. It is especially important for Amazon to validate your identity so you do not get falsely charged from unauthorized requests. Most important of all, you do not want your data to be compromised.

How does S3 validate your identity? When you sign up for S3 you will receive two keys: Access Key ID and Secret Access Key ID. Access Key ID is included in every request and before you put your request on the wire, you sign the header with your Secret Access Key ID. Of course, no one knows your Secret Access Key besides you and Amazon. This is fairly interesting because you can allow access to others by constructing the request for them.

Maybe we can do something similar to S3 in Shoechicken when the user wants to retrieve recommendations for his or her feeds.

For more information about S3 please refer to the official documentation.

Should Shoechicken be soapy or restful?

Posted by Aaron Feng Wed, 07 Mar 2007 03:28:00 GMT

Even though Shoechicken is a Rails application, currently it has no plans for any user interface. It will only expose web services for external clients to consume. In the web services world, you have two camps: SOAP or Representational State Transfer. With that said, we had to make a decision as to which style of web services we will provide: SOAP, REST or both.

One big advantage of using SOAP is the code generation tools that are available in various languages. It works extremely well when you control both sides. However, it can get a little more hairy when you do not have the luxury of a homogenous environment.

On the other hand, REST is very simple. It just uses the old, trusty standard HTTP to transport requests without wrapping it. All the client need to consume a service is a way to send HTTP requests and parse XML.

We want to keep Shoechicken as simple as possible. I feel REST style of web services will be easier to implement and easier for clients to consume with fewer interoperability issues.

During the day I work on a distributed financial system that provides SOAP style web services. It would be fun to learn what is on the other side of the fence. That is one of the main reasons I went with REST for Shoechicken.