Project 1
CS290F Fall 2006 - UCSB Computer Science - Thorsten von Eicken
- Handed out Wednesday October 4th, 2006
- Part A due Wednesday October 11th, 2006
- Part B due Monday October 16th, 2006
Important
- Projects 1 thru 4 are to be done in groups of 2 (two). Each group must hand in a single solution with both group member names on it. If your partner is dropping out of the course, email the instructor as soon as possible.
- A lot of resources are available on-line and in the library. It is great to use these, but please always cite them in your projects.
Objective
In this project you get to use some web services, learn a bit of Ruby, and start setting up your environment. You will also define your overall course project, i.e. the web site you will be building and scaling throughout the course.
Getting started
- CSIL/Linux installation of Ruby, PostgreSQL and related software
- Windows installation of Ruby, Rails, Mysql and the RadRails IDE
- Mac installation of Ruby and related software
- Sample code for Yahoo! local similar to the one shown in class
Part A
The purpose of Part A is to give you early feedback on your plans. Send us your ideas as soon as you have them crystallized, this way you get quick feedback and suggestions.
Define your overall course project and email us a "one page" description. Your description should include the following:
- Describe the web site you will build and outline its functionality in 3-4 sentences.
- Where will you obtain the data to populate your web site, i.e., which web service will you use and what data will you collect there?
- Which data can users modify on your site?
- What state will your server need to keep for a user as he/she moves from one page to the next? (e.g. items in shopping cart)
- Which database system will you be using? MySQL or PostgreSQL? Do you have a reason for your preference? We may discuss briefly in class the pros and cons of these two open source databases, and how they compare to proprietary database systems such as Oracle.
- On which platform will you develop? (Mac, Windows, Linux, ...)
Email your (plain text) description to both Thorsten <tve@voneicken.com> and Stefan <sgk@cs>?
Part B
Implement a Ruby script that fetches data from a public web service using a REST, XML-RPC, or SOAP protocol. Insert this data into a Mysql or PostgreSQL database using Rails ActiveRecord so that it will be ready for project 2. You will probably want to read up on ActiveRecord in the Rails book.
How much data should you fetch? You must test fetching on the order of 10,000 (ten thousand) records. Don't try this until you have everything working! There is no point hammering the web service unless everything works properly. If you are having difficulties, please come to talk to us. Ideally you should ensure that you could fetch 100,000 for project 4. At the end of project 1, you should load about 100 records into your database: you don't want to develop project 2 with a huge database.
What to turn in
We will announce the mechanics of turning things in soon...
You will need to turn in:
- A copy of Part A with any changes that you may have made.
- The source code for your script.
- The schema of each table you created. Specifically, include the code you used to generate each table, as well as the table description. In MySQL, the description is the output of the "
desc table;" command; in PostgreSQL, it is the output of the "\d table" command. - The output of "
select * from table limit 10;" for each table you created. - Describe what you had to do to fetch 10,000 records and how long it took to run. Explain how you plan to obtain on the order of 100,000 records.
How to turn it in
Run the following command from your CSIL account:
turnin project.1@sgk <files>
DO NOT TURN IN WORD FILES. Only turn in files that are a viable publication/distribution format (e.g. text, HTML, PDF).
