YOPS (people who speak russian, don't put the bite on me ,) is a small SEDA-like HTTP server for Linux OS written in C. The idea behind SEDA is to decompose the process of servicing a client into several stages, each stage being fulfilled by one or more threads. Stages communicate with each other through channels of some kind.
There are 4 stages in YOPS currently:
- accepting clients, reading and parsing their requests
- loading files from disk into memory
- sending data to clients
- logging
There is also main thread, that performs some monitoring
There were 7 stages earlier, but Errorer stage (HTTP errors handling) and Launcher stage (CGI) were removed; also Acceptor and Parser stages were merged into one single stage.
Only one thread is working at each stage in YOPS. Actually there was a possibilty to have more than 1 thread at each stage, but after Acceptor and Sender were redesigned to use epoll() this possibility was removed.
Standart Unix pipes are used as channels between stages.
YOPS has been tested with 2.6.26-2-686 #1 SMP Linux kernel, Debian 5.02 (Lenny) and Debian 6.0 (Squeeze) distributions, on a single CPU machine (gcc (Debian 4.3.2-1.1) 4.3.2 and gcc (Debian 4.4.5-8) 4.4.5).
Adjective personal in the name of the server means that all files accessed by the server (e.g. config, log, web pages) reside in '~/www', i.e. in 'www' subdir of home directory of a user, and not in system dirs ('/etc', '/var/log', etc). Moreover, YOPS refuses to run with uid=0 or euid=0.
Also note YOPS is not a "daemon" program, i.e. it runs in the foreground, not in the background.
And, yeah... YOPS has been written by the author, so to say, absolutely unintentionally. My initial intention was to write some simple server example (for students) that would demonstrate SEDA approach in designing internet servers, but i could not help myself from coding and polishing the code, and eventually this "simple example" became quite usable HTTP-server.