Cebus is a C++-based web server and content engine. Although primarily intended as a uniform platform for in-house projects, its architecture and features may be of interest to other developers.
Cebus fills broadly the same niche as Apache or nginx but with a deliberately limited scope, in the name of efficiency and tidiness:
- Cebus is designed to run specifically on Linux (although as of yet, the only really Linux-specific restriction is the use of sendfile).
- It uses UTF-8 character encoding throughout, and only UTF-8. While there are good theoretical reasons somebody might want to use another encoding, in practice the effort spent supporting them surely outweighs any inefficiencies resulting from using UTF-8.
- Forms are all POST rather than GET. If user input is short enough to put in a human-readable URL, then it should be integrated as a proper part of the name, not tacked on as an unreadable string after a question mark.
- Cebus spawns one thread per HTTP request. In the past, servers have been designed with complex thread and memory management, enabling them to run on a wide range of hardware under a broad spectrum of loads. But... Why continue this approach on modern multi-core servers with many gigabytes of memory and terabytes of disk space (and therefore virtual memory)? Is it not better to try to avoid heavy server loads in the first place?
In other ways Cebus's design is fairly standard. It is essentially a servlet container, with libraries and modules providing the usual features: TLS connections, sessions and users, static content, etc. Output is organized through a flexible layout system, with connecting and common code in HTML5, with standardized CSS hooks.