Implementing network protocols is a hard task, especially considering the support of conflicting implementations, or long term maintenance. And it does not help that testing them often requires complex client or server setups.
By removing IO from the equation, and instead working directly with buffers, we’ll see that testing instantly becomes easier to setup, the core implementation becomes completely deterministic, and the protocol gets more reusable.
This talk draws heavily from experience implementing protocols such as HTTP or AMQP. It will show how to build protocols in such a way, using the nom parsing library, cookie-factory serialization library, and a new state machine development library. And we will see how to reuse the resulting protocols, by swapping out the underlying transport (TCP, various TLS libraries, unix sockets…) or wrapping it in a nice futures based API.