Update – April 3, 2015
Deuterium now supports mbed TLS as well as OpenSSL!
I’ve made a test server implementation using the Deuterium HTTP/2 library available. There are two versions available:
- a plaintext version (h2c in HTTP/2 terminology) available via the “direct” / “prior knowledge” connection mechanism
- a version using TLS (h2 in HTTP/2 terminology) available through ALPN negotiation — this should work with the latest versions of Firefox and Chrome
The main index page explains some of the settings and the minimal resources available. Some resources are available as multiple media types. The on/off switch resource also supports the PUT method.
I invite everyone to test it out and please send any feedback you have.
And keep in mind that this library is geared toward embedded implementations, so it may be a bit different than what you would normally expect to find on the Web.
NOTE: To use the TLS version, you’ll need to accept the certificate it uses. If it makes you feel better, here’s the SHA-256 fingerprint of the certificate:
Deuterium is a lightweight implementation of HTTP/2 ideally suited for the Internet of Things. Deuterium is a project I created in my free time based on my experiences in the IoT space and in the httpbis working group of the IETF.
If you would like more information on why HTTP/2 makes sense for the IoT, check out my previous blog post.
If you are interested in licensing Deuterium, finding out more information, or even getting your hands on a sample, please contact me.
Here are some of the key features of Deuterium:
- Designed with a lightweight, embedded, RESTful architecture in mind (example implementation includes “light switch” supporting GET and PUT with XML and JSON payloads)
- Written as a single-threaded C library, utilizing BSD sockets
- Implements both a server API and a client API
- Supports TLS via mbed TLS or OpenSSL
- Supports the direct and ALPN negotiation mechanisms
- Supports IPv4 and/or IPv6
- Highly customizable, including:
- Number of connections and number of streams per connection
- Time vs. RAM efficiency tradeoffs
- Buffer sizes, including support for “special” buffers (e.g., firmware downloads)
Also, if you’re curious about the name, deuterium (²H) is the second isotope of the most lightweight atom, hydrogen. It is also a very powerful isotope used in fusion reactors. So, both extremely lightweight and extremely powerful! More information can be found in the Wikipedia article.