Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with this computer network homework. Need to create a TCP and UDP client and server program. You can implement the project in any

Need help with this computer network homework. Need to create a TCP and UDP client and server program. You can implement the project in any programming language you like. But try to use python and also add screenshots. Thank you...

image text in transcribed

image text in transcribed

Project 3: Math Service via Network You are required to implement a math server and a math client. The behaviors of the clients and server in this project are similar to that of the clients and server in Project 1. The client should allow the user to continuously issue requests until the user inputs "Quit". The differences are: Users will input some math expression, such as "2 + 3", 2 *3 The client will send the math expression to the server , 2 + 3 * 4/s", etc., in the client. . The server will evaluate the result of the received math expression, and send back the final result back to the requesting client. The result should be sent back as a string. For example, if the server receives "2 +3", it will send back "5. If the server receives "2 *3, it wil send back "6" Basically, instead of sending strings and receiving capitalized strings, the client will send math expressions and receive the results of the math expressions. You can tell that this project is not very different from the Project 1. You can potentially reuse some part of your original code. On the server side, you need some evaluation function to evaluate a math expression. You can implement our own, or you can use some existing library functions/methods. In either case, your server should support valid math expressions that involve the four basic operators: "+", "-", " and ". The math expressions can have arbitrary number of spaces/tabs within them, and they should still be regarded as valid. Requirements 1. You are required to implement the UDP version. The UDP server should be able to serve multiple clients at the same time by default, without multi-threading. You are required to implement the TCP non-persistent version. The TCP non-persistent server should be able to serve multiple clients at the same time by default, without multi-threading You are required to implement the TCP persistent version without multi-threading. The TCP persistent server should be able to serve multiple clients, not necessarily at the same time. That is, the server should be able to serve one client, and have several other clients pending while it is serving the first client. When the first client is done (quit gracefully), the server can pick up the next pending client and serve it; after this client is done, the server can again pick up the next pending client ant serve it. You are required to submit a project report. In your project report, you should include 2. 3. 4. ehensi to demonstrate that all your programs meet the requirements. For example, for the UDP version, your testing should show that your server really can serve multiple clients at the same time. You can include a screenshot with multiple clients concurrently running and getting the service. Also, show that when a client gracefully quits (by issuing "Quit"), other clients can still get the service without a problem, and new clients can come to get the service without a problem. The project report will have a large weight in terms of grading. You are highly because you are required to implement multi-threading for the group project anyways. The multi- 5. d to implement the TCP persistent version with multi-threading, Project 3: Math Service via Network You are required to implement a math server and a math client. The behaviors of the clients and server in this project are similar to that of the clients and server in Project 1. The client should allow the user to continuously issue requests until the user inputs "Quit". The differences are: Users will input some math expression, such as "2 + 3", 2 *3 The client will send the math expression to the server , 2 + 3 * 4/s", etc., in the client. . The server will evaluate the result of the received math expression, and send back the final result back to the requesting client. The result should be sent back as a string. For example, if the server receives "2 +3", it will send back "5. If the server receives "2 *3, it wil send back "6" Basically, instead of sending strings and receiving capitalized strings, the client will send math expressions and receive the results of the math expressions. You can tell that this project is not very different from the Project 1. You can potentially reuse some part of your original code. On the server side, you need some evaluation function to evaluate a math expression. You can implement our own, or you can use some existing library functions/methods. In either case, your server should support valid math expressions that involve the four basic operators: "+", "-", " and ". The math expressions can have arbitrary number of spaces/tabs within them, and they should still be regarded as valid. Requirements 1. You are required to implement the UDP version. The UDP server should be able to serve multiple clients at the same time by default, without multi-threading. You are required to implement the TCP non-persistent version. The TCP non-persistent server should be able to serve multiple clients at the same time by default, without multi-threading You are required to implement the TCP persistent version without multi-threading. The TCP persistent server should be able to serve multiple clients, not necessarily at the same time. That is, the server should be able to serve one client, and have several other clients pending while it is serving the first client. When the first client is done (quit gracefully), the server can pick up the next pending client and serve it; after this client is done, the server can again pick up the next pending client ant serve it. You are required to submit a project report. In your project report, you should include 2. 3. 4. ehensi to demonstrate that all your programs meet the requirements. For example, for the UDP version, your testing should show that your server really can serve multiple clients at the same time. You can include a screenshot with multiple clients concurrently running and getting the service. Also, show that when a client gracefully quits (by issuing "Quit"), other clients can still get the service without a problem, and new clients can come to get the service without a problem. The project report will have a large weight in terms of grading. You are highly because you are required to implement multi-threading for the group project anyways. The multi- 5. d to implement the TCP persistent version with multi-threading

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions