Homework 2, Non-Blocking Sockets Solution

$30.00

Category:

Description

  • Goal

 

  • You can develop a distributed application using non-blocking TCP or/and UDP sockets.

 

  • You can use concurrent threads in nodes of a distributed application using non-blocking sockets, in order to improve scalability and performance (e.g. response time), and to hide communication latency.

 

2 Grading

 

The grading is as follows:

 

Not accepted Your work has not been accepted, and you have no score.

 

0 points Your work has been accepted.

 

1 point Your work has been accepted before or on due date.

 

2 points Your work has been accepted before or on due date. Also, it has an acceptable layered architecture and is well designed. This means it follows the guidelines of the lecture on architecture, and of the programming examples on the course web.

 

3 Auto-Generated Code and Copying

 

You must be able to explain and motivate every single part of your code. You are not allowed to copy entire files or classes from the example programs on the course web, even if you understand it and/or change it. However, you are allowed to write code which is very similar to the example programs on the course web. You are also allowed to use GUI builders and other tools that generate code.

 

4 Tasks

 

You are to solve one of the following two tasks. You do not get any extra points from solving both.

 

 

 

Task 1, The Hangman Game With Non-Blocking Sockets

 

This task is identical to task one of homework one, except that you are now required to use non-blocking sockets. This means a lot of your code might be identical to code you wrote for homework one, which is perfectly fine. Note, however, that threads can not be used the same way as in the homework one application, which used blocking sockets.

 

Requirements on Your Report

 

You do not have to repeat anything that was shown in the hw1 report. The report for hw2 must show the following, but nothing else is required.

 

  • That only non-blocking sockets are used.

 

  • That both client and server are multithreaded. This means the same as in home-work one, that the server can handle multiple simultaneous clients and that the client has a responsive user interface. Note that threads must be handled as de-scribed in the videos on non-blocking sockets, which is different from how they were handled when using blocking sockets.

 

  • That the program still works as expected. You show this by including screenshots of the user interface.

 

Task 2, The Rock-Paper-Scissors Game With Non-Blocking Sockets

 

This task is identical to task two of homework one, except that you are now required to use non-blocking sockets. This means a lot of your code might be identical to code you wrote for homework one, which is perfectly fine. Note, however, that threads can not be used the same way as in the homework one application, which used blocking sockets.

 

Requirements on Your Report

 

You do not have to repeat anything that was shown in the hw1 report. The report for hw2 must show the following, but nothing else is required.

 

  • That only non-blocking sockets are used.

 

  • That nodes are multithreaded and have a responsive user interface. Note that threads must be handled as described in the videos on non-blocking sockets, which is different from how they were handled when using blocking sockets.

 

  • That the program still works as expected. You show this by including screenshots of the user interface.

 

 

 

 

 

 

 

 

2 (2)


error: Content is protected !!