This web application has been developed using the following technologies: Next.js, React, TypeScript, Node.js, Tailwind CSS, Prisma ORM, PostgreSQL...

Learn more

webserv

The goal of this project is to create its own HTTP server. It should be inspired by Nginx and run on a web browser.

Project overview

Webserv is the only C++ project in the 42 School core curriculum (although it is preceded by CPP modules).

The goal is to create an HTTP server in C++ 98, strongly inspired by the open source Nginx web server.

There is therefore a whole configuration aspect to consider, including the ability to:

  • create multiple server directives,

  • create multiple location directives within each server directive,

  • manage different modifiers for each location directive (for instance: ‘/’ and ‘=’),

  • set the listening port (8080 by default),

  • define a hostname.

This list is not exhaustive.

Group organization and task assignment

Webserv is a group project involving two or three people.

We decided to do it as a team of three and divide the project into the following parts:

  • Parsing of the configuration file, in order to check its validity and send the information to the server

  • Management of the server, sockets and polling

  • Common Gateway Interface (CGI) management in order to be able to upload, display and delete files on the server

My role in this project

Within this group, I worked on the server side.

The main technical constraint of this project is to create a server that is non-blocking.

This means that it must:

  • never stop running,

  • always be listening for new incoming customer connections,

  • always respond to customer requests.

To do this, it is necessary to use I/O multiplexing, a concurrent programming technique.

Through the epoll() system call, this allows listening to multiple sockets (i.e. client connections) simultaneously.

For more technical information on this subject, you can check out the repository of this project on my GitHub profile (the link is available below on this page).

Because a picture speaks a thousand words

image
image
Loading data
Loading data
Loading data

Would you like to check out the project code and test it by yourself?

Similar projects

This project seems similar to yours?

If you think that skills developed through this project could be useful to your own project, please contact me using the button below.

Let's schedule an appointment

Would you like to discover more projects?

Project webserv | Romain Kassel | Portfolio