Project 3 - Distributed Resource Sharing

Client-Server Interfaces, Spring 2003


Table of Contents

Due Date

This assignment is due on May, 6 May, no later than 2:00 p.m.

See the assignment turn-in page (last modified on 25 February 2003) for instructions on turning in your assignment.

Background

Napster-like resource-sharing (NLRS) systems implement a quasi-distributed approach to making files available over the Internet, in contrast to, for example, FTP, which provides a centralized approach.

NLRS systems comprise two different client-server subsystems, called the the Directory and Supplier subsystems. A Supplier subsystem is responsible for providing files to clients; the Directory subsystem is responsible for keeping track of the available Supplier subsystems. A complete NLRS system comprises one Directory and zero or more Suppliers (a system with zero Suppliers won't be able to do much, but it's still a valid configuration).

Client interaction with a NLRS system is has three phases, of which the middle one is optional. Suppose client program C is looking for a particular resource (a file, say) and wants to use a NLRS system N to find the file. C performs the following:

  1. Send a search request to N's Directory and receive a reply listing, for each resource R requested, the Suppliers (if any) that can provide R.

  2. Send a ping request to each Supplier S to determine if resource R is available from S. The reply from S not only indicates R's availability, but also some indication of the load on S at the time it handled the ping request.

  3. Based on the ping replies, client C selects one or more of the Suppliers that can provide resource R and sends a resource request to the selected Suppliers.

For example, the event diagram

shows a client C searching for some resource and receiving from D the reply that Suppliers S1 and S2 have the resource. C pings both suppliers and decides that S2 is faster, and makes its resource request to S2.

The Directory D and Suppliers in a NLRS system N also interact:

The Project

Implement an NLRS system using RPC. All communication between clients, the Directory and the Suppliers (that is, all inter-process communication) should be provided by the sRPC system you implemented for the second project.

Notice that only clients are pure RPC clients; they only make requests and receive replies. Both the Directory and the Suppliers act like RPC servers and clients. For example, the Directory replies to clients' search requests and make ping requests to registered Suppliers.

Comments


This page last modified on 28 April 2003.