15-441 Project 2 -- Checkpoint 1
Checkpoint 1 is worth potentially 5 total points out of 100 towards
Project 2. The work started here, when completed, will be worth 40 total points
out of 100. To receive the points and begin working on Project 2 you must:
Useful Resources:
- Full REQ/RESP protocol definition for RD <--> Web Application
Guideline:
- Find a project partner
- Read and understand the entire project statement.
- Get the new starter package from here.
- The starter package includes along with other files, a new index.html and some static files. The index.html has two new webforms.
- Webform 1 is used to query the Distributed HTTP service for an object. If you inspect webform 1, it submits the object name entered by the user and does GET on /rd/<port>
- Webform 2 lets you add a new object and upload a file corresponding it to it to the local server. If you inspect the webform 2, it posts to /rd/addfile/<port>
- The <port> here corresponds to the local port that is used for communication between the flask application and the routing daemon and you may change it manually in the html file, but make corresponding changes to the config file of the routing daemon. Also feel free to change the index.html file as long as it has two webforms performing the specified tasks.
- Use the default webserver that comes with Flask. Do not use your Liso webserver from Project 1.
- We have implemented the webserver (webserver.py) for you in the starter packagae.
- Implement a flask web application
- You will find the skeletal code for implementing the required features in webserver.py. The details of the features that need to be implemented are also provided in the code.
- Implement parts of the routing daemon
- The routing daemon loads and parses the config file and file list file on bootup and keeps a list of the local objects and their relative paths. Sample config file (node1.config) and file list file (node1.files) is provided in the starter package.
- It needs to listen on the local TCP port for any incoming requests from the flask application
- On a GETRD request for an object, it needs to parse the file list and construct the complete URL using the peername, liso server port and relative path information and send the URL to the flask application
- On a ADDFILE request, it needs to add the objectname and relative path information to its file list.
Files we expect to see in your submission:
- Makefile - make sure nothing is hard coded specific to your user; should build a 'routed' file which runs the routing daemon
- webserver.py - Implement the flask application by completing the skeletal code given to you in the starter package
- All of your source code - all .c and .h files for the routing daemon.
- readme.txt - file containing a brief description of your current implementation of the flask application and the routing daemon
- tests.txt - file containing a brief description of your testing methods
- vulnerabilities.txt - identify at least one vulnerability in your current implementation