In this project, you are required to enhance the ECHO client/server program that
ID: 3802481 • Letter: I
Question
In this project, you are required to enhance the ECHO client/server program that we discussed in the class. You need put up a simple client/server application to accomplish the following function: Server side program should listen on port 9999 for incoming request. User(e.g. me) runs the client program to connect to server. Client program reads a sentence typed in by user via keyboard and user can select a command, then it sends both the command and the sentence to the server Upon receipt of the sentence and command, the server converts all the letters in the sentence into uppercase letters or lower letters or other format based on the command, and sends it back to the client. Client program displays the replied sentence on the screen. (70%) You need to build this application on top of either TCP or UDP sockets. Your server should support at least three commands: all uppercase, all lowercase, and another commands that you designed(something like initial caps, reverse each word, reverse the entire sentense, etc.). A set of sample Python code has been introduced in the class, please refer to the slides of Chapter 2. Other programming languages are also allowed. You'll receive 0 if your programs contains syntax errors! (20%) You also need to provide a document describing your protocol, i.e., underlying transport layer service, port numbers, the order and format of message sent and received by client/server, action associated with each message, etc. The document should provide enough information for others to implement client and server program to interact with yours. (10%) You should also need to discuss the following issues: How TCP or UDP would affect your application? Why you pick TCP over UDP?(Or vice versa) Is your protocol stateful or stateless? How does the other type of design would affect your application? Is your server program able to communicate with multiple clients at the same time? Things to submit, make a zip file named as csci379_hw1_yourlastname.zip (it will be csci379_hw1_chu.zip for me) including the follwing parts: Source code in src folder. Write comments in source code to include your name. Document on the protocol saved as a PDF file and named as protocol.pdf .Write down your name in the document. Discussion document saved as a PDF file and named as discussion.pdf . Write down your name in the document. Submit the zip file through blackboard. (use python)
Explanation / Answer
TCP must be choosen over UDP, because TCP protocol which provides reliable services to the user, because it is the only protocol which is connection oriented in nature. Also it has the potential to rectify its errors during the transmission of packet from sendr to receiver. It is point to point communication. It can be encapsulated with IP header and send the message to the next layer.
The UDP also belong to transport layer protocol. But it is not reliable in nature. Because it is a connection less protocol and does not provide the error correcting mechanism. So UDP is less reliable as compared to TCP.
UDP protocol focous on speed of delivery of packets rather than transmission of packets. It is also encapsulated with IP header and transmit into next layer.
The TCP protocol has a potential to handle multiple clients request at a time due to its concurrent processing of receiving request from multipleclients. It is s based on the parent-child principle concept, where as UDP follow the iterative process to handle the client request.So at a time one request will be processed.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.