Why does your Serverless application have so many servers?
You are not required to participate in server serfdom.
Application developers are kissing their infrastructure maintenance woes goodbye by paying Amazon, Google and Microsoft to host their software for them in a fashionable movement unfortunately branded Serverless. The problem is that this paradigm is not without servers.
Before Serverless if you had some code that you wanted to run on the internet you had to stand up a server just to send it to your users. This is an error prone spectacle which includes finding a hosting provider, installing and configuring dependencies appropriately given your chosen operating system and requires a non-trivial amount of work to maintain. It would be inadvisable to let a server grow old without at least pulling in security updates on a regular cadence lest it join a botnet, among many other tragic fates.
In a Serverless world if you have code you want to run on the internet you just give it to a Serverless service provider and they run it for you.
Would a rose by any other name smell as sweet? A server is a computer that serves.
A server is a computer that serves.
“So what’s the big deal? Why am I paying companies to put my code on their computers?” These platforms have a lot of computers all over the world and they pay a lot of smart people to take care of the computers. They provide a service so you don’t have to think about how it’s happening.
Let’s think about how it could be happening.
Going serverless means befriending peers
Your users have computers, and they take care of them (more or less) and they also live all over the world. It seems like the relationship between developers and users is symbiotic! If we introduce our computers with each other they could be friends. We call friend computers peers.
A peer is your computer’s friend!
So what’s the difference between a peer and a server? Peers work together. In practice this means the developer can write code that utilizes the properties of a network of computers, a paradigm known as decentralization.
The Web Platform supports many ways to be truly serverless all you have to do is decentralize.
Adopt a peer-to-peer data model.
- For communication between peers use WebRTC.
- For offline storage use LocalStorage.
- How about torrents?
- File manipulation?
Upload your assets to a decentralized content distribution network.
Once you’ve created your decentralized app don’t serve it, share it. IPFS is the InterPlanetary File System. It exists, works right now and has an HTTPS bridge which means that all you have to do is add your content to it!