Project 1: Web server
Your first project is to design and implement a web server. A webs erver should receive and handle HTTP requests through network (sockets) while supporting parallel requests using multi-threading. To design a webserver, you need to implement several steps:
- Set up the networking: Initialise the network with sockets, and write a small client that connects to your server. You can use the sockets cheat sheet to help you.
- Process HTTP requests: you should be able to receive well-formed HTTP requests from arbitrary client. You will need to get requests from the network, parse them and implement the methods to serve them. You should focus on having a working implementation of the handling of GET requests. You can use the HTTP cheat sheet to see how to parse and handle requests. You only need to implement GET method.
- Multithreading: Set up multithreading to be able to serve multiple requests in parallel. You can do this by creating one thread per connection, or by managing a pool of worker threads and a request queue.
To present your project, you should have multiple client threads requesting for a HTML file, and show that client threads received the file (storing the received file locally and printing the content). Please send your files to SDI email mailto:sdi@os.rwth-aachen.de in a zip file.
Deadline: 10.11.2025 @ 23:59
Back to top