The blockchain isn’t just the backbone of cryptocurrency – it could change the world. Applications are endless. It is one of the most sought-after skills these days. Blockchain developers are in huge demand but there are only a few who can elegantly develop a blockchain application.
This is the first blog of this series and without further ado let’s learn together the awesome concepts of Blockchain technology.
What is a blockchain?
It is a decentralized platform which enables multiple domains, who do not trust each other to collaborate in a decision-making process.
Main keywords from the above definition are –
Decentralized – There is no single centralized authority that makes decisions on behalf of all the concerned parties. Instead, each party, also called a peer, makes local autonomous decisions towards its individual goals.
Domains – Parties who are skeptical about the authenticity of other parties.
Decision-Making Process – A common process executed by all the peers such as validating a transaction.
Types of systems
There are broadly three types of systems – centralized, distributed and decentralized. Below is the most widely used diagram that depicts these three.
It is kind of multiple client-single server like architecture where the server computer is the one where all of the major processing is done.
Client machines connect to the server computer (master computer) and submit their requests. For e.g. a web application server that hosts all the business logic, runs the database etc. Various client machines connect to the web application server and send/receive requests/responses through the HTTP application layer protocol.
This mechanism poses the following problems –
Single point of failure – If the master goes down, clients won’t be able to serve user request since the machine that runs core logic is dead.
Limited scalability – Only vertical scaling is possible i.e. to add more storage, I/O bandwidth, CPU processing power for the master. Surely, there will be a limit after which increasing these parameters is not feasible.
A distributed system is a model in which components located on networked computers communicate and coordinate their actions by passing messages.
Thus, it is a system where components might span geographical boundaries but are owned and controlled by a single entity (cloud computing). Trust in such a system is still centralized. For e.g. Google.
Here all the processing is not done by a single machine instead they allow to distribute work among various nodes and each of them can serve requests equally. For e.g. Cassandra data store.
There isn’t really any single point of failure because client machines aren’t relying on a single server to fulfill all requests. The system comprises multiple nodes which might be still available to process user requests.
We can scale-out the system by adding more nodes – Horizontal Scaling.
Working of Blockchain
In blockchain, everyone works on their local copy of a common document and it is the responsibility of the underlying process to ensure the consistency. Let us understand this with an example –
Since each of the above four persons has a separate copy of the public ledger, each one now knows that Alice has $100 in her account.
Due to the underlying blockchain mechanism, this entry will be validated first by Bob, Carol, and Dwayne and if successful, they update the same in their respective copies of public ledger.
From above, when a new transaction or an edit to an existing transaction comes in to a blockchain, generally a majority of the nodes within a blockchain implementation must execute algorithms to evaluate and verify the history of the individual blockchain block that is proposed.
If a majority of the nodes come to a consensus that the history and signature are valid, the new block of transactions is accepted into the ledger and a new block is added to the chain of transactions. If a majority does not concede to the addition or modification of the ledger entry, it is denied and not added to the chain.
This distributed consensus model is what allows blockchain to run as a distributed ledger without the need for some central, unifying authority saying what transactions are valid and (perhaps more importantly) which ones are not.
Aspects of Blockchain
Protocols for Commitment – This ensures that every valid transaction from the clients are committed and included in the blockchain in a finite time.
Consensus – This ensures that local copies are consistent and updated.
Security – The data needs to be tamper proof. Note that the clients may act maliciously or can be compromised.
Privacy and Authenticity – The privacy and authenticity of transactions need to be ensured.
Overall, the blockchain technology has the potential to revolutionize several industries from advertising to energy distribution. Its main power lies in its abilities of not requiring trust and being decentralized.
In future posts, we will dive deeper into the various concepts of this technology. Stay tuned! 🌝