Subject: QMIN: Header Compression for QUIC

From: Dmitri Tikhonov <[email-masked]>
Date: Tue, 7 Nov 2017 10:59:18 -0500

Hello,

Here is yet another header compression proposal:

https://github.com/litespeedtech/qmin/blob/master/id-qmin.txt

    QMIN is a compression format and protocol for HTTP/2
    headers. QMIN is based on HPACK. The modifications to
    HPACK are meant to allow robust compression use in QUIC:
    That is, no head-of-line blocking and low overhead. QMIN
    is guided by HPACK design principles. It inherits all of
    HPACK's data structures and retains binary compatibility
    with it. While designed with QUIC in mind, QMIN can be
    used in other contexts.

Because IETF draft submission is disabled until November 12th,
my proposal is hosted on GitHub.  I will make a formal submission
when the submission tool is reopened.

In the meantime, any feedback is welcome.

Thank you,

  - Dmitri.

---

From: Dmitri Tikhonov <[email-masked]>
Date: Fri, 10 Nov 2017 14:27:27 -0500

Hello,

Here are proof-of-concept QMIN encoder and decoder along with the test
program:

  https://github.com/litespeedtech/qmin/tree/master/src

The code demonstrates viability of QMIN as header compression protocol
for QUIC.  In particular:

   - QMIN solves the HoL problem;
   - The compression logic is mostly contained in the encoder, keeping
     the decoder simple;
   - QMIN is transport-independent; and
   - Memory penalty over HPACK is manageable.

QMIN encoder and decoder (qmin_enc.c and qmin_dec.c) are based on LSQUIC
Client Library's HPACK implementation.

The test program (test-enc.c) is a driver for a single encoder-decoder pair.
It performs stream creation, encoding of header fields, decoding of header
fields by the decoder (including their validation), and it emulates the
control channel sending QMIN control messages back and forth.

test-enc usage:

    -E      Trace encoder execution
    -D      Trace decoder execution
    -s      Dump encoder and decoder states.  The following information
              is printed:
                - Current compression level;
                - Memory used, both real and the QMIN table size;
                - List of all dynamic table entries and their reference
                  counts; and
                - List of all checkpoints along with their stream and
                    entry references.
    -c CAP  Specify maximum table capacity.  The default is 64K.
    -r SEED Finish random stream instead of always the last one.  SEED
              specifies the seed for repeatable run

The new code (not the HPACK core) is optimized for readability rather than
performance.  Encoder's flushing and eviction strategies are not the best,
but they are OK as far as the proof-of-concept is concerned.  The messages
informing the encoder of streams being done are faked in test-enc.c (as it
is really not the job of the decoder to know when a stream is done).

Feel free to comment, open GitHub issues, and so on.

  - Dmitri.

1. https://github.com/litespeedtech/lsquic-client/tree/master/src/liblsquic