What is Web3.0 — A Deep dive, beginner level explanation of Web3.0 and Dapps

Vinay Kanamarlapudi
Coinmonks

--

Web3.0 represents the next generation of Internet.

Web2.0 refers to the version of the internet most of us know today. It has helped the internet & technology reach billions of people. Successful Web2.0 applications are built by companies that provide services in exchange for user personal data. These apps are centralised in their data centres and have complete control over user data.

Web3.0 applications are called Dapps a.k.a Decentralised applications in the context of a famous blockchain technology called Ethereum blockchain. These are the apps that are now driving the decentralisation movement and letting user own their data.

Let's demystify Web3.0 & Dapp in layman language and deep dive into the architecture of a Dapp comparing it with current Web2.0 apps.

Web3.0 is all about the decentralisation of the internet. Sounds jargonish. Let me explain in simple terms. To understand Web3.0, let's discuss Web1.0 and Web2.0 firstly.

Web1.0 — Internet of static websites.

Static website creators build a website and add content to it. Consumers like you and me just consume the content, which means we just read it. So it is a read-only Web.

Web1.0

Web2.0 — Internet of dynamic websites

Dynamic websites allow users like you and me to generate and consume content. Consider Facebook. So it is a read-write Web.

In Web2.0 though you are the content creator, the content you created resides in the website creator database and the person/company who owns the website holds the rights to delete your content, sell your content etc. Nothing wrong, we all enjoy Facebook, Twitter, Medium etc. which are in the Web2.0 category.

Web2.0

Web3.0 — Internet of decentralisation

Web3.0 gives content creators complete control over the content they produce. In Web3.0 based website, the website owner doesn’t hold the right to delete or sell your content. Because all of the content you create is saved on a public ledger rather than in the website creator database.

The public ledger is not owned by one single company instead it is owned by hundred and thousands of people who provided storage from their computers. Hence it is a publicly owned database and is also called a blockchain.

Content creators are marked as permanent owners of their content on the public ledger. Eg:- If Medium is a Web3.0 application, the blogs that we create are stored on the public ledger, hence Medium doesn't possess any right to delete my content(even if I’m offensive :-)) and also if Medium goes out of business the content still exists on the public ledger and so I can grep the content and use my content to create another website. Hence it read-write-own Web.

Web3.0

So any web app created to work along with a blockchain can be termed a Web3.0 app.

BTW need more explanation of Blockchain? Sure!

BlockChain

Blockchain is a list of records called blocks. Each block contains a transaction between two parties and a link to the previous block.

Blockchain

This blockchain is maintained by a peer-to-peer network of interconnected computers also called Nodes. These nodes are owned and maintained by users across the world.

Hence a blockchain is an open distributed public ledger that can record transactions efficiently in a verifiable way. This ledger contains all the transactions made to date. This ledger is always kept in sync and available on all the nodes in the blockchain.

Bitcoin is a decentralised currency application of the Bitcoin blockchain. On Bitcoin blockchain, a transaction is one person sending money to another person without any centralised authority like a bank. There are a lot of other blockchains in use. Eg:- Ethereum blockchain, Solona blockchain etc.

Ethereum Blockchain

The same definition of blockchain holds for Ethereum blockchain, except the nodes run Ethereum software and store Ethereum public ledger. Ethereum blockchain is created to build any kind of application called Dapps a.k.a decentralised applications. On the Ethereum blockchain, transactions could be currency transfer (or) buying/selling digital art(NFT) (or) creating a tweet (or) buying/selling items like themes and swords in a game.

The backend of these decentralised applications is coded as something called Smart Contracts.

SmartContracts

Smart Contract is a program that contains the decentralised application’s business logic. It’s a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain. These are executed when an action is executed or when a pre-condition is met. In traditional Web2.0 apps, this business logic is similar to business logic coded in the API layer.

Why do we need Web3.0?

As previously said, Web3.0 Dapps are required to exercise ownership rights over content created by you and to remove the centralization of power and control over data made by a community.

An example to understand Web3.0 use — Real estate. In most countries, governments own & maintain real estate registration applications and act as a central authority. We would have heard many litigations happen and multiple parties claiming a single property. One of the reasons for this is the central authority’s manipulation of data, thereby affecting the original ownership. If the real estate is decentralised, the central authority cannot alter the data as the data is now available on a public ledger and also available across hundreds and thousands of computers in a blockchain.

Web3.0 can be termed the internet of Smart Contracts or the internet of Dapps.

I believe that understanding the fundamental architecture of a Dapp is necessary to better comprehend Web3.0 and its applications. To understand Web3.0 Dapp better, I felt it would be beneficial to compare it to current Web2.0 applications. BTW not all Web2.0 apps can be replaced by Web3.0.

  • In a traditional Web 2.0 application, the frontend communicates with the backend, which subsequently stores data in the database. The Web3.0 Dapp is architected as an interface communicating with blockchain.
  • In Web 2.0 application, the actual business logic i.e. creating any resource, altering any resource, handling a transaction is handled by the backend. Backend is developed as a bunch of REST APIs with a choice of your languages like Java, Python, or Golang. In Web 3.0 Dapp, the business logic is bundled as Smart Contract. Smart contracts are coded in Solidity, Vyper etc.
  • Web2.0 applications backend is deployed either on an on-prem machine or AWS EC2 or Azure VM. Web3.0 application backend i.e. Smart Contract are deployed on the blockchain.
  • In a traditional Web2.0 application, the backend business logic is bundled as a container or jar file running on a compute machine like VM or AWS EC2 or any container platform like Openshift or Kubernetes. And the data created is stored in a database like Postgres, Mysql or NoSQL databases. So the compute and storage are running on different machines. In Web3.0 Dapp, the business logic i.e. smart contract runs on EVM(Ethereum virtual machine) & the data created via smart contract are on the same computer node.
  • Traditional Web2.0 application uses REST over HTTPS (GET,POST,PUT,DELETE) for communication with backend. Web3.0 Dapps uses JSON-RPC for communicating with blockchain.RPC stands for Remote Procedure calls. Smart Contracts contain functions which hold the business logic. Each RPC call is actually a smart contract function call.
  • Any API call in Web2.0 applications is authenticated by supplying a JWT token in the headers along with the payload. The JWT token is generated using the username and password of the application user. In Web3.0 Dapp, the RPC calls need to be signed with the private key of the user who is using the Dapp to carry out an action. The user is identified in Web3.0 Dapp via his Ethereum address and private key. Usually, there is no login screen for Web3.0 Dapps. Every user of Dapp is supposed to install a chrome extension called MetaMask. Metamask is a software wallet which enables users to load their Ethereum address along with their private key. Hence every call made to the blockchain is signed by Metamask which enables the smart contract to identify the user who initiated the transaction.
  • In Web2.0 applications, the frontend needs to know the host URL where the backend (API server) is hosted. Using the URL the API calls are initiated from FrontEnd to create/read/update/delete data. In Web 3.0 Apps, the frontend needs to know the smart contract address i.e. where the smart contract is deployed on the blockchain. The smart contract is deployed on a node of a blockchain at an address. Once a smart contract is deployed on a node it is synced across all nodes and available on all nodes of the blockchain at the same address. The frontend uses this address to communicate via JSON-RPC with smart contracts.
  • In Web2.0 applications, the information about API server or backend API is available via API specification like Swagger. In Web3.0 Dapp, the functions available in the smart contract are informed to Frontend via a JSON document called ABI(Application Binary Interface). Using the ABI and smart contract address, the Frontend does the communication with smart contracts.
  • Deployments: Web3.0 Dapp backend i.e. smart contract needs to be deployed onto a blockchain. To deploy a smart contract, the owner of a smart contract needs to get access to a node on the blockchain. The owner can either run his node or get a node from a Node Provider like Infura or QuickNode. Once he gets access, the smart contract can be deployed on a node. As discussed, blockchain is a peer-to-peer interconnected chain of nodes, hence the deployed smart contract is synced across all the nodes in the blockchain. Running or creating a node via Infura is similar to obtaining an AWS EC2 or Azure VM machine to deploy the backend in the Web2.0 world.
  • Deployments: Web2.0 applications can be deployed any number of times about cost as deployment alone doesn’t cost any dollar. In contrast, deploying a smart contract costs money called GAS in the Ethereum ecosystem. Deploying a smart contract is a kind of write operation in the blockchain world. All writes including creating content or deploying smart contract costs GAS. Hence a completely tested smart contract should be deployed on the blockchain.
  • Testing: Web2.0 applications are usually tested on a staging environment or development environment. Similarly, Web3.0 Dapp is also tested prior on a test blockchain network like Sepolia, Kovan etc. The main production Ethereum blockchain is called Mainnet
  • Web2.0 applications — FrontEnd or Backend are deployed on AWS or Azure or On-prem infrastructure like VMs or container platforms like Openshift & Kubernetes. Web3.0 Dapp Frontend can be deployed the same way as Web2.0 application Frontend. Web3.0 Dapp’s backend is decentralised and the FrontEnd looks more or less similar to Web2.0 Frontends and is not decentralised.

The overall architecture of a Web3.0 Dapp looks like the below summing all the above points.

If you like my content give me a clap👏

You can also follow me on LinkedIn or Medium

Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing

Also, Read

--

--

Vinay Kanamarlapudi
Coinmonks

Software Engineering Leader. I’m passionate about leadership, building products, platforms, teams, investing, learning new things.