I’ve been learning about the Ethereum blockchain platform for some time now, and the more I know, the more intriguing it appears to be. There are so many resources about Ethereum (articles, videos, platform documentation) that it’s easy to become overwhelmed. However, because the platform is continually expanding quickly, many of them are out of date. It took me some time to piece together and understand what Ethereum is and how it functions. When I talk to developers in meetup groups and other online communities, I get the impression that many individuals want to get their hands dirty with this new technology but have the same problem. This post is my attempt to explain Ethereum from the perspective of a web developer.
If you’re a web developer, you’re already familiar with how a web app’s client-server architecture works at a high level.
Your web application is on AWS, Heroku, or a virtual private server (VPS). All of the clients use this core application. Clients can include a browser, another API that uses your service, and so on. When a client sends a request to the server, it works its magic, communicating with the database and cache, reading/writing/updating the database, and then serving the client.
Most of the time, this architecture works perfectly. However, there are some applications where having that database openly and securely available by everyone would be pretty beneficial, and you wouldn’t have to rely on this web app owner for your data.
Let’s take a look at eBay, for example. If you are a strong seller with hundreds of positive reviews and eBay suspends your account for some reason. That would be awful and would have a significant negative influence on your business. It would be fantastic to transfer all of your reviews and ratings to another platform (say eBay Competitor). By acting as a trustworthy intermediary between buyers and sellers, eBay does provide a service. They do, however, deduct a commission from each sale. What if there was a way to remove eBay entirely from the buyer-seller transaction, saving you money on commission while simultaneously giving you access to all of your data? Decentralized applications enter the scene at this point. Dapps are incredibly simple to create on Ethereum (decentralized applications).
Every client (browser) connects with its instance of the program, as you can see. There isn’t a single server to which all of the clients connect. Everyone who wishes to engage with a damp (Decentralized Application) must have a full copy of the blockchain installed on their computer, phone, or another device. That means that before you can use an app, you must first download the entire blockchain and then use the app. cryptocurrency may appear absurd at first. Still, it has the advantage of avoiding reliance on a single central server that could go away tomorrow.
In actuality, downloading the entire blockchain will not take up a lot of your hard disc space or RAM. Data can use a few workarounds/optimizations to maintain the application decentralized while allowing quick and easy interaction.
So, what is this blockchain, exactly? It has the following features:
Database: The blockchain is a linked series of blocks that holds all transaction data. Returning to the eBay example, every transaction between customers and sellers, whether a sale, refund, or dispute, would be recorded on the blockchain and accessible to all. Ethereum utilizes a Proof of Work algorithm (http://ethereum.stackexchange.com/questions/14/what-proof-of-work-function-does-ethereum-use) to ensure that all nodes in the network have the exact copy of the data and that no erroneous data written to this database.
Code: The data stored in the database component of the blockchain. But where is the logic in buying, selling, canceling, refunding, and so on? In the Ethereum universe in the Solidity programming language. The solidity compiler to compile it to Ethereum Byte Code to the network. Although there are a few alternatives to Solidity, it is the most common contract development language.
So, in a nutshell, the blockchain saves your data, stores your code, and runs your code in the EVM (Ethereum Virtual Machine).
The platform’s financial capabilities are another significant and crucial element. What if I told you that you receive a built-in bank account as soon as you start using a damp? You can create as many bank accounts as you like in a fraction of a second, rather than just one? These bank accounts are known as wallets, and they are where you may store and trade money (Ether, the Ethereum ecosystem’s currency).
I purposefully left out a lot of specifics regarding the blockchain’s inner workings since I wanted to focus on comparing a blockchain-based Dapp to a centralized web app. I hope this post has helped you understand what Ethereum is and how it can create decentralized applications at a high level.