Ask this of a non-engineer, and he’s likely to answer by repeating some seductive Tweets he’s read about a utopian future web where users “own” their data. The definition is going to rest heavily on a progressive comparison to the primitive Web 1.0, a simple HTML era where you simply “read” online content (aka the ‘90s), and Web 2.0, the fancy, manipulative web of today that’s ruled by evil Big Tech corporations that control and hoard your data.
Then he’ll say the word “decentralized” a lot.
It’s going to sound good, too good. But, it’s going to hit some snags if you ask any questions that start with the word “how” — like, How does it work? How do you log on? How do you build a decentralized app (“dapp”)? How do you make money? How…?
What follows is one web engineer’s effort to ground the hype in some barebones reality, by attempting to answer some of those nagging hows.
We’ll start by clarifying the parts of Web3 that are no different than our familiar friend, https://www.domain.com , which is labeled “Web2” only when you’re talking about Web3.
Web2 & Web3: How are they the same?
Web2 & Web3: How are they different?
Web3’s novelty is primarily in how it handles the behind-the-scenes functions of managing, storing and processing data, or the back-end. This is what’s hatched all the talk about a decentralized, corporation-free metaverse where we all own our data.
To understand the difference, let’s first describe the battle-tested way an app is architected in Web2 today.
At its core, Web2 can be thought of as containing three elements: the front-end (the “presentation layer”), the back-end (“the business layer”) and the database (“the data layer”). These three modules talk to each other back and forth via connectors and APIs, like so:
Starting from the top down, the internet serves the front-end or UI of a website to a client via the web browser (this is what you see when you visit a URL). The UI dynamically handles user behaviors and interactions, and communicates that information to the back-end via HTTP. This HTTP connection between the front-end and back-end is a two-way street. The back-end both receives data from the front-end, and sends it data from the back-end, which itself is fetching/storing in database(s).
Relative to Web3, Web2’s architecture is “centralized” because the code resides in a backend server and the data is locked in a database. Both the code and data are privately owned by the creator of the app (usually a company), and in the case of a prominent app, like Google or Facebook, the data is highly valuable and holds all of the world’s information behind a walled garden. The top-of-the-funnel internet user that visits a URL and feeds his data to the database has neither access nor control.
Cue widespread privacy concerns and fertile ground for a Web3 populist rebellion!
Unfortunately, revolution is never easy. A decentralized data architecture is a lot messier, and really, still not figured out.
In Web3, there is no centralized web server or database. Instead, you leverage blockchain to crowdsource a shared server of sorts. That machine can take different forms, but for simplicity’s sake, we’ll assume it’s the most popular processor, the Ethereum Virtual Machine (EVM).
The Ethereum blockchain is open source, which means it’s owned by no one and remains accessible to everyone. It’s maintained by a peer-to-peer anonymous network of nodes, which is why you’ll often hear it likened to file sharing protocols, or BitTorrents.
But, what’s a node? Nodes are what the blocks of data in a blockchain are stored on. They’re basically mini servers, and can be any kind of device with compute power, such as a computer or laptop. Nodes form the backbone of the blockchain, since they store, spread and maintain the blockchain’s blocks of data. In fact, the “blockchain” gets its name from all the chained nodes that compose it, and constantly communicate and exchange data with each other.
The blockchain changes state by executing “transactions.” A request to execute a transaction can be made by any node and must be broadcast to the whole network (Yes, this means data on Ethereum is public). After verifying the transaction, miners — think of them as super nodes — execute the transaction and propagate the resulting state change to the rest of the network. Transactions are not valid unless they are mined, and mining has a fee. These “gas fees” are infamously high, and become ever more expensive as more transactions are processed on the Ethereum blockchain.
To help visualize, here’s a high-level flow chart of Web3 architecture:
As you can see, it’s definitely a group effort to get around AWS! Unfortunately for back-end developers, circumventing web servers apparently necessitated the invention of brand new back-end languages, like Solidity and Rust. On the blockchain, “business layer” code that executes application logic has actually fully re-branded from the relatively dull “back-end” to the much more fancy “smart contract.” Oh, also, anyone can read, use and copy your code, because it’s totally open. We’ll consider this a positive change…
Web2 and Web3 are together so interesting, because they hit on so many philosophical, political, and moral questions. But, if I had to summarize them in one, it would be this:
Do you believe we, the people, as a group of nodes, can better manage ourselves than our institutional overlords: the government, the banks and AWS?
And, as a follow up:
Will they even let us?
🤔 🤔 🤔