<commit_before>## elli - experimental web server

The purpose of this project is to try out a few experiments in the
core of the web server loop to create a webserver that is as robust
and performant as it can be.


Goals:

 * Robustness
 * As minimalistic as can be, without sacrificing robustness and correctness
 * Not use more processes or messages than absolutely required
 * Upgrade without restart
 * Chunked transfer
 * Well tested
 * Traceability
 * Metrics, stats, hooks
 * Gzip compression for replies over a certain size

Non-goals:

 * SSL
 * WebSockets
 * Rest/webmachine-like abstractions
 * HTTP compliance (Date headers, all verbs, pipelining, etc)
 * Normal webserver features like html templating, session handling
 * Virtual hosts, binding to ip addresses
<commit_msg>Picked 0505b380e from patrick.<commit_after># elli - experimental web server

The purpose of this project is to try out a few experiments in the
core of the web server loop to create a webserver that is as robust
and performant as it can be.


Goals:

 * Robustness
 * As minimalistic as can be, without sacrificing robustness and correctness
 * Not use more processes or messages than absolutely required
 * Upgrade without restart
 * Chunked transfer
 * Well tested
 * Traceability
 * Metrics, stats, hooks
 * Gzip compression for replies over a certain size

Non-goals:

 * SSL
 * WebSockets
 * Rest/webmachine-like abstractions
 * HTTP compliance (Date headers, all verbs, pipelining, etc)
 * Normal webserver features like html templating, session handling
 * Virtual hosts, binding to ip addresses


## Usage

    $: rebar get-deps
    $: rebar compile
    $: erl -pa ebin

    % starting elli
    1>: {ok, Pid} = elli:start_link([{callback, elli_example_callback}, {port, 3000}]).

    % stopping elli
    2>: elli:stop(Pid).

## Callback module

see `src/elli_example_callback.erl`
{'fraction_non_alphanumeric': 0.06233351092168354, 'fraction_numerical': 0.006925945657964837, 'mean_word_length': 4.021390374331551, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3242212', 'n_tokens_mistral': 541, 'n_tokens_neox': 512, 'n_words': 240}