Is Leaf Computing the Answer to Cloud Woes? Posted in DesignPlatforms Art Anthony January 17, 2024 As powerful as cloud architecture can be, and as omnipresent as it now is, it’s not without its problems. When Jeremiah Lee joined us at our 2023 Platform Summit in Stockholm, he spoke at length about one of these problems — namely, the potential for loss of functionality. Lee described a familiar situation: when on a hiking trip in Banff, his Fitbit smartwatch struggled to upload data via 3G (thanks to a reverse proxy server timeout set to 120 seconds). As he puts it, “My smartphone and smartwatch were not so smart when I was out in the wilderness.” He goes on to remind us that this isn’t exclusive to consumer hardware and that problems can happen on the other side, too. Take server outages, for example, which might be due to anything from cyberattacks to unscheduled AWS downtime. All of which can be hugely disruptive. For now, this is our reality. But, in his presentation, Lee speaks of his desire to “rebalance the power of technology back to empowering users first” via another possibility: leaf computing. Let’s find out what that might look like, exploring the idea of leaf computing along the way. For more, watch Jeremiah Lee’s talk, recorded at the 2023 Platform Summit. An Introduction to Leaf Computing Leaf (or LEAF) computing is a handy acronym for describing a particular approach to web and mobile architecture. It breaks down as follows: Locally Executed: Business logic happens on a device in the user’s control. Autonomous: As little reliance as possible or practical is placed on external sources for capabilities. Federated: Prioritizes interoperability of capabilities and data portability across providers. Leaf computing has plenty of similarities with offline-first, even if such an approach might seem anachronistic when we’re talking about APIs. It’s worth remembering, of course, that offline-first doesn’t mean offline-only. Lee talks about “reducing the server to only doing things the server is necessary to do.” Still, is such an approach practical, given what users expect from digital, connected products? In fact, it’s exactly what some users want (a moment of silence for those of us who’d love to buy Adobe Creative Suite outright rather than shelling out for Creative Cloud every month). Leaf computing is also an approach that could help to reduce ballooning cloud costs on the side of providers. Lee remembers a time “before SaaS became the norm, [when] software companies released their software to IT departments who would install them on their own servers, usually somewhere in the physical office.” It’s a setup that feels increasingly rare these days. He emphasizes how a cloud-assisted approach can result in a service that’s “further empowered by external dependencies, not powerless when those dependencies are unavailable,” offering the example of how using WebRTC to facilitate a P2P connection between smart devices and phones can reduce dependencies without a need to operate in isolation. Also read: Exploring The Role of Cloud-Native in APIs Is the Cloud, as We Know It, Broken? Returning to his Fitbit example, Lee describes a significant problem with modern hardware. When servers go down or startups fail, devices with fully-functional hardware can quickly turn into expensive paperweights. “So many of the physical devices we now own require not just electricity, but also constant internet connection. They might be right beside you physically, but they’re a world apart because they can’t connect to a server on another continent.” To any gamers reading this article, this story will sound familiar. In March 2023, Nintendo closed their eShop for Wii U and 3DS purchases, permanently disabling all new purchases on these platforms. Sony threatened to do the same thing for their own PS3 and Vita at the end of 2021. Rendering all these devices useless unless you can find, sometimes costly, physical games. Although Sony later backtracked on their decision (users can still purchase digital content for PS3 and Vita today, but on the relevant platform and using account credit only), these examples demonstrate the extent to which consumers of digital content are at the mercy of retailers. As Lee says, “When you put data into the cloud, you’re trusting other people to take care of it.” Sometimes, unfortunately, they don’t take care of it. And, in such cases, possible outcomes include everything from services you rely on being revoked to legitimate privacy concerns. Cloud vs. Cloudless IoT In his talk, Jeremiah outlines what is (more often than not) the current state of affairs when it comes to the architecture of smart devices: Data is synced to a cellphone or another intermediary device via Bluetooth. The cellphone, via an app, acts as a proxy to the cloud via the web. A server processes data from the smart device. Processed data is sent back to the cellphone, and the state is loaded back to the smart device. When the app is used, it makes various API requests to retrieve reformatted, more digestible data for display on the app. However, this is often an inefficient, data-intensive process that drains the battery. And it’s prone to issues if, say, you can’t get online. Things don’t have to be this way, says Lee. An approach like leaf computing gives users more control over their data while limiting operational costs and security liabilities on the provider side. This begs the question: why wouldn’t we move logic from servers to smartphones (and, where appropriate, smart devices)? Here’s what that might look like in practice: Data is synced to a smartphone or similar device via Bluetooth. Processing and storage of data takes place on the smartphone. Encrypted backup features of the phone are used to protect data. Processed data is returned to the smart device via Bluetooth. It’s an approach Apple took when they released the Apple Watch, so it’s not without precedent. But, despite Apple’s example, not many companies are following their lead. Generally speaking, most smart home products still rely heavily on cloud architecture. So why is that the case? Are Cloudy Days Coming to an End? When designing APIs, it’s all too easy to operate under the assumption that servers are authoritative and clients are subservient. Leaf computing challenges this assumption, reminding us that clients being authoritative and autonomous does not invalidate connectivity. Jeremiah identifies a few different reasons* for the ongoing reliance on cloud architecture: Helpful tooling: Many services are built for and around cloud-native architecture. Everybody else does it: There’s little incentive to deviate from the status quo. Recurring subscription revenue: Companies can bill monthly for ongoing service. Growth hacking: Customer data is mined for insights, often without asking permission. *It’s worth noting that all of these advantages benefit service providers rather than end users. However, the adoption of cloudless IoT offers benefits to both providers and end users. Namely, it shifts the computation expense to smartphones while eliminating data storage costs and security responsibilities. In the age of spiraling cloud storage costs and privacy laws like GDPR, CCPA, and so on, the proposition may start to become a lot more appealing. As Lee highlights, cloudless IoT is (or has the potential to be, at least) more secure, resilient, and ecologically friendly than using the cloud for everything. But, even though the implications of leaf computing are bright, it might be wise to temper our expectations on adoption rates. After all, the allure of drifting along with the status quo should never be underestimated… The latest API insights straight to your inbox