API Cloud Computing Project


"Cloud Computing" means so many different things. In this project, we'll explore using an API (Application Programming Interface) for computing on the cloud.

Project Name: Cloud Computing
Format: Hands-on using Amazon Web Services (aws)
Length: Two weeks
Due: By start of class on Wed Oct 28th
Teams: 2 students per project team, students select their partner

Project Details (specifics on what to turn in at the bottom of the page)

Desktop on the Cloud

The most common form of cloud computing is an entire "desktop" application that has been ported/moved to the internet. No software is required except an internet browser. Examples of these applications are "Google Docs" for documents & spreadsheets, delicious.com for bookmarks, basecamp.com for project management, and 30boxes.com for calendars. These "web2.0" applications compete directly with their "desktop" counterparts.

Partial Apps on the Cloud

We used a web-based application to access Teradata using SQL. The Teradata database management system was running "in the cloud" and a specific set of functions — issuing SELECT, INSERT, UPDATE, and DELETE statements — were made available over the internet. Other functions like CREATE TABLE and CREATE INDEX are not available. The user interface is very technical in nature and meant for programmers. With "desktop on the cloud", the applications are generally created for non-technical types.

API's on the Cloud

For this project, we're going to focus on cloud applications where a specific set of functions are "exposed" via Application Programming Interfaces (API's). Software developers in this model develop programs that can accept specific inputs over the cloud. To understand this approach, we are going to use Amazon Web Services (AWS). The first step in using AWS is to sign up for an AWS account. (Note: You can use your existing Amazon.com account, if you have one, or you can create a new account. Either way, you must specifically sign up for AWS.)

Sign up here: http://www.amazon.com/gp/aws/registration/registration-form.html

Amazon SimpleDB

For the first part of this project, you'll use Amazon's "SimpleDB" which is, as the name would indicate, a "simple database". After signing up for AWS, you will need to also sign up for SimpleDB:

Sign up here: http://aws.amazon.com/simpledb/

To get started with SimpleDB, read about it at the URL below. Be sure you understand the sections titled "The Data Model: Domains, Items, Attributes and Values" and "API Summary"


If you aren't familiar with the concept of an API, take some time now to read about them. A good article about API's is available here:



We are going to use "ScratchPad" to send messages to the Amazon SimpleDB API. With this approach, we don't have to use a programming environment (java, perl, php) to interact with SimpleDB.

**Important: You will need to do this again on your personal computer to work on this outside the lab. You may need to do this multiple times in the lab as ScratchPad is not part of the standard "image" in the KSB Lab, **

  1. Go to http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1137
  2. Click "Download"
  3. Save the zip file to your hard drive
  4. Right click on the file to extract the contents into a directory
  5. In your browser:

browse/navigate to index.htm
folder amazon-simpledb-2009-04-15-javascript-scratchpad/webapp

  1. You should see a page that says "Welcome to Amazon SimpleDB Scratchpad!"
  2. At the top of the page, you need to enter your AWS identifiers.
  1. To view your AWS access key identifiers
  2. Go to the Amazon Web Services web site at http://aws.amazon.com.
  3. Point to Your Web Services Account to display a list of options.
  4. Click AWS Access Identifiers and log in to your AWS account. Your Access Key ID is displayed on the resulting AWS Access Identifiers page. Your Secret Access Key remains hidden as a further precaution.
  5. To display your Secret Access Key, click Show in the Your Secret Access Key area.

Now you are ready to create your "simple" database. To do so, you'll walk through the steps in the "Getting Started Guide".


Click on the "+" next to "Working with Amazon SimpleDB"
Click on "Creating a Domain"
In the drop-dox box on the top right, select "Scrathpad"
Follow the instructions to Create a Domain (a domain is equivalent to a table)
Use the button called "Invoke Request" to issue your request to SimpleDB
Next "List Domain" to confirm the creation of your domain
The rest of the API's work the same way. You'll be using other API's for this project.

Programming API Calls

We're using ScratchPad to avoid using a programming language. However, it's important to understand how you would create this database using a programming language. To see examples of code, use the Developer Guide:

  1. Expand (use the "+") "API Reference" in the Developer Guide


Expand (use the "+") "Operations"
Choose "Create Domain" as an example
The sample code for this API call is:

&AWSAccessKeyId=[valid access key id]
&Signature=[valid signature]

For this part of the project, just focus on the "non housekeeping" part of the API call. Those parts are repeated below. The rest of the code is sending signatures (for security) and timestamps.


You'll be writing out API programming calls for this assignment. Be sure you understand the above code before continuing.

API Project (in lab this week & next week and outside of lab time)

Part One

Create a database with multiple tables (domains). Use the "AU Cruise Line" spreadsheet from an earlier lab on Data Warehousing. The spreadsheet is available here:
In SimpleDB using ScratchPad, create PASSENGER, CRUISE, and SHIP. Add all the data for these tables to your SimpleDB using ScratchPad.

To turn in part one, put the heading "ScratchPad XML"

Cut/paste the XML results from a request to view all "Domain Metadata" for each of the three domains you create.

Cut/paste the full XML results for all API calls.

Write "SELECT * FROM tablename" for each of the three tables/domains.

Cut/paste the full XML for each of the SELECT requests into your project file.

Part Two

To complete the next part of the API assignment, you will write direct API calls (not using ScratchPad).

To turn in part two, put the heading "API Code"

  1. List the individual API calls needed to create and put the data into the SHIP table if you were using C or Java (not ScatchPad). Note: You do not need to include all the "wrapper" code, just the API calls.
  2. List the individual API call(s) need to use the BatchPutAttributes API to add data to the SHIP table.
  3. In MySQL, we could "source" a text file to create a table. Design your own API call to add this functionality to SimpleDB. For your API, write a Description and Request Parameters in the same style as the Developer Guide for Amazon SimpleDB.

Part Three

To complete the next part of the API assignment, read the documentation on a different Amazon product called Flexible Payments Service (FPS). Using the online documentation at the following URL, figure out how to make a "Pay Request" (initiate transfer of money from the sender,the consumer, to the recipient, the store.)

To turn in part three, put the heading "Pay Request"
List the API code to make a Pay Request API call
Write a description of your code (describe it for a non-technical person)

Part Four

For the last piece, summarize your work by answering the following questions:

To turn in part four, put the heading "Questions" and respond to each of the questions below:

  1. Would you use SimpleDB for your business? Why or why not? What are the benefits? The drawbacks?
  2. How does a cloud based database like SimpleDB or Teradata compare to a laptop/desktop database like MySQL? What are the pros and cons of "on the cloud" versus "install locally"?
  3. Similarly, how does an API based approach like SimpleDB compare to the SQL interface in Teradata. What are the pros and cons of these different approaches to the same "problem"?
  4. Assume you have a database application and you are thinking about "exposing" some of the functionality via API's on the Cloud. List and describe three areas of concern in allowing "outsiders" to use your API. Would the benefits outweigh the concerns? Why or why not?

Project Grading

The project will be graded based on three criteria:

  • Completeness (All parts, all steps within a part, nothing skipped/missing)
  • Correctness (Accurate answers, descriptions where necessary for explanation)
  • Format (Readability, organization, structure)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License