JMU JMU - Department of Computer Science
Help Tools
Programming Assignment 7


1 Purpose

The primary purpose of this assignment is to help you review (and demonstrate that you have acquired) the knowledge and skills required to develop network applications that involve binary data.

2 Overview

You must design and implement the software components of KitchIntel Diagnostics (KID), a system that can be used to transport diagnostic information to and from various kitchen appliances.

KID is being developed for the (fictitious) company KitchIntel.

3 Software Process

Previous programming assignments assumed that KitchIntel used Scrum, and the documents you were given were consistent with that process.

This assignment assumes that KitchIntel uses a heavyweight process, in which a considerable amount of planning is done upfront, and the product design phase and the software engineering design and construction phases are more distinct. Again, the documents you are being given for this assignment are consistent with this process.

4 Existing Files and Documents

The following planning document exists:

You should use one of the HTTP servers we discussed in lecture. All of the source files (and data files they require) are contained in the following .zip files:

Remember that, as the system is currently implemented, the server looks for files in the public_html directory that is at the same depth as the directory it is running in (i.e., up one level and then down to public_html. You should feel free to change this.

A file containing the normal ranges for one of the devices is also available:

normal.ranges (Rename to .ranges)

The ranges in this file are: [0,255], [9,256], [517,1024], [39,8000], [1000,2000], [8191,8191], [5632,8191], [10,20], [256,2048], and [0,8191].

Remember that this is a binary file.

5 An Important Caveat

At the time that the documents above were completed, KitchIntel thought the UpdateClient would be completed before you started working on the HTTP server. However, the company they contracted with for the UpdateClient did not deliver a working product. Hence, though your primary responsibility is to design and implement the HTTP server, you will also need to design and implement a simple UpdateClient.

When started, the UpdateClient will be passed a command-line parameter of either "DOWN" or "UP". If it is passed "DOWN" it must formulate and transmit a GET request for normal.ranges, wait for the response, and then print the response in human-readable form on the console. If it is passed "UP", it most read a local copy of normal.ranges, formulate and transmit a POST request for normal.ranges, wait for the HTML response, and then print the HTML to the console.

6 Questions to Think About

To ensure that you really understand the material being reviewed in this assignment, in addition to designing and implementing the system you should think about the following questions. (You do not need to submit answers.)
  1. How would you change the file format if different KID devices have different numbers of diagnostic tests? How would this change other aspects of your design?
  2. Do you think an application like this should use data transport or text transport? In other words, would it be better if, for example, the normal.ranges file used comma-separated-value String objects rather than int values?
  3. Is it possible that a device will be instructed to both read and write the normal.ranges file at the same time? Is this a problem? If so, why? If not, why not?
  4. How secure is this system? Is that a problem?
  5. Suppose, in the future, KitchIntel decides that KID devices should handle "commands" sequentially, how difficult would it be for you to make your implementation single-threaded?

7 Submission

You must submit (using Autolab) a .zip file named pa7.zip that contains all of your code. You should not submit any of the code that was provided to you (i.e., for the HTTP server) unless you make substantial changes to it.

8 Grading

The grade you receive on this assignment will be based on the effort you devote to it. If you make a "serious" effort and have a design and implementation that can be argued to be correct, you will receive a grade of 100. If you make a "serious" effort but your design and/or implementation clearly has major defects, you will receive a grade of 75. If you make a "half-hearted" effort, you will receive a grade of 50. Otherwise, you will receive a grade of 0.

Copyright 2020