Skip to main content

CIS 371

Simple Web Server

Winter 2020

GitHub Classroom URL: classroom.github.com/g/KKPpQ6YK

Objective

Learn the inner workings of a basic web server to better understand what underlies web platforms. In particular, students will observe the details of

Details

Your web server must:

Extra Credit

  1. Make your server multi-threaded so that it can serve multiple requests at once.
  2. Implement an HTTPS server. Warning: I hear that getting the certificates set up correctly can be challenging. I've never done this; so, if you run into trouble, I'll be of limited help.

Rules

Submission and Grading

This project will be partially auto-graded using GitHub Classroom and TravisCI. Begin by using following this link to create a repository for this project. Once you have created your repository for this assignment, clone the repo to your local machine. Your repository will contain the following files:

MyStaticWebServer.java
This file contains some code to help you get started (including most of the code from the sample server we discussed in class). You don't have to use this file, or any of the code in it. But, if you choose a different file, you will have to adjust the Makefile accordingly so that autograder can build and run your server. (I'm happy to help you do this.)
Makefile
The autograder will use this file to build, run, and test your server. If you put all your code into MyStaticWebServer.java, you won't need to modify this makefile. However, if you have a different design in mind, go ahead. I'm happy to help you adjust the makefile as necessary.
.travis.yml
The autograder uses this file to configure the virtual machine used to run your tests. If you choose to write your server in a language other than Java, you may have to adjust this file. I'm happy to help you do that.
studentData
This directory contains files you can use to test your server. To launch your server with this directory as the root,
  1. cd into this directory
  2. Run java -cp .. MyStaticWebServer
testPlan.txt
Complete this document to specify how you will test your server.
secretTests.tar.end
This file will be added later. It contains an encrypted version of the tests I will use on your code. Attempting to decrypt or otherwise view these tests is a serious violation of the CIS Academic Honestey Policy..

Steps for completion and submission

  1. Begin by writing your test cases. Look through the requirements above, and write a short paragraph describing how you will verify that your server meets each requirement. (testPlan.txt includes a couple samples.)
  2. Write your code. Make sure your name appears in all files.
  3. When your code passes all of your tests, push to the master branch. TravisCI will automatically run my tests.
  4. If your code fails my tests:
    • Figure out what is missing from your test plan and add it.
    • Fix your code
    • Resubmit.
    Your test plan should indicate which tests were added in response to failing CI builds. (If you have many failing CI builds, but no additional tests cases, I'll know you didn't follow the testing procedure.)
  5. When your code passes TravisCI, schedule a demo with me.

Hints and Reminders


Updated Monday, 16 March 2020, 1:30 PM

W3c Validation