HTTP/2 protocol implementation
This project aims to provide native implementation of HTTP/2, the second major version of the HTTP network protocol, for Julia language. This project will provide a RFC compliant implementation, which will consist of a multiple modules related to framing and application layers, as well as tests, examples of using in server and client modes, ALPN support and documentation.
The Julia language has a family of packages, JuliaWebStack, that provide support of modern web technologies. Currently, the Julia language provides a support for HTTP protocol which is implemented as a wrapper around popular HTTP parser library implementation in C language, http-parser. In order to keep up with new trends in web technologies, we propose to implement newly approved version of HTTP protocol, HTTP/2. HTTP/2 leaves most of HTTP/1.1's high level syntax, such as methods, status codes, header fields, and URIs, the same. The element that is modified is how the data is framed and transported between the client and the server.
One of the drawbacks of current implementation of the HTTP protocol support in Julia is a dependency a binary dependency on actual C written parser library. This dependency creates numerous problems during the usage of the parser package such as
- reliance on CFFI callback functions obscures the pipeline, limits configuration, and prohibits in-depth behavior analysis of the parser
- limited management of parsed data due to CFFI interface boundaries which enforces copying of data structures and hinders overall performance
- requires full developer toolchain in order to compile the library on various platforms
We propose a modern HTTP/2 implementation written in and for Julia. It is light-weight, fast, portable abstraction over raw HTTP and is intended to be easy and transparent to use in web-related applications.
Summarizing project goals, we aim at making HTTP/2 parser that
- Follows HTTP/2 protocol RFCs
- Implements binary framing and application layers
- Has a minimal implementation in Julia language with no dependencies
- Provides HTTP/2 support to already existed packages HttpServer.jl and Requests.jl
- Supports header compression mechanism (HPACK)
- Support ALPN through MbedTLS package
- Carries an extensive collection of test cases
Before May 23
- Familiarize with protocol internals through RFCs and available literature.
- Look for various implementations of HTTP/2 protocol.
May 23 – June 20:
- Follow RFC 7540 and develop HTTP/2 framing layer
- Design a protocol binary framing layer structure
- Design a callback mechanism
- Write a simple client implementation which supports HTTP/2 protocol Request/Response message exchange without a prior protocol negotiation or an upgrade stage.
- Add protocol support to Requests.jl package
June 21 - June 23
- Mid-term evaluations
June 23 - August 01:
- Implement server side support of HTTP/2 protocol for HttpServer.jl package
- Provide support of server push messages
- Provide support of MbetTLS ALPN request during connection stage
- Provide support of HTTP/1.1 "Upgrade" request
- Test and document the implementation and usage of HTTP/2 protocol on server
August 01 - August 15:
- Write HPACK encoding and decoding procedure following RFC 7541
- Construct encoding and decoding test cases.
- Test integration of the HPACK compression with HTTP/2
- Document implementation of HPACK compression.
August 15 – August 23:
- Further refine tests and documentation for the whole project.
- Submit project.
Jon Malmaud (@malmaud)