Nest revolutionized the humble thermostat and in many ways made the concept of Internet of Things (IoT) part of the mainstream consumer tech conversation. Smart homes would have intelligent devices communicating among themselves and with the owner via a mobile app over the cloud.
That’s the theory, anyway.
In practice, even things like the fussy home WiFi router, possibly the most loathed home computing device ever invented, keep giving us the Internet of Broken, Disconnected Things. That’s one reason I find eero, a San Francisco startup, so interesting. Instead of conceptualizing the home WiFi router as an isolated endpoint for the Internet, eero’s cloud-based, mesh networking approach to WiFi threaten to heighten user expectations with sub-second response times and always-on availability.
To deliver on this promise, eero needed a platform that would make it easy to scale as it grew in complexity and that could handle concurrency at a very high scale. I recently spoke with John Lynn, Cloud Platform Manager at eero, to learn how the team designed its integrated device and cloud solution.
As IoT becomes a more pervasive delivery model for consumer technology, eero represents a look at the future of how consumer devices, cloud-native applications and the back-end of IoT participate in delivering a highly reactive experience to customers.
ReadWrite: What was the genesis for eero?
John Lynn: We were founded in 2014 to blanket the home in fast, reliable WiFi while setting new standards in user-friendliness and accessibility options. We created a product that evolves beyond the old WiFi model where you just set up a router and pray that it never breaks. Before we even began product development, our founders were certain that the single router model wasn’t the future where a growing army of connected devices are all competing for valuable WiFi. To provide reliable coverage and consistent performance across large homes and WiFi-crowded urban environments, we chose to deliver our product as a distributed mesh platform.
RW: A lot of the value of eero seems to live in your cloud platform.
JL: Instead of the arcane home networking equipment approach of forcing consumers to login via IP address, eero delivers a cloud-based back-end that allows customers to access their device and network information on their mobile device from any location using the Internet. When a WiFi network is experiencing connectivity issues, now the user has the opportunity to access troubleshooting data on a mobile device via the cloud, regardless of location. The eero cloud is like having a networking engineer constantly making sure the network is working well for our customers.
RW: What considerations did you face in architecting a cloud-based solution?
JL: We turned to Lightbend and its Reactive Platform for help in building our backend solution in the cloud. The challenge was how to build a highly available, high performance infrastructure that’s able to communicate with each eero device.
The central problem with traditional web architectures boils down to concurrency and database shared memory. To solve these challenges, we chose Akka — an open-source toolkit and runtime for building highly concurrent, distributed and resilient message-driven applications. Akka and the actor model gave us a powerful in-memory data architecture that allowed for very high performance communication between customer device endpoints the eero cloud. It’s a messaging architecture that lets us scale customer endpoints, broker data between those endpoints and its back-end, and deliver a highly responsive cloud interface to customers, regardless of the status of individual devices.
Akka also allows eero to model each customer’s network and nodes with actors, including pushing firmware updates out to endpoints. Our architecture thinking is very much informed by the ideas behind the Reactive Manifesto.
RW: For more technical readers, elaborate on the specific problems your design had to address and how you solved for them.
JL: For example, idempotency can be difficult when someone gets click-happy with a web form. From a RESTful service standpoint, for an operation, or service call, to be idempotent, clients can make that same call repeatedly while producing the same result. In other words, making multiple identical requests has the same effect as making a single request.
Bespoke distributed locking mechanisms and centralized control systems are used to prevent worker processes from stepping on each other’s state. More concurrent requests, long-running workers, and massively parallelized jobs become very complex, very quickly. And as things scale, the introduction of performance optimizations, like caching, further complicates things.
But the biggest problem of traditional web architectures is that the database becomes the shared memory in a vastly concurrent system. One of the things you learn early on in multi-threaded programming is that shared memory introduces a lot of complexity. Primitives such as locks, semaphores, and mutexes are employed to guarantee consistency across concurrent threads. In typical web services, we rarely attempt to coordinate access to data.
With the popularity of powerful ORMs and MVC frameworks, it becomes easy to fetch the data you need from the database in order to service a request. If you need to guarantee consistency, you’re on your own. As systems become more distributed with multiple request servers, async workers, caches, etc., there’s an increased likelihood that different parts of your system have different representations of the same piece of data. As data moves throughout your systems, consistency is harder and harder to maintain.
RW:What other benefits did you see by building a cloud-first home device?
JL: We’re committed to continuous product innovation over time – from new features and capabilities in the devices themselves, to mobile application features that make managing home networks easy. We updated our software numerous times since we launched the product, and the reliability and flexibility that Akka brings to the messaging between devices and the back-end is core to our ability to innovate.