Home Announcements Schedule Assignments Project Reading Reviews Resources

Project: libmicrohttpd

Description and Project Goals

In this project, you will design a library that implements the HTTP 1.1 protocol. The project will be written in C/C++ using sockets and threads. The goals of the project are:

Getting Started

For this project you will need to use subversion to download the project files, to store your project, and to protect yourself! Version control systems are vital for large engineering projects and when working with groups. They also allow you to work from multiple places, such as in a lab or at home and merge those changes.

Using Subversion

  1. Install subversion if you do not have it on the machine you are working on.
  2. Visit https://svn.cs.du.edu and follow the instructions to get an account created.
  3. If you followed the previous instruction, then your initial checkout will create a directory with your user name. Switch into this directory and grab the tar/bzip2'ed libmicrohttpd files from http://www.cs.du.edu/comp3621/files/libmicrohttpd.tar.bz2.
  4. Unbzip and untar the files using the following command:
    tar -jxvf libmicrohttpd.tar.bz2
    This will create the libmicrohttpd file in your user directory.
  5. Perform an initial commit of libmicrohttpd:
    svn add libmicrohttpd
    svn commit -m "initial commit"
    Now, anytime you need to know the status of which files need to be committed and which need to be added, just type:
    svn status
You can checkout your user directory on any machine and work from there. Just make sure you commit all your changes when you are done. As a general rule, you should commit files after you've changed them or added things so that subversion can keep a log of your changes and you can rollback if necessary. A backup will also be kept of the repository.

Initial Build

You initially need to run the following commands to build the project:
  1. ./boostrap : this creates the configuration file you need to configure the project
  2. ./configure : this creates the Makefiles to build your project
  3. make : this compiles your project.
Your project lives under the src directory. The main header files is under src/include and your main source is under src/daemon. You'll be modifying the files under daemon to write this project.

How to Proceed

The header file, microhttpd.h, has documentation explaining what the functions of the library should do. You should start the project by writing the code that starts and stops the HTTPD daemon. These functions are: MHD_start_daemon and MHD_stop_daemon.

The project will be completed over three checkpoints:

Grading

This project will be graded on correct implementation of the library functions and a correct implementation of HTTP. Efficiency of the implementations will also be graded, though it will count for a small part of the grade.