Another library that we want to highlight is called Tortoise. This client application lets us send and receive MQTT messages. MQTT has quickly become one of the most dominant machine-to-machine (M2M) protocols for IoT development, and one of its key features is that it allows our field devices and IoT gateways to talk to our AWS cloud via IoT Core.
Tortoise is lightweight, fault-tolerant, and secured by SSL encryption.
Speaking of fault-tolerance, Shoehorn is one of our best tools for creating systems that can boot key services even if applications crash or other processes fail. Basically, this library lets us decouple select startup processes from our overall application so that we always have a way to update our device.
NervesHub is a one-stop-shop to reap all the benefits of building your firmware with Nerves. It solves headaches like remote console access and fleet firmware rollouts, all while being easy to integrate with your existing IT infrastructure. As a developer, the fewer headaches the better.
First, NervesHub is able to write to our A/B disk partitions so that we always have a good, working firmware to fall back on if something goes wrong. Second, NervesHub gives us a centralized place from which to control entire fleets of devices by using tools like IEx console. Third, NervesHub’s API lets us integrate firmware management into our overall IT infrastructure.
Circling back to remote console access, we even have a Nerves-specific ssh daemon called NervesSSH. Though it’s not too different than the standard sshd we’d find on any Linux machine, it does have a few points we want to highlight.
Foremost, it lets us send Elixir language commands over ssh in addition to the regular bash commands that we all know and love. Second, going back to our Shoehorn feature, NervesSSH can run as an independent startup process so that we still have shell access, even if something else breaks. Just imagine having a full CLI on a failed boot instead of getting stuck in the bootloader's minimal shell.
Another useful feature is nerves_time for real-time control and scheduling. This program lets us keep the internal clock on our Nerves devices in-sync with a connected network clock by integrating an ntp daemon.
Even if our device does connect from the network, nerves_time can keep us close to in sync to provide another layer of fault-tolerance.
It’s not hard to see that we could go on and on about everything that Nerves brings to the table. We didn’t even cover features like nerves_key, ring_logger, or RamoopsLogger. Instead, we want to take a moment to draw attention to the #1 perk of using Nerves: our awesome community.
The Elixir Forum is a vibrant community hub where professional developers and hobbyists alike come to ask and answer questions, show off their latest projects, and support each other. If there’s one lesson that we’ve learned from the open-source revolution, it’s that free collaboration facilitates community-driven progress.
Want to hop aboard the Nerves hype-train? Join the #nerves channel on the Elixir Slack to stay up-to-date on all the latest Nerves news.
You can also check out our Nerves development services for more information about how we transform our clients’ visions into real-world IoT applications.