gemini-server/README.md

46 lines
1.5 KiB
Markdown
Raw Normal View History

2021-01-24 21:11:12 +01:00
# A C++ Gemini server
2021-01-24 21:11:12 +01:00
## Introduction
As I saw other implementations in Rust but no C++ to compete, I felt that I had to do something ;-). It is also a chance for me and a friend (
Brumaire) to practice C++ and to try to get as much performance as possible (my speciality is HPC so… Yeah).
2021-01-24 21:11:12 +01:00
## Design
2021-01-24 21:11:12 +01:00
I use PlantUML to do the class diagram for the design. It's a work in progress.
## Goal
2021-01-24 22:47:21 +01:00
What we want is a high performance server using asynchrony at first, and then maybe multi-threading to have the maximum possible performance.
2021-01-24 21:11:12 +01:00
## Configuration
2021-01-24 21:11:12 +01:00
**WIP**
The configuration of the server is made through a JSON file `config.json`. The JSON parser is [simdjson](https://github.com/simdjson/simdjson)
directly integrated in our source code.
2021-01-24 21:11:12 +01:00
2021-02-16 19:07:45 +01:00
### Structure of the file
2021-02-16 19:07:45 +01:00
- content
- path : string, folder to the content of your site.
2021-02-16 19:07:45 +01:00
- cache
- enable_cache: bool, to enable cache of files or not
- cache_size : unsigned int, the maximum size in bytes to put in cache
2021-02-16 19:07:45 +01:00
- ssl
- pem_path : string
- cert_path : string
2021-02-16 19:07:45 +01:00
## Dependencies
It uses a bundled version of `spdlog` as a git submodule, but it does not use the `fmt` lib that is inside `spdlog` (you can still change it in the
CMakeLists).
2021-02-16 19:07:45 +01:00
2021-01-24 21:11:12 +01:00
## Documentation
2021-01-24 21:11:12 +01:00
The doc of the code is made with [doxygen](https://www.doxygen.nl/), the `Doxyfile` is at the root of the repo.
2021-01-24 22:47:21 +01:00
## TODO/features
2021-01-24 22:47:21 +01:00
* Possibility of an applicative gateway (like CGI for example)
* Content in RAM cache
* Asynchronous (boost ASIO deals with it)