Assignment 1
Due: Feb 4th
Weight: 10%
Team Effort: You are allowed to work in teams of 2 to 3 people for this assignment.
Purpose: The purpose of this asignment is to give you experience in developing a distributed application.
Description: You
are to develop an application that allows clients to access an on-line
bookstore. There is a front-end that accepts user requests and
performs initial processing. The backend is the persistent
storage. The store should have a two tier design - a front-end and a
back-end. The front-end tier will accept and process user requests. The backend stores information about book and book
orders.
The front end supports three operations to be used by buyer:
- search(topic) - This allows the user to specify a topic (or category) and returns all
entries belonging to that category (a title and an item number are displayed for each match).
- lookup(item_number) - This allows an item number to be specified and returns
details such as title, number of items in stock, and cost for each match.
- buy(item_number) - This specifies an item number for purchase (assume the desired quantity is always 1).
You
need to maintain information about each book. For each book this
includes the number of bookss in stock, the cot of the book and the
topic. You must also maintain a list of all orders received.
Technical Requirements:
Some of the technical requirements include the following:
- Each component should be able to
accept multiple requests at the same time. This could be easily done
using threads.
- No GUIs are required. You can use simple command line interfaces.
- You can use XML-RPC or sockets.
- You can use either Java or C/C++.
FAQ
Question: How should I implement the data storage?
Answer: You can use either a file or a database. A file may make it easier to
do future assignments where you may have to deal with replication.
Question: How will the assignments be tested?
Answer: I
will have a list of test cases that I will go through. I assume
that you can readily provide the client and server to allow me to test.
You will be there when I test your program.
Question: Can you provide me names of machines on the research network that we can use?
Answer: Three machines include algernon.csd.uwo.ca, bonnie.csd.uwo.ca, and parker.csd.uwo.ca.
Question: What about multi-threading?
Answer: Most
implementations of XML-RPC do have multithreading. However, if
you use sockets then you have to implement multi-threading yourself.