CSCI 3325 Spring 2015 Instructor: Sean Barker |
This project has two goals. First, it will help you gain experience with remote procedure calls (and in particular, remove method invocation), from the perspective of the client and the server. Second, this assignment will teach you about the design and internals of a multi-tier distributed system.
This project should be done in teams of two.
You have been tasked to design Nile.com - the world's smallest online bookstore. Nile.com carries only four books:
Since Nile.com plans to one day become the next Amazon, they would like to use sound design principles to design their online store in order to allow for future growth.
The store will employ a two tier design - a front-end and a back-end. The front-end tier will accept user requests and perform initial processing. The backend consists of two components: a catalog server and an order server. The catalog server maintains the catalog (which currently consists of the above four entries). For each entry, it maintains the number of items in stock, cost of the book (you can pick the price), and the topic of the book. Currently all books belong to one of two topics: distributed systems (the first two books) and college life (the last two books). The order server maintains a list of all orders received for the books.
The front end server supports three operations:
The first two operations trigger queries on the catalog server. The buy operation triggers a request to the order server.
The catalog server supports two operations: query and update. Two types of queries are supported: query-by-subject and query-by-item. In the first case, a topic is specified and the server returns all matching entries. In the second case, an item is specified and all relevant details are returned. The update operation allows the cost of an item to be updated or the number of items in stock to be increased or decreased.
The order server supports a single operation: buy(item_number). Upon receiving a buy request, the order server must first verify that the item is in stock by querying the catalog server and then decrement the number of items in stock by one. The buy request can fail if the item is out of stock. Assume that new stock arrives periodically (you can pick the interval) and the catalog is updated accordingly.
A pictorial representation of the system is as shown in the figure below.
Other requirements:
Please note that no GUIs are required. Simple command line interfaces are fine.
Once you have completed implementing Nile.com, write a document that describes your system. Make sure you include any assumptions that you made, along with any problems that you were unable to solve. In addition, include responses to the following questions. You may have to run experiments to help answer these questions. Be sure your writeup includes a description of your experimental setup and graphs to support your answers.
To hand in your assignment, upload a tarball to Blackboard containing (at least) the following:
Here is a list of resources to help you get started with various aspects of the project.