Spring 2008
Programming Assignment 3
Turning the Pygmy into an Amazon: Replication, Caching and Consistency
Due: May 13, 2008
First, Pygmy.com has three NEW books on catalog:
The spring break sale turned out to be a big success. However, with the growing popularity of the book store, buyers begin to complain about the time that the system needs to process their query requests. Pygmy.com decides to solve the problem.
This project is based on project 2. This assignment has two parts.
Create a Dispatcher (A), which forwards the requests from the clients to ONE of the three Front end servers.
Each front end server caches results of recently accessed lookup queries (i.e. book id, number of items in stock, and cost) locally. When a new query request comes in, the Front end server checks the cache first before it forwards the request to the catalog/database server.
Cache consistency needs to be addressed whenever a database entry is updated by buy requests or arrival of new stock of books. You have two ways to address the problem:
A pictorial representation of the system is shown in the figure below:
Assume one of the three Catalog servers is not functioning correctly, which returns the Dispatcher with faulty information for catalog queries; the other two are reliable. So the Dispatcher needs to compare the information from all three Catalog servers before it returns the correct information back to the Front end servers.
Which Catalog server is not working correctly is randomly selected. You can be creative on how to simulate this in your system.
A pictorial representation of the system is shown in the figure below:
Make necessary plots to support your conclusions.