A collection of Servers written in C
Single threaded non concurrent: single-HTTP Multithreaded concurrent: threaded-HTTP Selecting concurrent: select-HTTP Forking concurrent: fork-HTTP
Runs in a unix like environment.
These servers are build as a proof of concept and a challenge to myself. They can be used as a testing or production server with the appropriate modifications for your needs. An individual with intermediate knowledge of C and SQL is recommended.
- gcc
- libsqlite3-dev
If you are adding features or debugging a server run: make [debug]
If optimizing run: make profile
- An alternative would be to compile the source code using:
make [debug]
and use the OProfile program.
If using for production run: make production
- Dump the entire database or a specified table (-d)[table_name]
- Load a database fixture (-l)
- Print help menu (-h)
- Print version number (-V)
- Print verbose output (-v)
- Set a configuration file to be used (-s)
- Run the server as a specific effective user id (-u)
- Run the server as a specific effective group id (-g)
All servers follow a rolling log file implementation where logs follow the structure of .../logs/year/month/week/day.log.
-
Given the servers are written in C, adding a path to the URL routing list structure requires the server to be recompiled and restarted.
-
Given the C languange is a non object oriented language the use of a true database ORM is not possible. An intermediate knowledge if the SQL language is recommended when using the database API.
-
These servers are custom build from the ground up and, as such, are not HTTP 1.1 or HTTP 1.0 compliant. With this said, the servers follow closely the HTTP 1.0 specification.
-
None of the servers are load balancing capable or implement connection timeouts.
Anyone can contribute and work on any available issues.
Keep the same format as is used. After, simply make a pull request and have patience.