Case Study

Ribbit Network’s Automated Fleet of Distributed ‘Frogs’ Runs On Golioth

Golioth spoke with Keenan Johnson, Founder of Ribbit Network, an open source community-driven non-profit focused on building a community of citizen scientists. Ribbit Network hopes to inspire students, teachers, and makers, by building open source sensors and software that contributes to an open data set for climate, but also gives people a tangible STEAM-based experience to develop their skills on the technology-building engineering side and relate emotionally to the problem of climate change through this tangible experience.

<span class="eyebrow">THE CHALLENGE</span>

Managing a Fleet of Microcontrollers isn’t Easy

In order to enable a world-wide fleet of citizen scientists, Ribbit Network was looking to develop a low-powered solar version of their air quality sensor. To do that, they had to switch from Raspberry Pi’s and BeagleBones to microcontrollers. As they built out the technology, they realized that while there are many solutions for managing fleets with full operating systems, there aren’t a lot of solutions for managing low-powered microcontrollers (MCU).

“We were desperately looking around for solutions that could manage a fleet of microcontrollers. We even asked ourselves if we should write our own thing. We really didn’t want to do that because it’s a ton of work that would distract us from our mission,” explains Johnson, “So we literally typed ‘microcontroller fleet management’ into Google and stumbled across Golioth.”

While there were other options to build out infrastructure with bigger tech players, the Ribbit Network team felt strongly that they didn’t want to invest in technologies that weren’t aligned with IoT at their core. “It’s extremely risky to pick a fundamental piece of technology and use a company where the core business is not aligned with keeping that piece of technology around,” Johnson continues, “Google IoT and Amazon AWS has their own flavor for IoT but on top of being ultra expensive, their products are often confusing. And because the core business lacks focus on IoT, it’s highly likely they will stop investing in that product. In fact, that’s exactly what happened with Google IoT.”

Ribbit Network was able to connect with the Golioth team quickly, once they identified that someone was building something to solve that problem.

<span class="eyebrow">THE SOLUTION</span>

Production-Ready Infrastructure for a Distributed Fleet

In order for the low-powered solar MCU version of the product to work, Ribbit Network needed to guarantee that they could manage their fleet remotely. “For us the gatekeeping factor in building the microcontroller based version of the product was figuring out fleet management. We had a rudimentary version of one put together, and we knew that our core idea would work on a microcontroller. But we couldn’t proceed until we had fleet management,” says Johnson. “I think that is probably a common story for any actual product that you want to deploy in the year 2023. You do not want to send something out unless you can securely update the software on it.”

“What drew us to Golioth initially was the idea of having all the infrastructure and framework to send software updates to a fleet of devices automatically and securely. That is not something that we wanted to build the infrastructure to do and is really critical for any IoT fleet,” Johnson continues, “We were already operating a fleet that was above the scale where we could manually manage devices. So, we didn’t want to be going around and as new devices come on board, we’d have to force our users to update them manually or check in to see if there are updates. The workflow that we have, we really want to just publish software, and let the fleet handle itself from our perspective.”

“Our first impression with Golioth was ‘this fits exactly what we need’. The next best plan that we had at the time was this solution that someone was building on our side, which was not going to work very well. We didn’t have the time to factor in all the considerations for a fully-featured production platform. We were planning to accept technical debt, just to move it forward, and hopefully fix it later. Which is not a great plan, but it’s not uncommon.”

<h3 class="u-text-center u-mt-2">“Having all the infrastructure and framework to send over the air updates automatically and securely is really critical.”</h3>

<div class="u-text-center u-mb-3">Keenan JohnsonRibbit Network Founder</div>

<span class="eyebrow">THE IMPLEMENTATION</span>

Unexpected Features and Helpful Support Along the Way

“We started off with just a few test units and the Golioth free trial. We’re working on ESP32-based microcontrollers and there was a really good quickstart from Golioth. We got up and running with the ESP IDF Golioth integration, which works really well. We did a bunch of testing: what if you pull the power to the device while it’s updating? Or, while it’s downloading the update? That’s a really common failure mode that is not good for a lot of IoT devices. But it all worked beautifully. Because of the way that partitioning, like all works out, it was pretty obvious that Golioth was well designed and thoughtful.”

Golioth helped us unblock our big technical risk, allowing us to move into production using their platform.

Keenan Johnson, Founder, Ribbit Network

The Ribbit Network team uses the Golioth platform to manage all the software updates on their schedule.  “You can’t guarantee that devices are always on all the time when you push the update. So you need a service where–as devices are turning on and off and doing their thing out in the wild–they are still able to update.”  Their design works such that if one of the Ribbit Network sensors comes online and sees that the software has been updated, it will apply the update on itself, without requiring the aid of a human.

“Executing remote firmware updates in a really robust and secure way is certainly non trivial to do. That’s a lot of software and testing. That is not our core competency, and we don’t really want it to be because there are other great folks already doing it. And so we’d much rather just use a tool that works well like Golioth.” Johnson explains.

Once the Ribbit Network finalized their hardware design, they shifted their fleet into production. “One of the things that we’ve done–which is really great–is we’ve got a nice, continuous integration system. So when we push code to our GitHub, it pushes a build automatically to Golioth, and deploys that to our fleet automatically,” Johnson goes on to elaborate, “So we use the Golioth CLI and their API for that. We really have very little DevOps related to the IoT fleet. We have engineers writing code, and then it just sort of permeates itself out to the fleet once it’s ready. We don’t really have to think about it ever, which is ideal.”

Picture of Design for Ribbit Network Frog Sensor Version 4
Design for Ribbit Network Frog Sensor Version 4

Johnson explains, “I think one of the worst feelings you get with a new tool or piece of software is when there’s limited support. I think that’s a really common story. For a lot of enterprise software it’s very difficult to figure out who I ask or to get some directional sense of the right way to be thinking about this small question that I have,” he continues, “Golioth was pretty supportive the whole way. The communities around Golioth on Discord and on the forums are super active. And the folks in the team are very helpful. We definitely had a lot of questions in the beginning–there were some early ESP IDF integration challenges that we had.”

“One of the things that we hadn’t really thought too much about is the LightDB Stream process. It’s actually a Golioth feature that we’ve started using quite a lot in addition to fleet updates. Moving the data off the devices was not really a problem we initially were looking for a solution to solve because we knew some ways to do that, and had considered how it was going to happen,” Johnson continues, “But Golioth’s service has ended up being really useful. So now that’s the primary way that we move our IoT data off the device, as well as we use LightDB Stream. We transfer it via webhooks on the Golioth side out into our actual databases. And that has ended up being vastly simpler than what we were doing before, because we can use one set of authentication keys between the device and the web. Before, we had one set of authentication for fleet management and then we had a different set of authentication for device data. And anytime you have multiple sets of those authentication combinations running around, it just increases your vectors for messing things up. But Golioth’s authentication solution is simpler and it’s probably the thing that we enjoy the most about Golioth.”

<span class="eyebrow">THE RESULTS</span>

Ribbit Network’s Existential Questions are Answered

The impact that Golioth has had on the Ribbit Network is immeasurable. Due to recent supply chain issues, Ribbit was able to evolve their hardware setup to include available hardware and still meet the needs of the project. “The main reason that we chose to go to a MCU was for solar and low power reasons. But there was a second sort of more practical reason: for the past three years, it has been not possible to buy some modules. Raspberry Pi, you can’t buy them,” Johnson details, “We were seriously considering having to shutter the whole program, because we couldn’t build hardware. And we knew that we needed fleet management to build hardware designs. And we’re looking at solutions that weren’t very good for us. And there was just no option. Finding Golioth was really the deciding moment for the viability of our project. It gave us the flexibility, the fleet management, and the security we needed to continue to build our sensors and actually get out there and create meaningful impact with our program.”

Finding Golioth was really the deciding moment for the viability of our project.

Keenan Johnson, Founder, Ribbit Network​

“We think about success in the number of devices that we are able to build and deploy, and then the uptime of the device,” Johnson explains, “We have built hundreds of devices this year that we would not have been able to build without Golioth.”

“In terms of data and uptime, Golioth is our primary way to get data off the device. So it needs to be really robust. We’ve been on Golioth now for over a year and we’ve had no challenges there. We’ve never had an outage that was notable for us. And that’s definitely not the case with a lot of the other software tools that we interact with in the ecosystem. That has been really impressive.”

Ribbit Networks plans to continue scaling their fleet on Golioth. “We are building a lot on top of the Golioth API to do the sensor onboarding and registration process. Provisioning is the one thing that we still do manually today. And that’s something that is just you mostly have to do it manually in a lot of tools, but Golioth has a really solid API so we can create self service provisioning in an automated way.”

The Ribbit Network is an open source community made up of all volunteers. Johnson explains, “The work that we do is all in the public domain. If you’re looking to build your own kind of IoT fleet, you can come look at what we’ve built, totally transparently. We’re always trying to look at what we do and make sure that we’re doing it in the best way possible, so we appreciate any second eyes on the project.”

The Ribbit Network is constantly looking for people who want to build and deploy sensors to join in their climate change initiative. So whether you’re a citizen scientist, maker space, educator, school, community center, or are looking for a unique corporate team-building event, reach out to Keenan Johnson at Individuals interested in volunteering or contributing to the team on the technical and the non-technical sides can also reach out to volunteer. You can find all the information via their website, on Discord, or on GitHub Ribbit network.

Limited Time Only! Chance to Win a Ribbit Network Frog Sensor Kit V4, valued at $220 USD.

GIF of the Ribbit Network Frog Sensor Kit being held by a person

US Residents who sign up for our newsletter could win a Ribbit Network Frog Sensor Kit V4* to participate in climate science as a citizen scientist! Sign up using this link.

*Sweepstakes is open only to individuals 18+ years and permanent legal residents of the United States. Sweepstakes is open only to new subscribers. See official rules.

Ready to try Golioth?

Our team of experts can help you develop a custom solution.