TL;DR — The cloud is being rewired as two machines: a stateful one, managed by decentralized blockchain miners, and a stateless one, managed by centralized cloud infrastructure providers.
This “cloud specialization” is based on statefulness (and lack thereof it), and will enable use cases of technology that were not possible before, such as the fluid exchange of value and “programmatic automation” of connected devices.
I’m constantly surprised at how useless blockchains are despite all the hype they seem to cause. They are really just dumb state ledgers that, at best, hold basic applications… they are the modern equivalent of floppy disks, effectively useless without the computing power around them.
Decentralized zealots will disagree, but rather universally, blockchains are too slow to do any computing that is really interesting aside from their one redeeming feature: they maintain “state” incredibly well. In fact, they are probably the best “state machine” invented to date — properly aligning the incentives to coordinate a network of machines distributed globally that maintain this state of truth without an intermediary.
It’s precisely this feature of “statefulness” that makes blockchains powerful, but here is the rub, they can’t do that much in the real world — they just don’t have enough compute (today and for the perceivable future) to get interesting things done in the same way we think of pervasive cloud computing and IoT enabled things today. But it doesn’t have to be this way: we can connect cloud infrastructure to blockchains to make them truly useful and enable unprecedented levels of coordination and automation in the real world around us.
Having a blockchain that interacts with traditional cloud infrastructure feels like a BIG BANG event in cloud computing, a strangely symbiotic relationship that makes the other better and more useful.
This is the sci-fi stuff of dreams folks, peanut butter and jelly good. Yin to yang. Copy to paste. A match made in heaven. Interestingly enough, each of the two technologies has emerged slowly across the last few years, but today, they’ve both rightly come into their own, but it’s time to start bringing them together to unlock the magic they can bring in concert with one another.
Today, we basically have a bunch of “dumb” programs stored on blockchains that maintain their state forever using a global computer, and a bunch of “smart” programs that are stateless and only spun up to drive scalable real action using today’s cloud infrastructure.
Getting these two technologies working together is incredibly important, as it opens up a whole new aperture of real world “programmatic automation” that was not previously possible.
Ok, let me break that down.
And yes, it’s going to get a bit technical, but stay with me… the basic logic looks something like this. Take one thing (like peanut butter or blockchains), and add in something entirely unrelated (like jelly or serverless cloud infrastructure), and occasionally you get something amazing. For the math buffs out there, here is the QED proof:
The Stateful Machine (Blockchain): a “blockchain” is a stateful ledger of ownership that is recorded in “wallets” that basically say “who owns what” at any point in time since creation. Changes in state, or transactions, are recorded as new blocks that are added to the blockchain through a process of finding consensus on “who owns what” called mining (I’ll let you go down that fun rabbit hole elsewhere!). The “who” can be anything, including a person’s wallet, a connected car on the internet-of-thing’s wallet (yes, cars now have wallets and even addressable IDs!), or even a program called a smart contract that lives on the blockchain.
In short, most blockchains can be thought of as a “stateful-machine” but currently struggle to do the heavy computational tasks required by modern cloud applications, such as running a program that can lock a car. This is where serverless technologies come in, a perfect complement, as a “stateless-machine” that is great at everything except maintaining state that blockchains are really really good at!
A match made in heaven right?!
The Stateless Machine (Serverless Cloud Infrastructure): a “serverless” function is a powerful new paradigm in cloud computing that abstracts away everything required to run an application except the business logic itself. No racks of servers or containers you have to manage and wrangle with (although to be clear, they can coordinate these things). As such, serverless, or functions-as-a-service (“FaaS”) are often used as the glue between services in a cloud environment. Ephemeral, scalable, cheap at low utilization. They provide the perfect solution to event-driven computing needs like the previous example that requires coordinating with the internet of things or blockchains.
In short, if you have the code and can pay for the execution, you can have a supercomputer run a function without dealing with managing the infrastructure itself. Praise the cloud gods! ?
While a simplification, you have scalable ephemeral compute that can be triggered to run with external events, such as changes in blockchain’s state, but maintains very-little state itself. It spins up, and spins down based on need — it’s a “stateless” machine.
Tying these two together is a powerful thing.
Let’s see how it all comes together with an example, that may feel a little sci-fi, but it entirely possible today by combining these two technologies.
Imagine the following scenario: your car is IoT enabled, and you’ve taken a loan to purchase it that is now stored on a blockchain, and you’ve just missed a payment…
“You missed your car payment and the vehicle is locked. Please reload your car’s wallet.” -Your Car
Within milliseconds of you lapsing on your car loan, your car has shut you out! This is the power of stateful smart contracts that can take action in the real world with serverless cloud infrastructure that trigger actions on connected devices.
The loan stored is stored in a stateful contract on the blockchain that has now been paired with the automation of today’s connected cloud.
These are use cases we previously thought were unimaginable that combine fluid value exchange and intermediary free programmatic automation.
Without any human intervention, your car was locked in no time at all — executed without an intermediary, just the blockchain and a few cloud functions that had the authority and payment to execute.
Going deeper into how this might actually work, using the above car example: Let’s say the car loan sat in a “smart contract” on the blockchain, that monitored the state of the car’s “wallet.” Without any help, the blockchain knew this month that the loan recipient had not met the terms of the loan contract and was in default on the car loan, all without any middle person. The exact terms in the legal smart contract might look something like the following (admittedly poorly written) pseudo-code:
The car payment hadn’t paid-or-posted to the car’s wallet. The state of affairs was provable on the blockchain by the loan provider, and the car was automatically locked. The locking was executed by a serverless function and was paid for by the escrow wallet set aside in the contract. Internet-of-things compute wasn’t free, but it was cheap.
Now, why was this not possible before? Because we didn’t have a stateful machine to record the conditional contracts that could self-execute (a blockchain), and a stateless machine (a serverless function and it’s enabling cloud infrastructure) that could actually get the real world actions done.
Only using both technologies could a a smart contract on the blockchain (“on-chain”) send payment to run a function and create a computing action in the real world (“off-chain”) with serverless functions that activate and authenticate to the enabling infrastructure such as a car.
That’s why I think the combination of stateful blockchains and stateless cloud infrastructure is a peanut butter to the jelly level good combination. One without the other is meh, but together, they are a match made in heaven.
All considered, it’s exciting to see the cloud being rewired in the best possible way, with specialization based on statefulness, or lack of it. All of the benefits of the decentralized middle-person-free applications (blockchain enabled applications, or “dApps”) can be combined with infinitely scalable computing (serverless functions-as-a-service, or “FaaS”) and it’s just about to get interesting.
The two machines: a stateful one, managed by decentralized blockchains, and a stateless one, managed by currently-centralized serverless cloud infrastructure providers is an exciting combination to watch, and I’m excited to see where it goes. I’m even more excited to see what entrepreneurs will build with around these ideas!