$ show miyagawa/Starman
Starman is a high-performance preforking PSGI/Plack web server written in Perl. It implements a robust HTTP/1.1 server with support for keep-alive connections, chunked transfer encoding, UNIX domain sockets, and SSL (experimental). The server uses a preforking model where a master process manages worker processes that handle HTTP requests. Key features include graceful restart handling via signals (HUP, TTIN/TTOU, QUIT), integration with Server::Starter for hot deploy, and PSGI extensions like psgix.informational for early hints. The codebase demonstrates careful attention to edge cases such as EINTR handling in system calls, proper chunked encoding parsing/generation, and HTTP/1.1 compliance.
The LLM identified 1 files worth highlighting for reuse:
Three standalone functions (_sysread, _syswrite, _write_informational) that provide reusable, low-level HTTP/I/O utilities. _sysread and _syswrite handle EINTR interruption and connection errors properly in system calls. _write_informational sends HTTP informational responses (e.g., 103 Early Hints). These functions are completely self-contained with no dependencies on Starman::Server internal state, making them easily extractable for use in other network applications. They demonstrate non-obvious skill in robust system call handling and HTTP protocol implementation.