[ANN] x0 HTTP server and framework (initial release)

Christian Parpart trapni at gentoo.org
Wed Mar 31 16:57:15 CEST 2010

Hi all,

I am developing an HTTP server, which is using libev as the main event
loop, so I am announcing it here with the hope that other people might be
interested in as well as, that I'd love to get feedback regarding
objections, ideas about this project.

x0 (spoken "X zero") is a modular HTTP server as well a framework,
embeddable into other (libev based) applications.

My main goals of x0 are,
 * keeping a thin and clean core
 * fast request processing and scalarable with number of requests (and
ideally CPUs)
 * rich set of plugins :-D

While the first two are related to the x0 core, the last already features
the following:

 * sendfile:, for sending static files (including HTTP Ranges-Support,
ETag generation and cache friendly responses)
 * compress: dynamic content compression (deflate, gzip, bzip2)
 * proxy: basic reverse proxy plugin.
 * cgi: implements CGI/1.1
 * vhost_basic: standard virtual host resolver
 * and more (accesslog, alias, dirlisting, indexfile, userdir,

x0 also includes support for SSL (via gnutls), which is currently
integrated directly into the core, because it was easier to implement it
this way for me, as the asynchronous SSL-handshake made my headache-less
nights rare and I still search for an ideal connection-level API to be
able to encapsulate SSL into its dedicated plugin.

server protocol features:
 * should basically implement HTTP/1.1 (not (yet) everything)
 * HTTP keep-alive
 * supports HTTP pipelining
 * partial responses (via Range request-header) on static files
 * automatic chunked encoding
        if not response content-length is set, chunked encoding
        is enabled automatically by appending a chunked_encoding filter
        at the end of the filter-list.

Things _known_ not to work perfectly:
 * schmorp (in IRC) pointed me to some not-so-funny but legal ways
        to write request headers, which are not yet supported.
 * transmission of static files are not (yet) fully nonblocking as
        sendfile() can still block on disk-read operations.
 * there must be some bug that _sometimes_ corrupts compressed output
        (dunno where yet).
 * I am not yet happy with the configuration API: ideas/visions wanted :)
 * Documentation: I'm not a big fan of wasting coding time for writing
good-quality documentation. I feel very sorry for that, and will fix this
as soon as the x0 core API matures, including man-pages!

The source code can be grapped from github[1] and I am also using a
project management software[2] to track all the whishes and bugs to be
implemented and solved.

[1] http://github.com/trapni/x0
[2] http://redmine.xzero.ws/projects/x0/

Best regards,
Christian Parpart.

More information about the libev mailing list