From 03f65842c9cf09c356d3e5d9416a17755e5fb98d Mon Sep 17 00:00:00 2001 From: 3lswear Date: Mon, 7 Mar 2022 15:09:07 +0300 Subject: [PATCH] update readme --- README.md | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a26dc92..ef47a8d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # webserv -A simple non-blocking single threaded server using Linux's `epoll` facility. +A simple non-blocking web server written in C++98 using Linux's `epoll` facility . ### Pre-requisites @@ -15,23 +15,27 @@ git clone https://github.com/3lswear/webserv ``` ``` -make +cd webserv && make ``` ### Usage ``` -./webserv your_config_file.toml +webserv your_config_file.toml ``` +![Usage](https://raw.githubusercontent.com/3lswear/webserv/fb4e2853a84ef57d68beafb5a4e688188c8d030b/assets/usage.svg) + + + ### Features -- HTTP 1.1 Compliant +- HTTP 1.1 compliant - Supported methods: `GET`, `POST`, `DELETE`, `PUT` - Non-blocking - Efficient resource usage (doesn't use CPU on idle) - Fair client handling (1 slow client won't slow down 50 fast clients) -- listen on multiple ports/interfaces +- Listen on multiple ports/interfaces - TOML config format - multiple servers, with unique` server_name`s - multiple location (route) blocks @@ -44,17 +48,22 @@ make ### Collaborators -A team project: +A team project made by: -- [3lswear](https://github.com/3lswear) +- [sunderle](https://github.com/3lswear) - [talyx](https://github.com/talyx) ### Why ? -- Why epoll? -- Epoll is one of the modern event listeners/IO multiplexers out there (the other is kqueue). Epoll works on the assumption that set manipulation is not as frequent as event handling, and the performance trade-offs are made accordingly. Although it's not without it's problems (link) -- Why `TOML` for a config file? -- TOML was our format of choice because it provides strict structure of document, around which we could model our internal data structures. With a set file type like TOML the syntax is clear and unambiguous, and the tools like syntax highlighting and validation are already available. Also it isn't as hard to parse as YAML, although admittedly being less pretty. Lastly, we didn't want to just copy nginx's config structure. -- Why make this project in the first place? -- It was a great opportunity to learn writing bigger projects in C++, learn a little about network programming, how does OS handle socket IO, and to try tackling typical problems that come with socket IO and a need to serve a sizable amount of clients. Also, it was interesting to learn how software of similar purpose works (nginx uses `epoll` too!). \ No newline at end of file +#### Why epoll? + +Epoll is one of the modern event listeners/IO multiplexers out there (the other is kqueue). Epoll works on the assumption that set manipulation is not as frequent as event handling, and the performance trade-offs are made accordingly. [Although, it's not without it's problems.](https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-broken-12/) + +#### Why `TOML` for a config file? + +TOML was our format of choice because it provides strict structure of document, around which we could model our internal data structures. With a set file type like TOML the syntax is clear and unambiguous, and the tools like syntax highlighting and validation are already available. Also it isn't as hard to parse as YAML, although admittedly being less pretty. Lastly, we didn't want to just copy nginx's config structure. + +#### Why make this project in the first place? + +It was a great opportunity to learn writing bigger projects in C++, learn a little about network programming, how does OS handle socket IO, and to try tackling typical problems that come with socket IO and a need to serve a sizable amount of clients. Also, it was interesting to learn how software of similar purpose works (nginx uses `epoll` too!). \ No newline at end of file