CS 4353 * Distributed Computing Phase 1 Report

advertisement
1
CS 4353 – Distributed
Computing
Phase 1 Report
Lenaud Hughes, Kevin De Brito, David Butcher
2
Table of Contents
Introduction .................................................................................................................................................. 3
System Architecture and Design ................................................................................................................... 3
Router ........................................................................................................ Error! Bookmark not defined.
Server ......................................................................................................... Error! Bookmark not defined.
Client .......................................................................................................... Error! Bookmark not defined.
SPSU Socket................................................................................................ Error! Bookmark not defined.
Compilation ................................................................................................................................................... 4
Execution....................................................................................................................................................... 5
Data Collection and Analysis ......................................................................................................................... 5
Results ........................................................................................................................................................... 5
3
Introduction
Our project is to design and implement a Distributed System that can send a file from a client side
application to the server and also to retrieve files from the server to the client side. This project
consisted of four classes. These classes are: UDPRouter, UDPServer, UDPClient, and SPSUSocket.
System Architecture and Design
Router
The Router class receives and sends messages (i.e files, data, etc) from either the client or server. It is
the middle-man of the design and it is where the messages are forwarded it to its destination. It also
creates a routing table where it keeps track on what IPs and ports are connected to the server.
Server
The server class holds the messages that were forwarded from the Router. The client can request a file
from the server and the server will send the file through the router to the client.
Client
The client class allows the user to send a message to the server and also retrieve the message from the
server.
SPSU Socket
The SPSU Socket sends and retrieves the message and prints a confirmation to the client and server.
4
Client
SPSU Socket
Router
SPSU Socket
Server
5
Compilation
There are two ways to compile the project. If you have Eclipse installed, then you can open the attached
source code as a Java project. The project will have everything set up, except for passing in a data file,
which isn’t hard. In the run configurations for the project, you have to specify an argument that points
to the correct data file. Then hit run, and watch it go.
If you don’t have Eclipse installed, or just prefer to run it from a command line, then compile the classes
with javac like you would any other java class. The main class is the UPDClient class.
Execution
To see the results of the Distributed system simulator, you must simply run the simulator once.
Data Collection and Analysis
Results
We couldn’t acquire any results due to our simulation not running correctly. Our simulator keeps getting
stuck in the router and never sends the message over to the server. If we had a little more time, we
would have fixed this issue. If we didn’t have this issue, it would be working just fine. The simulation was
supposed to send a file (either a text, audio, or video file) to the router and then to the server. If you
wanted to retrieve a file from the server, it would go from the server to the router and then to the
client. As you see in the simulation, we documented on how the file is moving from one class to the
other.
Download