delete : delete a reservation for during time for day quit: server updates file reservations.txt and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
delete : delete a reservation for during time for day quit: server updates file reservations.txt and quits The server should implement checks to ensure that requests are sensible. For example, a reserve request can only be made for a valid room, timeslot, and day, and should not conflict with an already existing reservation. Similarly, deleting a reservation should result in an error message to the user if such a reservation does not exist. Running the Server Assuming your server implementation is stored in a file Server.py, you will run the server by executing the following command: Python Server.py post where port is the port number the server listens on. Remember that you have to pick a port number greater than 1024, because only processes running with root (administrator) privilege can bind to ports less than 1024. The Client You should write a client that basically works as the user interface to the application. The client allows a user to enter commands, sends them to the server, receives the replies, and displays the results to the user. As such, in this assignment, the client is probably simpler than the server. Assuming your client is implemented in a file Client.py, then as mentioned above, you should write the client so that it starts with the following command: Python Client.py heat post where host is the name of the computer the server is running on and port is the port number it is listening to. Note that you can run the client and server either on different machines or on the same machine. When running the client and server on the same machine, you can use either the IP address assigned to the PC or use the generic loopback IP address 127.0.0.1. The primary task of the client is to establish and manage the connection to the server. One of the error cases to worry about in a client-server application is the loss of messages over the network or the partial failure of one component. How to deal with these errors depends on the type of sockets you choose to use. For datagram sockets, using UDP as the underlying transport layer protocol, the client has a bit more work to do explicitly than with streaming sockets. Because UDP is an unreliable protocol, some of the packets sent to the server may be lost, or some of the packets sent from server to client may be lost. For this reason, the client cannot wait indefinitely for a reply to a message. You should have the client wait up to one second for a reply; if no reply is received, then the client should assume that the packet was lost during transmission across the network. You will need to research the API for DatagramSocket to find out how to set the timeout value on a datagram socket (see also Lab 1). When developing your code, you should run the server on your machine, and test your client by sending packets to localhost (or 127.0.0.1). After you have fully debugged your code, you should see how your application communicates across the network with a server run on a separate computer, across a network (if you have access to more than one PC in your location). delete : delete a reservation for during time for day quit: server updates file reservations.txt and quits The server should implement checks to ensure that requests are sensible. For example, a reserve request can only be made for a valid room, timeslot, and day, and should not conflict with an already existing reservation. Similarly, deleting a reservation should result in an error message to the user if such a reservation does not exist. Running the Server Assuming your server implementation is stored in a file Server.py, you will run the server by executing the following command: Python Server.py post where port is the port number the server listens on. Remember that you have to pick a port number greater than 1024, because only processes running with root (administrator) privilege can bind to ports less than 1024. The Client You should write a client that basically works as the user interface to the application. The client allows a user to enter commands, sends them to the server, receives the replies, and displays the results to the user. As such, in this assignment, the client is probably simpler than the server. Assuming your client is implemented in a file Client.py, then as mentioned above, you should write the client so that it starts with the following command: Python Client.py heat post where host is the name of the computer the server is running on and port is the port number it is listening to. Note that you can run the client and server either on different machines or on the same machine. When running the client and server on the same machine, you can use either the IP address assigned to the PC or use the generic loopback IP address 127.0.0.1. The primary task of the client is to establish and manage the connection to the server. One of the error cases to worry about in a client-server application is the loss of messages over the network or the partial failure of one component. How to deal with these errors depends on the type of sockets you choose to use. For datagram sockets, using UDP as the underlying transport layer protocol, the client has a bit more work to do explicitly than with streaming sockets. Because UDP is an unreliable protocol, some of the packets sent to the server may be lost, or some of the packets sent from server to client may be lost. For this reason, the client cannot wait indefinitely for a reply to a message. You should have the client wait up to one second for a reply; if no reply is received, then the client should assume that the packet was lost during transmission across the network. You will need to research the API for DatagramSocket to find out how to set the timeout value on a datagram socket (see also Lab 1). When developing your code, you should run the server on your machine, and test your client by sending packets to localhost (or 127.0.0.1). After you have fully debugged your code, you should see how your application communicates across the network with a server run on a separate computer, across a network (if you have access to more than one PC in your location).
Expert Answer:
Answer rating: 100% (QA)
The server implementation should handle the following requests 1 Reserve a room The server should check if the requested room timeslot and day are val... View the full answer
Related Book For
Auditing and Assurance services an integrated approach
ISBN: 978-0132575959
14th Edition
Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley
Posted Date:
Students also viewed these computer network questions
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
A SQL With respect to database transaction, the ACID concepts should apply! ACID is an acronym for atomicity, consistency, isolation and durability. Please define each of these terms in your own...
-
The electron in a hydrogen atom with an energy of -0.544 eV is in a subshell with 18 states. (a) What is the principal quantum number, n, for this atom? (b) What is the maximum possible orbital...
-
An ideal vapor-compression refrigeration cycle that uses refrigerant-134a as its working fluid maintains a condenser at 800 kPa and the evaporator at - 12oC. Determine this system's COP and the...
-
Reproduce Figure 2.4 using geom_histogram(aes(y = ..density..)) as shown below for Example 2.5. ggplot_build() extracts the computed values for the histogram. Use the extracted vales to confirm that...
-
Why is the accuracy of cost allocation so important? Cite real-life examples of either successes or failures in cost allocation.
-
Image transcription text => The following problem is only for students who signed up for four hours credit. 2. Cylindrical bore hole field: In a conventional geothermal installation, the heat...
-
9.Consider the reaction 3NO2(g)+H2O=2HNO3(aq)+NO(g) where Delta H=-137 kJ.How many kilojoules are released when 92.3g of NO2 reacts?
-
Addidas Co. had total payroll of $40,000 for the week ending March 5. The FICA rate is 7.65%, federal unemployment tax is .8% and state unemployment rate is 5.4%. **Assume total payroll is subject to...
-
Tanya Tassle owns Born Again Bags, a not for profit business that is registered for GST. Born Again Bags supports the diversion of post-consumer material (waste) into reusable bags to replace plastic...
-
If an organization has an average daily gross patient service revenue $230,000 along with 120 patients preregistered encounters, 150 scheduled encounters, and $100,000 in gross dollars in discharged,...
-
Plan corporation acquired 80% of the outstanding voting stock of Sal Corporation on January 1, 2017 for $14,000,000, when Sals stockholders equity consisted of $8,000,000 capital stock and $1,000,000...
-
Case Illustration Pop Meals is Southeast Asia's fastest growing omnichannel food brand, currently operating through mix model of online delivery, pick-up and app-driven dine-in. For FY2021, Pop...
-
Terras, Inc., leased equipment to Venture Company on January 1, 20X4. The lease is a direct financing lease for a five-year period ending January 1, 20X9. The first annual payments of $1,200,000 was...
-
13.50 Physical Sciences Recent research suggests that the Titanic luxury liner broke into three sections causing it to sink faster than previous believed (Source: The Boston Globe, December 6, 2005)....
-
3M Company reports the following financial statement amounts in its 10-K report: a. Compute the receivables, inventory, and PPE turnover ratios for both 2018 and 2017. (Receivables turnover and...
-
The following are various management assertions (a through m) related to sales and accounts receivable. Management Assertion a. All sales transactions have been recorded. b. Receivables are...
-
Multiple Choice Questions The following questions address fraud risks in specific audit areas and accounts. a. Cash receipts from sales on account have been misappropriated. Which of the following...
-
Multiple Choice Questions The following questions concern analytical procedures in the acquisition and payment cycle. Choose the best response. a. Which of the following comparisons will be most...
-
Determine whether each of the following statements is true or false: Management accountants should be technically proficient, but they dont need strong oral and written communication skills.
-
Determine whether each of the following statements is true or false: Management accountants are now more often looked upon as internal business advisors rather than bean counters recording historical...
-
Determine whether each of the following statements is true or false: The Association of International Certified Professional Accountants (AICPA) issues the Certified Management Accountant (CMA)...
Study smarter with the SolutionInn App