This project will implement an Internet
client-server application to facilitate file sharing between computers.
This will be an implementation of a peer-to-peer computing model.
Peer-to-peer computing draw on the original philosophy of the Internet itself, which was created by the US military establishment as a decentralized web of interconnected data-transfer machines. If some machines fail, data finds alternate paths to reach its intended recipient.
There are two basic models to implement peer-to-peer
computing. One is the pure model where peers have the same capability
and responsibility. Every peer has the ability to share and use resources
on the network. Every peer can be considered servers, the ability to supply
services to other peers and also ask for them. An application of
this model is Gnutella.
Figure 1. Pure Model
The other is the hybrid model where a server facilitates interaction between peers. An application of this model is Napster.
Figure 2 - Hybrid Model
Development of this project will include
the following aspect of Internet programming:
Client-Server Programming - a client application and a server application will be developed for this project.
Network Programming - Java socket/port will be used for communication between the client and server and between two clients.
Database Programming - a database will be used on the server side to facilitate search requests.
GUI Programming - a graphical user
interface will be provided on the client side.
A client application runs on a machine
and asks the user for their email address and asks for the directory the
user wants to share. The client app contacts the server and sends
the email address of the client machine, the IP address and the list of
file names in the shared directory.
The server maintains a list of file names and the client machine they are located on.
When a user (on a client machine) searches for a file, the client app contacts the server asking for search results for the specified file name. The server searches through the database or in the data structure and returns the result to the client. If the user decides to download a file from the search results the client makes a second outgoing connection out to the machine where this file is located and starts the download process.
When a client disconnects all the files in
the shared directory of that client will be erased from the servers search
directory.
The user can be able to
Based on initial analysis, we estimate
that this project will have approximately 15 use cases, 25 classes and
150 methods. This estimate was based on analysis using CRC Cards
and Class Diagrams.