ElixirConf 2017 - Implementing a MQTT client in Elixir - @gausby
Elixir has excellent support for binary pattern matching, and opening and accepting data from a network socket is a breeze compared to most other programming languages. MQTT is a lightweight message protocol. Clients can subscribe and publish messages to topics on a server. It is a nice protocol for communicating with IoT devices, such as sensors and the like.
I want to talk a bit about the protocol itself; I will dive into opening a network socket, connecting and accepting data from a MQTT broker. I will talk a bit about binary pattern matching; how we decode and encode the protocol messages; various strategies (used in the protocol) for communicating message length; how to stitch it all together using a mixture of state gen_state_machines, Supervisors, and regular GenServers in short how to make sense of the specs, and how to turn it into Elixir code.
At the end of the talk the audience should be on their way to implementing their own binary protocols.