Assumptions:
1. It is recommended to start the processes in this order: backend-server (AND), backend-server (OR), Edge server, Client.
2. If you need to have more code files than the ones that are mentioned here, please use meaningful names and all small letters and mention them all in your README file .
3. You are allowed to use blocks of code from Beej’s socket programming tutorial (Beej’s guide to network programming) in your project. However, you need to mark the copied part in your code.
4. When you run your code, if you get the message “port already in use” or “address already in use”, please first check to see if you have a zombie process (from past logins or previous runs of code that are still not terminated and hold the port busy). If you do not have such zombie processes or if you still get this message after terminating all zombie processes, try changing the static UDP or TCP port number corresponding to this error message (all port numbers below 1024 are reserved and must not be used). If you have to change the port number, please do mention it in your README file . If you have zombie processes you can kill them using unix commands: kill -9 Requirements: 1. Do not hardcode the TCP or UDP port numbers that are to be obtained dynamically. Refer to Table 1 to see which ports are statically defined and which ones are dynamically assigned. 2. The host name must be hardcoded as localhost (127.0.0.1) in all pieces of code. 3. The user will terminate backend servers and edge server at the end by pressing ctrl-C. Do not terminate any process on its own. 4. All the naming conventions and the on-screen messages must conform to the previously mentioned rules. 5. You are not allowed to pass any parameter or value or string or character as a command-line argument except while running the client in Phase 1 to read the input file. 6. Alltheon-screenmessagesmustconformexactlytotheprojectdescription.You should not add anymore on-screen messages. If you need to do so for the debugging purposes, you must comment out all of the extra messages before you submit your project. Programming platform and environment: 1. All your codes must run (work) on the provided Ubuntu VM: 3. No MS-Windows programs will be accepted. 4. You MUST have a Makefile. 5. Your code MUST compile using gcc/g++ compiler and Make command. Programming languages and compilers: You must use only C/C++ on UNIX as well as UNIX Socket programming commands and functions. Here are the pointers for Beej’s Guide to C Programming and Network Programming (socket programming): http://www.beej.us/guide/bgnet/ (If you are new to socket programming please do study this tutorial carefully as soon as possible and before starting the project) http://www.beej.us/guide/bgc/ You can use a unix text editor like emacs to type your code (or use sublime) and then use compilers such as g++ (for C++) and gcc (for C) that are already installed on Unix to compile your code. You must use the following commands and switches to compile yourfile.c or yourfile.cpp. It will make an executable by the name of “yourfileoutput”. gcc -o yourfileoutput yourfile.c g++ -o yourfileoutput yourfile.cpp Do NOT forget the mandatory naming conventions mentioned before! Also inside your code you need to include these header files in addition to any other header file you think you may need: #include Submission Rules (10 points): 1. Along with your code files, include a READ ME file & a Makefile .In the READ ME file write 1. What you have done in the assignment 2. What your code files are and what each one of them does. (Please do not repeat the project description, just name your code files and briefly mention what they do). e. What I should do to run your programs. (Any specific order of events should be mentioned.) f. The format of all the messages exchanged. g. Any idiosyncrasy of your project. It should say under what conditions the project fails, if any. h. Reused Code: Did you use code from anywhere for your project? If not, say so. If so, say what functions and where they’re from. (Also identify this with a comment in the source code.) 2. Compress all your files including the README file in to a single“tarball”and call it: project.tar.gz (all small letters) e.g. my filename would be . Please make sure that your name matches the one in the class list. Grading Criteria: Your project grade will depend on the following: 1. Correct functionality, i.e. how well your programs fulfill the requirements of the assignment, specially the communications through UDP and TCP sockets. 2. In line comments in your code.This is important as this will help in understanding what you have done. 3. Whether your programs work as you say they would in the README file. 4. Whether your programs print out the appropriate error messages and results. 5. Ifyoursubmittedcodes,donotevencompile,youwillreceive5outof100forthe project. 6. If your submitted codes compile using make but when executed,producerun time errors without performing any tasks of the project, you will receive 10 out of 100. 7. If your codes compile but when executed only perform phase1correctly,you will receive 35 out of 100. 8. If your code compiles and performs all tasks up to the end of 2 phases correctly and error-free, and your README file conforms to the requirements mentioned before, you will receive 75 out of 100. 9. If your code compiles and performs all tasks of all 3 phases correctly and error-free, and your README file and Makefile conforms to the requirements mentioned before, you will receive 100 out of 100. 10. If you forget to include the README file or Makefile in the project tar-ball that you submitted, you will lose 15 points for each missing file (plus you need to send the file to the TA in order for your project to be graded.) 11.If your code does not correctly assign the TCP or UDP port numbers (in any phase), you will lose 10 points. 12.You will lose 5 points for each error or a task that is not done correctly. 13.The minimum grade for an on-time submitted project is 10 out of 100, assuming there are no compilation errors and the submission includes a working Makefile and a README. 14. There are no points for the effort or the time you spend working on the project or reading the tutorial. If you spend more than 1 month on this project and it doesn’t even compile, you will receive only 5 out of 100. 17.Your code will not be altered in any ways for grading purposes and however it will be tested with different input files. Cautionary Words: 1. Start on this project early!!! 2. In view of what is a recurring complaint near the end of a project, we want to make it clear that the target platform on which the project is supposed to run is the Ubuntu VM posted on Piazza since Jan 17th (16.04). It is strongly recommended that you develop your code on this version of virtual machine. In case people wish to develop their programs on other platforms, possibly running other operating systems, they are expected to deal with technical and incompatibility issues (on their own) to ensure that the final project compiles and runs on Ubuntu VM 16.04.
2. You can write your code any where as long as you test it on the VM. Projectcan and will only be graded on the VM (Ubuntu 16.04).