



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Date Assigned: August 31, 2006 Date Due: 4:59 pm EST, September 13th^ (Wednesday), 2006 for on campus students Date Due: 4:59 pm EST, September 18th^ (Monday), 2006 for EDGE students Introduction: The purpose of project 1 is to help you learn and understand multi-threaded programming in JAVA. Distributed operating systems components are made up of many modules that need to communicate with remote modules on different systems and therefore you must learn about socket programming. This project will help you learn socket programming in JAVA. Details: In this project you will design, document, implement and test a talk-like application in JAVA. This is an individual project and NOT a team project. Your application will consist of both the server and the client needed to chat on the network. You will design two standalone JAVA applications. The user input module (UI) will handle all the user inputs including the commands and the chat messages to send. It will send these to the command server. The second application is the server, and will run three components; command server, talk message receiving server and the talk message sending module. Each of these will be implemented as a thread. Part 1: User input module [50%] In this part you will write a Java application that will handle the user inputs on the standard console command line. The user input module should handle these following commands: ● exit – used to terminate the system ● alias – used to define named aliases ● remove – used to remove an existing alias ● send – command to send the messages ● list – lists all the current existing aliases ● setalias – allows to set one's own alias name When the command 'exit' is sent, the input handler application must send the 'exit' command to the command server and then terminate itself. The command 'alias' is used to define a named alias for the current session. The format will be: alias
The command 'remove' is used to remove a named alias from the current session database. The format will be: remove
A sample run for the server module application may look something like this: $ java ServerApp Starting talk receiver server thread now ... talk receiver server thread started successfully on sand.cise.ufl.edu at port 54132 Starting command server thread now ... command server thread started successfully on sand.cise.ufl.edu at port 12345 **Received a new message goblet says: howdy updating the alias list :: adding [goblet rain.cise.ufl.edu 5142] ... [ok] *Incoming command: setalias dexter setting self alias to dexter ... [ok] *Incoming command: alias presto sand.cise.ufl.edu 65143 updating the alias list :: adding [presto sand.cise.ufl.edu 65143] ... [ok] *Incoming command: list +++++++++++++++++++ goblet rain.cise.ufl.edu 5142 presto sand.cise.ufl.edu 65143 +++++++++++++++++++ **Received a new message goblet says: dude are you there? Updating the alias list:: adding [goblet rain.cise.ufl.edu 5142] .... [failed] entry already exists!!!! *Incoming command: send presto Hello! OS Project is so cool! Sending message ... [ok] *Incoming command: send gameboy Dude lets have a pizza party tomorrow at my place Sending message ... [failed] no entry found for alias gameboy *Incoming command: exit Setting exit flag for command server thread ... [ok] Setting exit flag for talk receiver server thread ... [ok] Waiting for all child threads to terminate .... Command server thread exiting now! Talk receiver server thread exiting now! $ In addition to the above specified module descriptions you are supposed to handle any incomplete commands and invalid user entry at the console and any other unexpected errors appropriately.
Project Requirements: Your submission must contain a comprehensive documentation named Programmer's Guide explaining your code structure. It should contain a brief writeup of various modules and functions that you use and also explain briefly your design philosophy. It must also contain a separate file named Installation Guide containing all necessary instructions for the TA to successfully execute your code. Also follow clean and structured coding style making use of proper indentation and appropriate comments. It is extremely important that your threads terminate properly. ● Missing Programmer's Guide – 10% penalty ● Missing Installation Guide – 5% penalty ● Shabby coding style – 10% penalty ● Runaway threads (threads do not terminate on program termination) – 20% penalty Submission Instructions: You will use UF-IBA submission system to submit your project. Please follow these instructions closely while submitting -